Skip to content

feat(cdm): add cooldown manager quality-of-life options - #2271

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
LybrialsGit:cdm-keybind-style-assist
Sep 27, 2026
Merged

EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
LybrialsGit:cdm-keybind-style-assist

Conversation

@LybrialsGit

@LybrialsGit LybrialsGit commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Add Cooldown Manager Quality of Life options for readable ability keybinds, visible rotation guidance, and global cooldown progress in a configurable part of the UI.

  • Readable keybind labels: configure the font, outline, size, anchor, offsets, text color and opacity on CDM bars. Optional backgrounds and borders have independent colors, opacity, thickness and padding, including fully transparent backgrounds and borders for text-only labels.
  • Visible rotation guidance: highlight Blizzard's currently recommended ability on CDM bars with configurable highlight style and color.
  • A movable Rotation Assist Icon: show the current recommendation separately from the CDM bars, with configurable size and position, Unlock Mode support, optional combat-only visibility, and its own styled keybind label. The recommended ability does not need to be on a CDM bar.
  • Optional GCD display: show global cooldown progress as a swipe over the Rotation Assist Icon, below its keybind label. The swipe follows the global cooldown even when the recommended ability changes. Its end indicates that the GCD has finished; casts, channels, spell cooldowns and other ability requirements can still delay an action.

Controls are under Cooldown Manager > CDM Bars > Extras and Cooldown Manager > Rotation Assist Icon. Keybind appearance is configured using the cog and color control beside Show Keybind. The standalone page includes Show GCD.

Rotation displays require Assisted Highlight to be enabled in Blizzard's options. Their enable switches are disabled with an explanation otherwise. Players continue to press normal ability keybinds; the feature does not cast spells or use the Single-Button Assistant. It displays one current recommendation, not a queue of future casts.

New displays are opt-in. The standalone icon, its keybind label and its GCD swipe default OFF; existing CDM label appearance is preserved until customized. Optional frames are created lazily, updates are event-driven, and registrations are removed when disabled. The feature adds no polling or timer-based logic and does not write Blizzard's Assisted Highlight CVar. The GCD uses the native cooldown widget without reading restricted timing values.

How was it tested?

  • 246 local Lua 5.1 assertions pass, covering opt-in behavior, initialized keybind fonts, styling, recommendation changes, profile cleanup, and GCD enable/disable behavior. Syntax checks pass for all five production Lua files.
  • GCD checks cover its independent time source, recommendation changes during a GCD, unavailable duration data, hidden icons, Unlock Mode placeholders and profile changes. Disabled GCD display creates no cooldown widget or cooldown-event registration and performs no duration queries.
  • Local mocked option checks cover both rotation toggles with Blizzard Assisted Highlight OFF and ON. CVar writes and deprecated action-bar API calls are rejected by the local checks.
  • Added Lua code/comments/strings are ASCII; whitespace checks pass. Test helpers are local only and are not included in this PR.

Live Retail, Beast Mastery Hunter:

  • Reloaded the deployed build, enabled Show GCD, and used ordinary Bestial Wrath, Kill Command and Barbed Shot keybinds at a training dummy. The recommendation and label updated, and the GCD swipe appeared over the recommended icon and cleared afterward. The keybind remained readable above the swipe.
  • Disabled the CDM and standalone keybind labels, reloaded, then enabled both again. Both labels rendered without the reported font error appearing.
  • Switched Show GCD OFF and ON through the options. No Lua error or blocked-action popup was observed during these checks.
  • Earlier Retail checks covered the keybind font/size and background/border transparency, rotation highlight style/color pickers, standalone icon size/position and selecting the icon in Unlock Mode.

Screenshots

Real Retail captures, cropped to the relevant options and HUD.

CDM label appearance Custom font and badge
CDM label appearance Custom font and badge
Text-only keybind CDM rotation highlight controls
Text-only keybind Rotation highlight controls

Standalone Rotation Assist Icon options including Show GCD

Standalone keybind styling

The following HUD captures show consecutive recommendations before and after a normal ability keypress, not a future-cast queue.

