Skip to content

Add opt-in chat embedding for damage and healing meters - #2090

Draft
NYTEMODEONLY wants to merge 1 commit into
EllesmereGaming:mainfrom
NYTEMODEONLY:proposal/chat-meters-embed
Draft

NYTEMODEONLY wants to merge 1 commit into
EllesmereGaming:mainfrom
NYTEMODEONLY:proposal/chat-meters-embed

Conversation

@NYTEMODEONLY

Copy link
Copy Markdown

What does this PR do?

Adds an opt-in Meters view inside the chat content area. Two existing Damage Done
and Healing Done windows sit side by side, freeing the screen space used by their
standalone frames. A three-bar icon above Settings switches between chat and meters;
right-click opens Damage Meters settings. Native header buttons, timers, scrolling,
breakdowns and the chat background opacity are preserved.

The four options live directly in Damage Meters > Chat Meters and default off:
embedding, auto-show on dungeon entry, auto-show on raid entry, and return to chat on
exit. They use the normal damage-meter profile. Manual chat selection lasts until
another instance transition; extra meter windows remain independent.

The implementation gives chat explicit ownership of adopted meter windows.
Settings previews, chat resizing, Blizzard Edit Mode and Ellesmere unlock mode
cannot restore standalone placement. Partial rebuilds keep surviving meters embedded;
disabling embedding restores the original standalone frames and controls. Existing
unlock registrations are retained so temporary embedding does not delete saved links.

This is the native integration of a working companion, with the companion's polling,
geometry hooks and runtime settings-page replacement removed. The host is built
lazily; lifecycle notifications and owned-frame size changes drive updates. There is
no new polling loop, timer gate, secure-tab override or addon-registration whitelist change.

How was it tested?

  • Lua 5.1 compilation of every affected source file.
  • python .tools/chat-meters-tests/run.py with Python 3 and lupa==2.8: passes.
    The harness executes the actual host and production placement, unlock, visibility,
    sidebar and Combat Log closures, including all 32 combinations of edit/unlock/
    settings/resize flags and selected view. It also checks lazy opt-in, untouched
    standalone geometry, full headers, resize without data fetches, tab/zone switching,
    missing hosts, partial/empty rebuilds, profile opt-out and disable/re-enable cleanup.
  • Locale keys regenerated using the repository extractor's pattern; git diff --check passes.

The companion was used in game on EllesmereUI 9.1.8 / Retail Midnight 12.1. The
native refactor in this PR has not yet been tested in the live client, so this
is a draft pending that pass. The mocks cannot certify combat taint, actual frame
anchoring, rendering or raid performance.

For an in-game review: disable the separate EllesmereUIChatMeters companion first,
enable the new setting, and exercise chat/Combat Log/whispers during combat, resizing,
both edit modes, settings previews, profile swaps and every header action. Confirm
that switching the feature off restores the prior standalone layout.

Screenshots

Before: chat and the two meters occupy separate screen areas. A matched before
capture is not available.

After: contributor-supplied screenshot of the working companion. The proposed native
page uses Chat Meters without the companion's (Custom) suffix and defaults off.

Damage and healing meters embedded in chat, with Damage Meters settings open

Checklist

  • New settings default OFF (no behavior change without opt-in)
  • Zero cost while disabled: no feature events registered, no polling, no hooks doing work, no host frames built before first enable; subscriptions removed on disable
  • Cheap while enabled: event-driven (no new polling, timer-based logic or per-frame table allocations in the host)
  • No writes onto Blizzard-owned frame tables or scripts; chat/dock selection stays untouched. Display-container alpha uses the chat engine's existing visual-host approach, with state kept in module locals
  • Tested in-game on live: the native refactor still needs this pass. No version gates or pre-Midnight APIs were added

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.

1 participant