Skip to content

Remove gap between buff bars and external defensives when some buff bars are hidden#100

Merged
argium merged 6 commits into
mainfrom
copilot/fix-external-defensive-gap
May 17, 2026
Merged

Remove gap between buff bars and external defensives when some buff bars are hidden#100
argium merged 6 commits into
mainfrom
copilot/fix-external-defensive-gap

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

Remove gap between buff bars and external defensives when some buff bars are hidden. Hidden bars still reserved space in the viewer leading to a visible gap.

Copilot AI linked an issue May 17, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix gap below external defensives for hidden buff bars Remove external-defensives gap caused by hidden buff bars in chained layout May 17, 2026
Copilot finished work on behalf of argium May 17, 2026 14:50
Copilot AI requested a review from argium May 17, 2026 14:50
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 17, 2026

Test Results

896 tests  ±0   896 ✅ ±0   2s ⏱️ ±0s
  5 suites ±0     0 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 21726c4. ± Comparison against base commit a556c7b.

This pull request removes 27 and adds 27 tests. Note that renamed tests count towards both.
Tests/Modules.BuffBars_spec_lua:1029 ‑ BuffBars real source styleBarHeight propagates height to frame, bar, and icon
Tests/Modules.BuffBars_spec_lua:1039 ‑ BuffBars real source styleBarHeight uses module config height when provided
Tests/Modules.BuffBars_spec_lua:1048 ‑ BuffBars real source styleBarBackground applies background color and texture
Tests/Modules.BuffBars_spec_lua:1077 ‑ BuffBars real source styleBarColor applies spell color to the status bar
Tests/Modules.BuffBars_spec_lua:1103 ‑ BuffBars real source styleBarColor schedules retry when all identifiers are secret
Tests/Modules.BuffBars_spec_lua:1112 ‑ BuffBars real source styleBarColor fills timeless aura bars solid
Tests/Modules.BuffBars_spec_lua:1125 ‑ BuffBars real source styleBarColor does not compare secret status bar values when checking for timeless auras
Tests/Modules.BuffBars_spec_lua:1142 ‑ BuffBars real source styleBarColor keeps the background solid after Blizzard refreshes a timeless aura
Tests/Modules.BuffBars_spec_lua:1160 ‑ BuffBars real source styleBarColor does not call Blizzard cooldown data methods while styling
Tests/Modules.BuffBars_spec_lua:1178 ‑ BuffBars real source styleBarIcon hides icon when showIcon is false
…
Tests/Modules.BuffBars_spec_lua:1041 ‑ BuffBars real source styleBarHeight propagates height to frame, bar, and icon
Tests/Modules.BuffBars_spec_lua:1051 ‑ BuffBars real source styleBarHeight uses module config height when provided
Tests/Modules.BuffBars_spec_lua:1060 ‑ BuffBars real source styleBarBackground applies background color and texture
Tests/Modules.BuffBars_spec_lua:1089 ‑ BuffBars real source styleBarColor applies spell color to the status bar
Tests/Modules.BuffBars_spec_lua:1115 ‑ BuffBars real source styleBarColor schedules retry when all identifiers are secret
Tests/Modules.BuffBars_spec_lua:1124 ‑ BuffBars real source styleBarColor fills timeless aura bars solid
Tests/Modules.BuffBars_spec_lua:1137 ‑ BuffBars real source styleBarColor does not compare secret status bar values when checking for timeless auras
Tests/Modules.BuffBars_spec_lua:1154 ‑ BuffBars real source styleBarColor keeps the background solid after Blizzard refreshes a timeless aura
Tests/Modules.BuffBars_spec_lua:1172 ‑ BuffBars real source styleBarColor does not call Blizzard cooldown data methods while styling
Tests/Modules.BuffBars_spec_lua:1190 ‑ BuffBars real source styleBarIcon hides icon when showIcon is false
…

♻️ This comment has been updated with latest results.

Copilot finished work on behalf of argium May 17, 2026 23:02
@argium argium marked this pull request as ready for review May 17, 2026 23:03
Copilot AI review requested due to automatic review settings May 17, 2026 23:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a layout bug where the BuffBarCooldownViewer reserved space for hidden buff bars in chained-layout mode, leaving a visible gap before subsequent modules (e.g. external defensives). The fix counts only currently shown child bars when sizing the viewer height, and prefers the module-level cfg.height over the global barHeight fallback.

Changes:

  • Count only IsShown() child bars and explicitly set the viewer height with FrameUtil.LazySetHeight based on shownChildCount and verticalSpacing.
  • Use module-level cfg.height when present, falling back to globalConfig.barHeight.
  • Extend test setup to stub LazySetHeight and assert the computed height (21 for a single shown bar with cfg.height = 21).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Modules/BuffBars.lua Tracks shown child count during styling and sizes the viewer height from shown bars + spacing using module height override.
Tests/Modules/BuffBars_spec.lua Stubs LazySetHeight in chain/free-mode harnesses and asserts viewer height honors cfg.height.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b980d1cca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Modules/BuffBars.lua
end
ns.DebugAssert(ok, "Error styling buff bars: " .. tostring(err))

local barHeight = (cfg and cfg.height) or globalConfig.barHeight or 0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard missing global config when sizing the viewer

When GetGlobalConfig() returns nil, for example during an early or partially initialized profile/layout pass where ShouldShow() can still be true from the module config, this new height calculation indexes globalConfig.barHeight outside the existing pcall and turns the layout into an uncaught Lua error. The rest of this path and similar sizing code use (globalConfig and globalConfig.barHeight) or a default, so keep the same guard here before falling back.

Useful? React with 👍 / 👎.

Copilot finished work on behalf of argium May 17, 2026 23:18
@argium argium changed the title Remove external-defensives gap caused by hidden buff bars in chained layout Remove gap between buff bars and external defensives when some buff bars are hidden May 17, 2026
@argium argium merged commit 9591303 into main May 17, 2026
2 checks passed
@argium argium deleted the copilot/fix-external-defensive-gap branch May 17, 2026 23:31
argium added a commit that referenced this pull request May 19, 2026
…ars are hidden (#100)

Remove gap between buff bars and external defensives when some buff bars
are hidden. Hidden bars still reserved space in the viewer leading to a
visible gap.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: argium <15852038+argium@users.noreply.github.com>
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.

External defensives can have a gap below the buff bars

3 participants