react icon indicating copy to clipboard operation
react copied to clipboard

ActionListItem: Better handle modifier keys

Open tmelliottjr opened this issue 1 year ago • 3 comments

Closes #4194

Changelog

  • Updated the handling of keyboard events within the ActionListItem component. Previously, onKeyPress was used. This has been replaced with onKeyDown to move away from now deprecated APIs.
  • Additionally, instead of checking the produced character value in event.key, these changes now use event.code to check the actual key pressed.

New

N/A

Changed

N/A

Removed

N/A

Rollout strategy

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

Using macOS, using Option + Space should now results in correct functionality.

Merge checklist

  • [x] Added/updated tests
  • [ ] Added/updated documentation
  • [x] Added/updated previews (Storybook)
  • [x] Changes are SSR compatible
  • [x] 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)

tmelliottjr avatar Feb 02 '24 16:02 tmelliottjr

🦋 Changeset detected

Latest commit: f6f32ea70e405a96d1a2ec7cb2d1956a19080e0f

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 Patch

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 Feb 02 '24 16:02 changeset-bot[bot]

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 113 KB (-0.01% 🔽)
packages/react/dist/browser.umd.js 113.67 KB (+0.02% 🔺)

github-actions[bot] avatar Feb 02 '24 16:02 github-actions[bot]

@broccolinisoup I haven't had a chance to come back to this, but the last I saw this had CI errors. Which it doesn't now... 😕

I looked at it briefly when it was failing and it seemed that my changes adding the keydown handler had inadvertently affected the AutoComplete component.

tmelliottjr avatar Feb 07 '24 21:02 tmelliottjr

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

github-actions[bot] avatar May 05 '24 20:05 github-actions[bot]