Skip to content

Fix character-sheet socket strip overflowing with many gems - #2109

Open
dfrisone wants to merge 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/socket-panel-overflow
Open

dfrisone wants to merge 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/socket-panel-overflow

Conversation

@dfrisone

@dfrisone dfrisone commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes Stickybackpack's report that characters with seven or more equipped sockets have a socket strip that expands beyond the character sheet.

Six or fewer sockets keep their existing layout. Larger counts show five sockets per page with previous/next arrows, bounded to the existing six-icon width (188 UI units). Paging preserves each socket's equipment slot and socket index, closes the old gem flyout, and clamps the current page when equipment is removed. The final page keeps the same width so the durability footer stays in place.

The arrows are created only on first overflow. Page changes reuse cached socket records and pooled icons without rescanning inventory. Includes the two generated locale keys; no new settings or socketing APIs.

How was it tested?

  • User tested the change in game and confirmed: "Looks good in game." Exact client build and individual scenarios were not recorded; live/PTR status is unverified.
  • Offline Lua 5.1 harness compiled the complete source file and exercised the production layout functions with UI stubs: 10,379 assertions passed for counts 0-64, every page, socket identity/reachability, bounds, arrow states, pooling, flyout closure, and gear removal. These checks do not simulate the WoW client or actual socketing.
  • EUI diff-scoped style gate and git diff --check passed. Locale keys regenerated.
  • Review confirmed no added events, timers, polling, per-frame allocations, or writes to Blizzard-owned frames. Existing gem-flyout outside-click dismissal is preserved: when it is open, the first outside click dismisses it before a subsequent arrow click changes pages.

Screenshots

Before/after screenshots are missing. The user confirmed the appearance in game, but no screenshots were supplied.

Checklist

  • New settings default OFF (no behavior change without opt-in) - N/A: no new settings; this is a socket-strip overflow bug fix.
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built - no new work while disabled; arrows are built lazily on first overflow within the existing enabled panel lifecycle.
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) - bounded layout on existing rebuilds and page clicks.
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames - new scripts and fields belong only to addon-owned controls; weak-table storage is N/A for this change.
  • Tested in-game on live; no version gates or pre-Midnight APIs added - user confirmed in-game testing, but the exact build and live environment were not recorded. No version gates or pre-Midnight APIs added; targets Midnight 12.1+.

A cat fitting into a box

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