Skip to content

Party Frames (oUF SpawnHeader)#137

Draft
danvernon wants to merge 20 commits intoEllesmereGaming:mainfrom
danvernon:feature/party-frames
Draft

Party Frames (oUF SpawnHeader)#137
danvernon wants to merge 20 commits intoEllesmereGaming:mainfrom
danvernon:feature/party-frames

Conversation

@danvernon
Copy link
Contributor

@danvernon danvernon commented Mar 17, 2026

Summary

  • Configurable party frames built on oUF SpawnHeader with existing component builders
  • Health, absorb, power bars, role icons, auras with dispel highlights, range fading, threat, ready check, leader/assist indicators
  • Configurable growth direction (vertical/horizontal), sort order (role/group/alphabetical), spacing, and player inclusion
  • Unlock Mode drag support for the party header anchor
  • CDM integration (native frames checked first in FindPlayerPartyFrame)
  • Blizzard default party frames suppressed when enabled
  • Architecture designed for future raid frame extension

Files Changed

  • EllesmereUIUnitFrames/EllesmereUIPartyFrames.luaNEW (~480 lines)
  • EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua — defaults, mappings, ns exports, spawn call, Unlock Mode
  • EllesmereUIUnitFrames/EllesmereUIUnitFrames.toc — load order
  • EllesmereUI.lua — CDM source priority

Test plan

  • Join a party — frames appear with vertical growth, role-sorted
  • Health/power bars update for party members
  • Role icons display correctly (tank/healer/dps)
  • Range fading dims out-of-range members
  • Unlock Mode — party header is draggable
  • Blizzard party frames are hidden
  • Leave party — frames disappear
  • Toggle enabledFrames.party = false — frames suppressed
  • /partytest — shows frames while solo for testing

Phase 2+ (not in this PR)

  • Options panel UI
  • Castbar on party members
  • Portrait toggle
  • Combat-queued layout updates

@danvernon danvernon force-pushed the feature/party-frames branch from ff52b98 to e08ec18 Compare March 17, 2026 08:31
@danvernon
Copy link
Contributor Author

Debug commands — paste these in-game:

/run local f = EllesmereUIPartyTest; if f then print("exists", "shown:", f:IsShown(), "w:", f:GetWidth(), "h:", f:GetHeight(), "alpha:", f:GetAlpha()) else print("frame nil") end
/run local f = EllesmereUIPartyTest; if f then local p,_,r,x,y = f:GetPoint(); print("pos:", p, r, x, y) end
/run local f = EllesmereUIPartyTest; if f then f:SetPoint("CENTER", UIParent, "CENTER", 0, 0); f:SetSize(160, 40); f:SetAlpha(1); f:Show(); print("forced visible at center") end

Paste the chat output back here.

@danvernon
Copy link
Contributor Author

Status: Party frames are working!

The frame is rendering correctly — health bar, name text, portrait, power bar all visible.

Issues from the screenshots:

  1. Party Frames mover is at -666, -2 — it got dragged off-screen left. Fix: enter Unlock Mode (/unlock), find the "Party Frames" mover and drag it where you want, then exit Unlock Mode. Or reset position:
/run EllesmereUIUnitFramesDB.profiles.Default.positions.party = { point = "TOPLEFT", x = 20, y = -200 }; ReloadUI()
  1. Portrait showing despite default off — the showPortrait = false default is correct but the global portraitStyle is not "none", so the check settings.showPortrait ~= false evaluates to false which should hide it. If portrait is still showing, run:
/run EllesmereUIUnitFramesDB.profiles.Default.party.showPortrait = false; ReloadUI()
  1. To test properly after fixing position:
  • /partytest to toggle the preview frame on/off
  • Or invite someone to a party to see the real header frames
  1. The duplicate frame on the right was from the forced-center debug command — /partytest to toggle off, then /partytest again for a clean test.

@danvernon
Copy link
Contributor Author

Debug: check if position is saving correctly

After dragging party frames in Unlock Mode and exiting, run:

/run local p = EllesmereUIUnitFramesDB.profiles.Default.positions.party; if p then print("Saved pos:", p.point, p.relPoint, p.x, p.y) else print("No saved position") end

Then /reload and run the same command again to see if it persists.

Also try this to force a known-good position:

/run EllesmereUIUnitFramesDB.profiles.Default.positions.party = { point = "LEFT", relPoint = "LEFT", x = 20, y = 0 }; ReloadUI()

