react icon indicating copy to clipboard operation
react copied to clipboard

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

Open broccolinisoup opened this issue 1 year ago • 2 comments

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
  • [x] 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

  • [ ] Added/updated tests
  • [ ] Added/updated documentation
  • [ ] Added/updated previews (Storybook)
  • [ ] Changes are SSR compatible
  • [ ] Tested in Chrome
  • [ ] Tested in Firefox
  • [ ] Tested in Safari
  • [ ] Tested in Edge
  • [ ] (GitHub staff only) Integration tests pass at github/github (Learn more about how to run integration tests)

broccolinisoup avatar Jul 01 '24 02:07 broccolinisoup

🦋 Changeset detected

Latest commit: 7974ffb2a844dd9db2887c73124a83650ef1561f

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

changeset-bot[bot] avatar Jul 01 '24 02:07 changeset-bot[bot]

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% 🔽)

github-actions[bot] avatar Jul 01 '24 02:07 github-actions[bot]

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

primer-integration[bot] avatar Jul 09 '24 04:07 primer-integration[bot]