Meta: Add more tooltips with shortcuts by fregante · Pull Request #9738 · refined-github/refined-github · GitHub
Skip to content

Meta: Add more tooltips with shortcuts#9738

Merged
fregante merged 5 commits into
mainfrom
byo-prefer-tooltipped
Jun 16, 2026
Merged

Meta: Add more tooltips with shortcuts#9738
fregante merged 5 commits into
mainfrom
byo-prefer-tooltipped

Conversation

@fregante

@fregante fregante commented Jun 15, 2026

Copy link
Copy Markdown
Member

I'll also consider undoing #9451 partially since aria-label is lighter than tooltipped() and is preferable in cases where there's no hotkey/focus/overlap issues.

@github-actions github-actions Bot added the meta Related to Refined GitHub itself label Jun 15, 2026
Comment thread source/features/releases-tab.tsx Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not enough tho

Image

},{
message: 'JSX elements with `data-hotkey` must be wrapped in `tooltipped()`',
selector:
'JSXOpeningElement:not(:has(JSXAttribute[name.name="hidden"])) > JSXAttribute[name.name="data-hotkey"]:not(CallExpression[callee.name="tooltipped"] JSXAttribute[name.name="data-hotkey"])',

@fregante fregante Jun 15, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One requires tooltipped as a parent, the other blocks title/aria-label specifically. The previous Program:has() selector did not work and is not supported by eslint.

Image

Does not apply to addTooltip because we already specifically ask not to use addTooltip with JSX

Attaches a tooltip to an existing element. Don't use this with JSX.
@example addTooltip('Does something', $('.some-existing-button'))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved! 🙌

@fregante fregante marked this pull request as ready for review June 16, 2026 08:16
@fregante fregante enabled auto-merge (squash) June 16, 2026 08:18
@fregante fregante merged commit 5f38877 into main Jun 16, 2026
12 checks passed
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.

Refactor ideas

1 participant