Skip to content

Meta: use refs for tooltips in JSX#9845

Merged
fregante merged 17 commits into
mainfrom
tooltip-better
Jul 18, 2026
Merged

Meta: use refs for tooltips in JSX#9845
fregante merged 17 commits into
mainfrom
tooltip-better

Conversation

@fregante

@fregante fregante commented Jul 17, 2026

Copy link
Copy Markdown
Member

Easier way to add tooltips to any element, without having to break the JSX with <El>{tooltipped('tip', <Inner/>)}</El>

I'd replace all tooltipped() usage but I don't want to have to manually check each instance again:

Plus I have a few components I need to turn into Svelte first:

@github-actions github-actions Bot added the meta Related to Refined GitHub itself label Jul 17, 2026
@fregante
fregante marked this pull request as ready for review July 17, 2026 12:00
@fregante

fregante commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

Tested and it works

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@copilot replace the remaining tooltipped() usage with this new pattern. Don't make any changes to status-subscription.tsx

Addressed in 8a872e3.

@fregante

Copy link
Copy Markdown
Member Author

I realized this pattern also makes it easier to toggle between the two types of tooltipped. I can add a lightweight: true toggle and it would add a class + aria-label instead generating a tool-tip element.

Not now though

@fregante

Copy link
Copy Markdown
Member Author

Yoloing copilot's changes, the util seems to work

@fregante
fregante merged commit c3e947c into main Jul 18, 2026
13 checks passed
@fregante
fregante deleted the tooltip-better branch July 18, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

2 participants