vrtc / chorus (public) (License: CC0) (since 2023-08-12) (hash sha1)
World of Warcraft add-on stub. The overall goal is to create a specialized raid frame.
List of commits:
Subject Hash Author Date (UTC)
feat(test)!: Toggle debug mode at runtime 23c37e3ab2eaf924f41fe51adc1e54f525222a8b Vladyslav Bondarenko 2023-08-29 03:41:55
fix: Aura tooltip is always opaque 1f7ba009c71796093b8cfa63cb38d918b9696c79 Vladyslav Bondarenko 2023-08-29 01:31:40
fix: Adjust aura tooltip toggle button layout fc72d10b09f44ef9ba6f2f93413a20def40c2d4a Vladyslav Bondarenko 2023-08-29 01:30:27
feat!: Add role widget 0ac8cda6522056c8adb527ba2f144229f251f69e Vladyslav Bondarenko 2023-08-29 00:59:14
fix: Only show power bar when appropriate 5313d1bfbf676c88b5c2a0a56fbea88549633b7b Vladyslav Bondarenko 2023-08-28 22:46:36
feat!: Toggle detailed unit aura tooltip in combat 460c622c04a8b0fa503c2a5d45313b667809b95c Vladyslav Bondarenko 2023-08-28 19:26:25
feat!: Add detailed buff and debuff popup 1ff7bcff470419c7fa40c6b946e441867dda4825 Vladyslav Bondarenko 2023-08-27 20:42:05
fix!: Further specialize every aura frame 1ec8385427bda76ea40840e68da7f5948d5af9bd Vladyslav Bondarenko 2023-08-27 18:40:55
feat: Add combat status indicator to unit buttons 38e469e01eb581693fd22f69b0739ea308d94966 Vladyslav Bondarenko 2023-08-27 16:35:38
fix!: Show raid targeting icon correctly ae5a1c5541d4bf137ea287671eb1f558422b26f4 Vladyslav Bondarenko 2023-08-27 15:24:57
fix!: Disable test mockup for release 0.4 54113d6a7f222ea2f382a1d5382c8e941e7537b1 Vladyslav Bondarenko 2023-08-26 22:42:33
fix: Apply source formatting before 0.4 cb1c5f11b553aba43751091c8746abdf261806e6 Vladyslav Bondarenko 2023-08-26 22:36:57
fix!: Cast bar consistent between targets a7c5e11ec5094033e946a95002010e5b02d6da74 Vladyslav Bondarenko 2023-08-26 21:56:35
fix(test)!: Add primitive test mockups f2b7fcf2058c7c1b61ef43241f55e92a5113bf57 Vladyslav Bondarenko 2023-08-26 16:55:54
feat(build): Update project descriptors for 0.3 740e01cc3a8888e0500ce213d7901f66625919ab Vladyslav Bondarenko 2023-08-25 21:15:10
feat: Add solo target of target f11b332540168ff42f4f9b53abd87b8b2a09db65 Vladyslav Bondarenko 2023-08-25 20:44:27
feat: Add player pet button to solo frame 00e67525cafb6db5256cd43ecf8a7f510354b88f Vladyslav Bondarenko 2023-08-25 19:58:10
fix: Hide power (mana) bar when appropriate e307bbfdabbe63faed3a7de9e0152639418496b8 Vladyslav Bondarenko 2023-08-25 19:56:53
feat!: Add party frame f50f93dc80f86f8fb280836366252520fd417b29 Vladyslav Bondarenko 2023-08-25 18:18:24
fix!: Toggle frame visibility with unit watch 3ab89d1ee3ae8d2a1afa94610140767b28f12c6a Vladyslav Bondarenko 2023-08-25 18:09:32
Commit 23c37e3ab2eaf924f41fe51adc1e54f525222a8b - feat(test)!: Toggle debug mode at runtime
When addons are loaded the list of scripts that is included is fixed.
Normally, which files are loaded cannot be changed at runtime. To enable
the debug mode in this scenario requires client restart. Allow debug
mode to be activated at runtime without needing to restart the client,
by changing values in a `ChorusTest.lua` script snippet and reloading
the client state dynamically at runtime with `/reload` command.
Author: Vladyslav Bondarenko
Author date (UTC): 2023-08-29 03:41
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2023-08-29 03:41
Parent(s): ed7562f8e0ceb2124059aa267f4e3a51b98f1f7b
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: 416a0214f22a645112273ff09c1e228adf5ee3a7
File Lines added Lines deleted
etc/luacheckrc.lua 3 0
src/Chorus.lua 1 3
src/Chorus.xml 4 3
src/ChorusAuraButtonTemplate.lua 4 2
src/ChorusAuraFrameTemplate.lua 7 5
src/ChorusAuraTooltipFrameTemplate.lua 2 0
src/ChorusTest.lua 47 5
File etc/luacheckrc.lua changed (mode: 100644) (index 10fd365..c8f64a0)
... ... Author still chose to use FrameXML for convenience. ]]--
78 78
79 79 stds.framexml = { stds.framexml = {
80 80 read_globals = { read_globals = {
81 'BUFF_MAX_DISPLAY',
81 82 'CastingBarFrame', 'CastingBarFrame',
82 83 'ComboFrame', 'ComboFrame',
84 'DEBUFF_MAX_DISPLAY',
85 'DEFAULT_CHAT_FRAME',
83 86 'DebuffTypeColor', 'DebuffTypeColor',
84 87 'FocusFrame', 'FocusFrame',
85 88 'FocusFrameDropDown', 'FocusFrameDropDown',
File src/Chorus.lua changed (mode: 100644) (index 87f5b78..01b2c33)
1 Chorus = {
2 test = {},
3 }
1 Chorus = {}
File src/Chorus.xml changed (mode: 100644) (index 4e2e674..572aca4)
1 1 <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
2 2 <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Ui xmlns="http://www.blizzard.com/wow/ui/">
3 3 <Script file="Chorus.lua"/> <Script file="Chorus.lua"/>
4 <!-- Exclude ChorusTest.lua script in release stable version.
5 Only include ChorusTest.lua script for development. -->
6 <!--<Script file="ChorusTest.lua"/>-->
4 <!-- `ChorusTest.lua` script is executed conditionally.
5 Decision is made at runtime.
6 Configuration is done in the snippet itself. -->
7 <Script file="ChorusTest.lua"/>
7 8 <Include file="ChorusFont.xml"/> <Include file="ChorusFont.xml"/>
8 9 <Include file="ChorusAuraButtonTemplate.xml"/> <Include file="ChorusAuraButtonTemplate.xml"/>
9 10 <Include file="ChorusAuraFrameTemplate.xml"/> <Include file="ChorusAuraFrameTemplate.xml"/>
File src/ChorusAuraButtonTemplate.lua changed (mode: 100644) (index 460a589..c0ce313)
1 1 local Chorus = Chorus local Chorus = Chorus
2 2
3 local DebuffTypeColor = DebuffTypeColor
4 local GameTooltip = GameTooltip
5 3 local GetTime = GetTime local GetTime = GetTime
6 4 local UnitAura = Chorus.test.UnitAura or UnitAura local UnitAura = Chorus.test.UnitAura or UnitAura
7 5 local UnitExists = Chorus.test.UnitExists or UnitExists local UnitExists = Chorus.test.UnitExists or UnitExists
8 6 local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected
9 7
8 local DebuffTypeColor = DebuffTypeColor
9 local GameTooltip = GameTooltip
10 local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit
11
10 12 local function auraButtonValidate(auraButton) local function auraButtonValidate(auraButton)
11 13 assert(auraButton ~= nil) assert(auraButton ~= nil)
12 14
File src/ChorusAuraFrameTemplate.lua changed (mode: 100644) (index a767e5e..1fda74b)
1 1 local Chorus = Chorus local Chorus = Chorus
2 2
3 local UnitAura = UnitAura
4 local UnitExists = UnitExists
5 local UnitIsConnected = UnitIsConnected
3 local UnitAura = Chorus.test.UnitAura or UnitAura
4 local UnitExists = Chorus.test.UnitExists or UnitExists
5 local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected
6
7 local RegisterUnitWatch = Chorus.test.RegisterUnitWatch or RegisterUnitWatch
8 local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit
6 9
7 10 --[[ See `FrameXML/BuffFrame.lua:BUFF_MAX_DISPLAY`. ]]-- --[[ See `FrameXML/BuffFrame.lua:BUFF_MAX_DISPLAY`. ]]--
8 11 local BUFF_MAX_DISPLAY = BUFF_MAX_DISPLAY or 36 local BUFF_MAX_DISPLAY = BUFF_MAX_DISPLAY or 36
 
... ... local function createEveryAuraButton(auraFrame)
205 208 local max = math.max(BUFF_MAX_DISPLAY or 36, DEBUFF_MAX_DISPLAY or 36) or 36 local max = math.max(BUFF_MAX_DISPLAY or 36, DEBUFF_MAX_DISPLAY or 36) or 36
206 209 local i = 0 local i = 0
207 210 local w = math.max(self:GetWidth(), 30) local w = math.max(self:GetWidth(), 30)
208 local h = math.max(self:GetHeight(), 30)
209 211 local bmaxh = 30 local bmaxh = 30
210 212 local x = 0 local x = 0
211 213 local y = 0 local y = 0
 
... ... local function createEveryAuraButton(auraFrame)
217 219 b:SetPoint('TOPLEFT', x, -y) b:SetPoint('TOPLEFT', x, -y)
218 220 x = x + b:GetWidth() x = x + b:GetWidth()
219 221 bmaxh = math.max(bmaxh, b:GetHeight()) bmaxh = math.max(bmaxh, b:GetHeight())
220 if x > self:GetWidth() then
222 if x > w then
221 223 x = 0 x = 0
222 224 y = y + bmaxh y = y + bmaxh
223 225 end end
File src/ChorusAuraTooltipFrameTemplate.lua changed (mode: 100644) (index c6bc77e..48c13f6)
... ... local Chorus = Chorus
2 2
3 3 local strtrim = strtrim local strtrim = strtrim
4 4
5 local RegisterUnitWatch = Chorus.test.RegisterUnitWatch or RegisterUnitWatch
6
5 7 local function auraTooltipToggleButtonMain(self) local function auraTooltipToggleButtonMain(self)
6 8 assert(self ~= nil) assert(self ~= nil)
7 9
File src/ChorusTest.lua changed (mode: 100644) (index 7b7eb41..f1d34a7)
1 local Chorus = Chorus
2
3 --[[ NOTE SavedVariables do not work for this since they are loaded after all
4 of the scripts and after all of the API was shadowed. Testing module must be
5 loaded __before__ shadowing. See each individual script for details. ]]--
6
7 --[[ To enable testing mode uncomment the following line and `/run ReloadUI()`. ]]--
8
9 --[[ Chorus.debugFlag = true ]]--
10
11 if not Chorus.debugFlag then
12 Chorus.test = {}
13 return
14 end
15
16 if DEFAULT_CHAT_FRAME then
17 DEFAULT_CHAT_FRAME:AddMessage(date('%X') .. ' ChorusTest.lua: mock testing mode enabled')
18 end
19
1 20 local t = { local t = {
2 21 focus = {}, focus = {},
3 22 party1 = { party1 = {
 
... ... local function UnitPowerType_Mock(u)
221 240 return 0, 'MANA' return 0, 'MANA'
222 241 end end
223 242
224 local function RegisterUnitWatch_Mock()
225 --[[ call DoNothing() ]]--
226 return
243 local function RegisterUnitWatch_Mock(self)
244 self:Show()
227 245 end end
228 246
229 247 local function SecureButton_GetUnit_Mock(self) local function SecureButton_GetUnit_Mock(self)
230 local p = self:GetParent()
231 return self:GetAttribute('unit') or p:GetAttribute('unit')
248 local i = 0
249 local f = self
250 local u = nil
251 while (i < 8192) do
252 u = f:GetAttribute('unit')
253 if u ~= nil and 'string' == type(u) then
254 break
255 elseif f:GetAttribute('useparent-unit') or f:GetAttribute('useparent*') then
256 local p = f:GetParent()
257 if p then
258 f = p
259 else
260 break
261 end
262 else
263 break
264 end
265 i = i + 1
266 end
267
268 return u
232 269 end end
233 270
234 271 local function UnregisterUnitWatch_Mock() local function UnregisterUnitWatch_Mock()
 
... ... local function UnregisterUnitWatch_Mock()
236 273 return return
237 274 end end
238 275
276 local function UnitGroupRolesAssigned_Mock()
277 return 'DAMAGER'
278 end
279
239 280 Chorus.test = { Chorus.test = {
240 281 GetNumPartyMembers = GetNumPartyMembers_Mock, GetNumPartyMembers = GetNumPartyMembers_Mock,
241 282 UnitAura = UnitAura_Mock, UnitAura = UnitAura_Mock,
 
... ... Chorus.test = {
243 284 UnitChannelInfo = UnitChannelInfo_Mock, UnitChannelInfo = UnitChannelInfo_Mock,
244 285 UnitClass = UnitClass_Mock, UnitClass = UnitClass_Mock,
245 286 UnitExists = UnitExists_Mock, UnitExists = UnitExists_Mock,
287 UnitGroupRolesAssigned = UnitGroupRolesAssigned_Mock,
246 288 UnitHealth = UnitHealth_Mock, UnitHealth = UnitHealth_Mock,
247 289 UnitHealthMax = UnitHealthMax_Mock, UnitHealthMax = UnitHealthMax_Mock,
248 290 UnitInParty = UnitInParty_Mock, UnitInParty = UnitInParty_Mock,
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/vrtc/chorus

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/vrtc/chorus

Clone this repository using git:
git clone git://git.rocketgit.com/user/vrtc/chorus

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main