Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IconButton: Add keyshortcuts prop to allow labelling and describing support for keyboard shortcut (through tooltips) #4707

Merged
merged 11 commits into from
Jul 11, 2024

Conversation

broccolinisoup
Copy link
Member

@broccolinisoup broccolinisoup commented Jul 1, 2024

This PR proposes an addition to the icon button API as it is accepted on https://github.com/github/primer/pull/2650 (internal link only). The keyshortcuts prop is added to the IconButton component to allow labelling and describing support for keyboard shortcuts through tooltips. This change is beneficial as it provides a more accessible user experience.

Changelog

New

  • Add keyshortcuts prop to icon buttons

Changed

  • Rendered HTML when keyshortcuts prop is present (Only when tooltips are enabled which will be the default behaviour very soon)

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: 7974ffb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jul 1, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 91.21 KB (+0.07% 🔺)
packages/react/dist/browser.umd.js 91.46 KB (-0.03% 🔽)

@broccolinisoup broccolinisoup changed the title Add keyboard shortcut labelling and describing support for icon buttons (through tooltip) IconButton: Add keyshortcuts prop to allow labelling and describing support for keyboard shortcut (through tooltips) Jul 1, 2024
@broccolinisoup broccolinisoup marked this pull request as ready for review July 1, 2024 03:01
@broccolinisoup broccolinisoup requested a review from a team as a code owner July 1, 2024 03:01
@github-actions github-actions bot temporarily deployed to storybook-preview-4707 July 1, 2024 03:02 Inactive
@primer primer bot requested a review from a team as a code owner July 1, 2024 03:08
@primer primer bot temporarily deployed to github-pages July 1, 2024 03:12 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-4707 July 1, 2024 03:12 Inactive
@primer-integration
Copy link

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/332131

@broccolinisoup broccolinisoup added this pull request to the merge queue Jul 11, 2024
Merged via the queue into main with commit d773f26 Jul 11, 2024
30 checks passed
@broccolinisoup broccolinisoup deleted the icon-button-keyshortcuts branch July 11, 2024 16:45
@primer primer bot mentioned this pull request Jul 10, 2024
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.

3 participants