Skip to content

Fix unit frames disappearing when the group type changes in combat - #6

Open
KharchenkoDmitriy wants to merge 1 commit into
NeeRgY:masterfrom
KharchenkoDmitriy:fix/combat-frame-visibility
Open

Fix unit frames disappearing when the group type changes in combat#6
KharchenkoDmitriy wants to merge 1 commit into
NeeRgY:masterfrom
KharchenkoDmitriy:fix/combat-frame-visibility

Conversation

@KharchenkoDmitriy

Copy link
Copy Markdown

Keep all three drivers registered at all times and let the secure conditional resolve the switch natively:

  • solo/party/raid drivers now each carry a conditional that matches the real roster state, so they no longer depend on being (un)registered at the right moment. The raid frame's unconditional "show" becomes "[@raid1,exists] show;hide".
  • A frame group configured as "hide" registers an unconditional "hide" driver rather than unregistering, so joining a group in combat cannot make a hidden frame group appear either.
  • Layout work below the visibility block still only runs for the active group type, so this does not change what gets laid out or when.

Deciding whether a frame group must stay hidden now has to be possible for a group type the player is not currently in, which the active layoutGroupType alone cannot answer. PreUpdateLayout therefore records the layoutAutoSwitch entry that applies to each frame group for the current zone (in a pvp instance all three use the battleground/arena entry), and F.IsGroupTypeHidden reads that mapping. This also fixes battleground/arena "hide" settings being ignored, which a per-frame group-type lookup would otherwise have missed.

Applied to all flavors: Core.lua, Core_Cata.lua, Core_Mists.lua, Core_Vanilla.lua (also used by TBC) and Core_Wrath.lua.

Solo/party/raid frames only applied their layout while the player was in
that group type. Since F.UpdateLayout defers itself until combat ends, a
frame group that had never been active since login - most commonly the
party frame after a reload - was shown by its visibility driver with no
sizes, anchors or header attributes when the group changed in combat,
and stayed blank until combat ended. Once it had been laid out once, the
same in-combat change worked, which is why this only reproduced the
first time.

Each frame group now lays itself out for the layout its own
layoutAutoSwitch entry names (F.GetGroupTypeLayout) whenever it is not
the active group type: full updates use that layout, partial updates
from the Layouts tab apply when the edited layout is that one. The raid
frame's combineGroups check reads the layout being applied instead of
the current one. Picking a different layout for a non-active group type
in the autoswitch dropdowns re-lays that frame group out right away.

Classic only, like the visibility-driver change it builds on: the Retail
branch of the group frames keeps its old behavior and never reaches this.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011YngV4VgYFwrPdgvWYVz7p
@KharchenkoDmitriy
KharchenkoDmitriy force-pushed the fix/combat-frame-visibility branch from ac65c9b to 2254124 Compare September 1, 2026 05:44
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