Skip to content

feat(config): add tooltip to category list items in options screen#891

Closed
Cidan wants to merge 2 commits intomainfrom
feat/category-pin-tooltip
Closed

feat(config): add tooltip to category list items in options screen#891
Cidan wants to merge 2 commits intomainfrom
feat/category-pin-tooltip

Conversation

@Cidan
Copy link
Owner

@Cidan Cidan commented Feb 18, 2026

Summary

  • Re-adds the tooltip to category items in the category options list
  • When hovering over a category entry, shows a GameTooltip with the text: "Shift-click to move this category to the pinned category section"
  • Tooltip is shown on OnEnter and hidden on OnLeave
  • Header items are unaffected (they have no OnEnter/OnLeave handlers)

Test plan

  • Open BetterBags options → Categories tab
  • Hover over any non-header category in the list
  • Verify tooltip appears with text: "Shift-click to move this category to the pinned category section"
  • Move mouse away and verify tooltip disappears
  • Verify shift-click still correctly pins the category
  • Verify header entries do not show a tooltip

🤖 Generated with Claude Code

Cidan and others added 2 commits February 17, 2026 16:49
When hovering over a category entry in the category options list,
show a GameTooltip with the text:
  "Shift-click to move this category to the pinned category section"

This re-adds the tooltip that was previously removed, ensuring users
know about the shift-click pinning shortcut. The tooltip is shown via
GameTooltip:SetOwner/SetText/Show in OnEnter, and hidden via
GameTooltip:Hide in OnLeave. Header items are excluded (they already
have no OnEnter/OnLeave handlers).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…list tooltip

The tooltip was not displaying correctly because GameTooltip:SetText() has the
signature SetText(text, r, g, b, alpha, textWrap), but the call was passing only
5 arguments with `true` as the 5th argument. This caused `true` to be interpreted
as the alpha value instead of the textWrap flag, meaning textWrap was absent
(defaulted to false). With long tooltip text and no wrapping, the tooltip text
overflowed off-screen and was effectively invisible.

Fix: add the missing alpha=1 argument so textWrap=true is correctly passed as
the 6th argument:
  GameTooltip:SetText(text, 1, 1, 1, 1, true)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Cidan
Copy link
Owner Author

Cidan commented Feb 18, 2026

Fixed the tooltip not appearing. The root cause was a subtle API signature mismatch in GameTooltip:SetText().

Bug: The call was:

GameTooltip:SetText(text, 1, 1, 1, true)

The actual signature is:

GameTooltip:SetText(text, r, g, b, alpha, textWrap)

The true was being interpreted as the alpha parameter (5th arg), not textWrap (6th arg). With textWrap absent (defaulted to false), the tooltip's long text ("Shift-click to move this category to the pinned category section") was rendered on a single line and extended off-screen, making it invisible.

Fix:

GameTooltip:SetText(text, 1, 1, 1, 1, true)  -- alpha=1, textWrap=true

Note: AddLine() has a different signature (text, r, g, b, textWrap) with no alpha — this inconsistency between SetText and AddLine is a common WoW API footgun.

Cidan added a commit that referenced this pull request Feb 18, 2026
Automated commit generated by the Nanomite code tool.

Prompt:
The previous attempt to add a tooltip to the category list in BetterBags (PR #891) didn't work. The user reports no tooltip is appearing. Task: 1. Re-examine `config/categorypane.lua` and how the category list is implemented. 2. Check if the `OnEnter` and `OnLeave` handlers are actually being triggered on the correct frame. 3. Verify if `GameTooltip` is being used correctly in this context (e.g., is it being obscured, or is the frame not mouse-enabled?). 4. Fix the implementation so the toolt...
Cidan added a commit that referenced this pull request Feb 18, 2026
)

* feat(config): add tooltip to category list items in options screen

When hovering over a category entry in the category options list,
show a GameTooltip with the text:
  "Shift-click to move this category to the pinned category section"

This re-adds the tooltip that was previously removed, ensuring users
know about the shift-click pinning shortcut. The tooltip is shown via
GameTooltip:SetOwner/SetText/Show in OnEnter, and hidden via
GameTooltip:Hide in OnLeave. Header items are excluded (they already
have no OnEnter/OnLeave handlers).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(config): correct GameTooltip:SetText alpha parameter in category list tooltip

The tooltip was not displaying correctly because GameTooltip:SetText() has the
signature SetText(text, r, g, b, alpha, textWrap), but the call was passing only
5 arguments with `true` as the 5th argument. This caused `true` to be interpreted
as the alpha value instead of the textWrap flag, meaning textWrap was absent
(defaulted to false). With long tooltip text and no wrapping, the tooltip text
overflowed off-screen and was effectively invisible.

Fix: add the missing alpha=1 argument so textWrap=true is correctly passed as
the 6th argument:
  GameTooltip:SetText(text, 1, 1, 1, 1, true)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: The previous attempt to add a tooltip to the category lis...

Automated commit generated by the Nanomite code tool.

Prompt:
The previous attempt to add a tooltip to the category list in BetterBags (PR #891) didn't work. The user reports no tooltip is appearing. Task: 1. Re-examine `config/categorypane.lua` and how the category list is implemented. 2. Check if the `OnEnter` and `OnLeave` handlers are actually being triggered on the correct frame. 3. Verify if `GameTooltip` is being used correctly in this context (e.g., is it being obscured, or is the frame not mouse-enabled?). 4. Fix the implementation so the toolt...

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@Cidan Cidan closed this Feb 20, 2026
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

Comments