Skip to content

fix(options): stop dropdown subnav flyouts overlapping and clipping text - #2734

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/dropdown-subnav-flyouts
Oct 16, 2026
Merged

EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/dropdown-subnav-flyouts

Conversation

@dfrisone

@dfrisone dfrisone commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes two display bugs in dropdowns that open submenus. Reported on Forever in Forever Essentials > Macros > Lines > Add Line ("Choose a type"):

  1. Overlapping text. Moving from one category to the next (Spells/Items to Combat & Pet, Targeting to Action Bars & Other) briefly drew both submenus on top of each other. The background is semi-transparent, so both sets of labels showed through.
  2. Text outside the box. The Targeting submenu was narrower than labels like "Target nearest enemy player", so they ran past its right edge.

Cause. In BuildDropdownMenu, leaving a subnav row closes its flyout through CloseFlyoutLater(0.25), but hovering the next row opens that row's flyout straight away. The old flyout stays up under the new one until its timer runs out. Each flyout was also given the closed dropdown's width (menuW), whatever its rows contain.

Fix.

  • Hovering a subnav row hides the menu's other flyouts (menu._flyouts) before showing its own.
  • Each flyout is sized to its widest row: label width plus the row's 10 px inset on each side and the border, plus the icon if the row has one. It is never narrower than menuW, so menus whose labels already fit look the same as before.

This is in the shared widget, so it applies to every dropdown with submenus, not just the macro editor.

How was it tested?

  • Lua 5.1 compile and .tools/guardrails.py --base upstream/main pass.
  • The EllesmereUI style check passes on the changed lines.
  • No EllesmereUI.L strings changed, so _keys.txt is unchanged.
  • Root cause confirmed from the reporter's recording: sampled frames show the previous submenu's rows under the next one, and the Targeting labels overrunning the submenu's edge.
  • Tested in game on the WoW Forever client, comparing upstream main before and after this commit. Before, the Targeting labels run past the submenu's edge. After, the submenu fits its longest label. Not tested on the retail client.

Screenshots

Before: the Targeting labels run past the submenu's right edge.

Before

After: the submenu is as wide as its longest label.

After

The overlap only lasts while moving between categories, so a still screenshot doesn't capture it. It shows in the reporter's recording.

Checklist

  • New settings default OFF (no behavior change without opt-in): N/A. No new settings; this is a bug fix.
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no tickers: N/A. No new registrations, timers or hooks. The width is measured once per row while the menu is built.
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations): hovering loops over the menu's few flyouts and allocates nothing.
  • No writes onto Blizzard-owned frames: only the addon's own pooled dropdown frames are touched.
  • Tested in-game on live; no version gates or pre-Midnight APIs added: no version gates or new APIs (GetStringWidth and SetSize are already used in this file). Tested in game on WoW Forever only, not on the retail client.

Text overlapping

Hovering a subnav row now hides the other flyouts at once instead of
leaving the previous one up for its 0.25s close delay under the new one.
Each flyout is also sized to its widest row, never narrower than the
dropdown, so long child labels stay inside the box.
@EllesmereGaming
EllesmereGaming merged commit a187f61 into EllesmereGaming:main Oct 16, 2026
1 of 2 checks passed
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.

2 participants