@danvernon
Copy link
Contributor Author

image image

Spec for configurable party frames using oUF SpawnHeader with
existing component builders shared via ns namespace. Covers frame
anatomy, header layout architecture, settings structure, file
organization, CDM integration, and phased implementation plan.
9-task plan covering defaults, settings mappings, ns exports,
StylePartyFrame, SpawnPartyHeader, Unlock Mode, and CDM integration.
Reviewed and fixed: WoW API correctness, ns.PP load-time availability,
RegisterStyle guard, GetSettingsForUnit cache placement.
- Add full party defaults sub-table with layout, text, aura, threat,
  range-fade, growth direction, sort order, and spacing settings
- Add party = true to enabledFrames
- Add party position to positions table
- Include "party" in opacity normalization UNITS list
- Map "party1"-"party4" to the "party" settings key in UnitToSettingsKey
- Add party1-party4 and "party" entries to the lazy-init unitSettingsMap
- Export ns.PP for PixelPerfect access from party/raid files
- Export 17 builder/utility functions (CreateHealthBar, CreatePowerBar,
  CreateCastBar, CreateUnifiedBorder, ApplyFramePosition, etc.)
- Set ns.db after DB initialization so party file can access profile
- Export ns.frames for cross-file frame references
- Export ns.SetupUnitMenu inside spawn function scope
…nd SpawnPartyHeader

Core party frames implementation:
- StylePartyFrame: health, absorb, power, portrait, border, text,
  role icon, auras with dispel highlights, range fade, threat,
  ready check, leader/assist, resurrect, summon indicators
- SpawnPartyHeader: oUF header with configurable growth direction,
  sort order, spacing, and showPlayer toggle
- UpdatePartyLayout: out-of-combat layout attribute updates
Task 6: Call ns.SpawnPartyHeader() after boss frame hiding loop,
guarded by an existence check so it's safe when the party module
isn't loaded.

Task 7: Register party frames with Unlock Mode system:
- Add "party" to UNIT_LABELS
- Route getFrame to ns.partyHeader
- Compute getSize from party profile settings
- Block setWidth/setHeight (not individually resizable)
- Add savePos/applyPos branches for ns.partyHeader
- Register MakeUFElement("party", 8) after boss
EllesmereUI party frames checked first, before ElvUI/Cell/Blizzard fallbacks.
…rames

- UpdatePartyLayout now always sets all three sort attributes (groupBy,
  groupingOrder, sortMethod) with nil to clear stale values when switching
  between sort modes
- Hide Blizzard CompactPartyFrame and PartyFrame when EUI party frames
  are enabled, preventing overlap
Toggles test mode that shows party frames when solo by overriding
showSolo and visibility driver. Type /partytest again to restore
normal behavior.
…bility

- StylePartyFrame now falls back to frame attribute or "player" when
  oUF calls it before a unit is assigned
- /partytest unregisters the old driver before registering the new one
  and uses a macro conditional that lets the secure header properly
  assign units before styling frames
oUF ouf.lua:270 calls objectUnit:match() which crashes when both
the unit parameter and oUF-guessUnit attribute are nil. This happens
in solo test mode when the header creates frames with no real party
member. Set a 'party' fallback in the initialConfigFunction.
… header

The SecureGroupHeader's showSolo triggers oUF initObject with a nil
unit which crashes at ouf.lua:270. Instead, spawn a standalone oUF
frame with the party style using the player unit — bypasses the
header entirely for preview purposes.
… table

oUF.styles doesn't exist (styles is a local table), so the guard
always passed and tried to re-register. Use ns._partyStyleRegistered
flag instead. Also remove redundant registration attempt from /partytest.
oUF overrides frame:RegisterEvent to require (event, func) signature.
Previous code used Blizzard-style single-arg registration which passed
nil as the callback.
GROUP_ROSTER_UPDATE and PLAYER_ROLES_ASSIGNED are not unit events,
oUF requires the third arg = true to register them.
The SecureGroupHeader hides when solo, which breaks Unlock Mode
positioning (hidden frame reports wrong position). Added a persistent
partyAnchor frame that holds the saved position; the header attaches
to it. Unlock Mode now drags/saves via the anchor.
Test frame was anchoring to partyHeader which is hidden when solo,
causing the test frame to not display.
@danvernon danvernon force-pushed the feature/party-frames branch from e09566b to e910cb5 Compare March 21, 2026 09:29
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