Repository navigation
Conversation
Tooltip's Kobalte trigger renders as a div, which the HTML content model forbids inside buttons. triggerAs lets a call site request a span trigger; upcoming tab-group badges use it to show the project name on hover from inside their header buttons.
This was referenced Oct 21, 2026
Contributor
There was a problem hiding this comment.
The change looks sound. It's additive, and with the default (div) existing tooltips render and behave as before. packages/ui type-checks with it. The ref is only used through HTMLElement methods, so widening its type is safe. The trigger's display: flex rule applies the same to a span, so layout shouldn't shift. I didn't render it, because nothing in the app uses the prop yet. Its only user is #57896, so it may be easiest to land the two together.
Public API: none affected. It adds an optional triggerAs?: "div" | "span" prop to the internal UI Tooltip component (backwards compatible); SDK, server, plugin, config and CLI are unchanged.
Related: #55446
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.
Issue for this PR
Refs #55446 — small prep change for the tab-grouping PR that follows.
Type of change
What does this PR do?
Tooltip's Kobalte trigger renders as adiv, which the HTML content model forbids inside buttons. This adds an optionaltriggerAsprop so a call site can request aspantrigger instead, and types the trigger ref asHTMLElementaccordingly.Nothing in the app uses it yet. The follow-up tab-grouping PR needs it: the horizontal group badge shows its project name on hover, and the trigger has to live inside the header button (wrapping the button itself would trip the tooltip component's expanded-disclosure suppression).
How did you verify your code works?
bun typecheckinpackages/uiandbun run checkat the repo root, both green.divdefault, so existing call sites are untouched.Screenshots / recordings
Non-visual API addition.
Checklist
Added by the opencode bot (AI-generated).
Related: #55446