Bestial Wrath / S1 Barbed Shot / 2
Bestial Wrath Barbed Shot

The same Kill Command recommendation with an active GCD and after the GCD has ended. The keybind stays visible in both states.

GCD active GCD finished
Rotation Assist Icon during the GCD Rotation Assist Icon after the GCD

Checklist

  • New settings default OFF; existing appearance is preserved until customized.
  • Zero additional optional runtime work while disabled: lazy display/decorations and event registration only while enabled.
  • Cheap while enabled: event-driven, with native GCD rendering and no new polling, timer-based logic or per-frame allocations.
  • Added rendering uses EUI-owned frames; no new scripts or writes on Blizzard-owned frames.
  • Current build tested in game on live Retail within the scope described above. Uses Midnight APIs without adding compatibility branches.

@LybrialsGit
LybrialsGit force-pushed the cdm-keybind-style-assist branch from 009c63c to 298fb63 Compare September 27, 2026 10:31
@EllesmereGaming

Copy link
Copy Markdown
Owner

Thank you! Keybind label styling looks great, but needs a few changes before I can merge:

Required

  1. Keybind text is created without a font
    (EllesmereUICooldownManager/EllesmereUICdmHooks.lua ~3226-3232)
    DecorateFrame no longer calls EllesmereUI.ApplyIconTextFont(...) on the keybind FontString, and ns.StyleCDMKeybind returns before setting a font when Show Keybind is off (the default). The next keybind refresh then calls SetText on it and errors with "FontString:SetText(): Font not set". Easy repro: Show Keybind as a spec override (off on spec A, on on spec B) and swap specs, or switch from a profile with keybinds off to one with them on.
    Fix: restore the creation-time EllesmereUI.ApplyIconTextFont(kt, GetCDMFont(), (barData.keybindSize or 10) / kbScale, "cdm") before calling ns.StyleCDMKeybind.

  2. Don't write the assistedCombatHighlight CVar (EllesmereUIOptions/EUI_CooldownManager_Options.lua ~18674 and ~19040)
    SetCVar("assistedCombatHighlight", "1") from our code makes Blizzard's AssistedCombatManager run its update under our taint (it installs an OnUpdate and writes onto Blizzard's action buttons). Please remove both SetCVar calls and instead gate the two toggles the way Action Bars does (EUI_ActionBars_Options.lua ~6038-6048): disabled = function() return not GetCVarBool("assistedCombatHighlight") end with disabledTooltip = "This option requires Blizzard's Assisted Highlight to be enabled", and update the tooltips to match.

  3. Deprecated globals (EllesmereUICooldownManager/EllesmereUICdmRotationIcon.lua ~61)
    HasVehicleActionBar() / HasOverrideActionBar() are the 12.0 deprecation fallbacks. Please use C_ActionBar.HasVehicleActionBar() / C_ActionBar.HasOverrideActionBar().

Scope

  • The PR also adds a whole Rotation Assist Icon (new file, options page, Unlock Mode mover, 10 events + 3 callbacks when enabled) that the title and description don't mention. CONTRIBUTING asks for one focused change per PR, so please either split the icon into its own PR or add it to the description so it can be reviewed as part of this one.
  • Please drop the three .tools/test-cdm-*.lua files. Nothing runs them in CI and they didn't catch the issues above.

I can handle the rest after merge (Forever gate for the icon page, some performance tuning and shared-helper cleanup), so no need to worry about those. Thanks again!

@LybrialsGit

LybrialsGit commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Thank you for the review and the feedback. I will implement it.

@LybrialsGit
LybrialsGit force-pushed the cdm-keybind-style-assist branch from 298fb63 to c7e8c88 Compare September 27, 2026 18:28
@LybrialsGit LybrialsGit changed the title feat(cdm): customizable keybind labels and expose assisted highlight feat(cdm): add cooldown manager quality-of-life options Sep 27, 2026
@EllesmereGaming
EllesmereGaming merged commit c7d8cd2 into EllesmereGaming:main Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants