Skip to content

Add Show frame toggle to hide unit frames - #98

Merged
voshond merged 2 commits into
mainfrom
feature-hide-unit-frames
Nov 12, 2026
Merged

voshond merged 2 commits into
mainfrom
feature-hide-unit-frames

Conversation

@voshond

@voshond voshond commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

Every unit frame (player, pet, target, target of target, focus, focus target) gets a Show frame toggle, on by default, at the top of its Layout page. Off drops oUF's unit watch, so the game never shows that frame. You can now get rid of a frame you don't want without disabling the addon.

What Changed

  • Units:GetSchema prepends a unit-level shown toggle (default true). It sits outside the component schema, so previews and the style snapshot are untouched
  • Units:ApplyShown calls oUF Enable/Disable on spawn and on every UnitConfigChanged. In combat it queues through ns.AfterCombat (layout)
  • CopyPlayerSettings keeps the destination frame's own shown, so copying a hidden player's style no longer hides the target
  • New tests/spec/units/shown_spec.lua and a workbench-pet-hidden proof scenario

How to test

  • luajit tests/run.lua -j (1087 passed locally)
  • In game: /uf wb → Player Pet → Layout & Border → untick Show frame. The pet frame disappears, or after combat if you're fighting. Tick it again and it comes back

Notes

  • Not added to the Edit Mode quick settings on purpose: a hidden frame has no Edit Mode selection, so the toggle there couldn't turn it back on. The Workbench is the way back

Proof

Pet Layout page with Show frame switched off (headless render; the mock leaves the dropdown and slider values blank):

workbench-pet-hidden

Layout page gets a default-on Show frame toggle for every unit frame. Off drops oUF's unit watch (deferred until combat ends); copying the player style keeps each frame's own visibility.
Renders the pet's Layout settings with Show frame switched off.
@voshond voshond self-assigned this Nov 12, 2026
@voshond
voshond merged commit 334164a into main Nov 12, 2026
1 check passed
@voshond
voshond deleted the feature-hide-unit-frames branch November 12, 2026 00:07
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