Repository navigation
Add Show frame toggle to hide unit frames - #98
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:GetSchemaprepends a unit-levelshowntoggle (defaulttrue). It sits outside the component schema, so previews and the style snapshot are untouchedUnits:ApplyShowncalls oUFEnable/Disableon spawn and on everyUnitConfigChanged. In combat it queues throughns.AfterCombat(layout)CopyPlayerSettingskeeps the destination frame's ownshown, so copying a hidden player's style no longer hides the targettests/spec/units/shown_spec.luaand aworkbench-pet-hiddenproof scenarioHow to test
luajit tests/run.lua -j(1087 passed locally)/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 backNotes
Proof
Pet Layout page with Show frame switched off (headless render; the mock leaves the dropdown and slider values blank):