-
Notifications
You must be signed in to change notification settings - Fork 1.1k
USWDS - Core: Replace receptor library "keymap" with custom implementation #6174
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be working great @aduth ! The simple replacement in each of the component JS files is a good sign.
I left a few comments for added clarity. Some of the unit test descriptions were confusing to me. I added some suggestions but let me know if I'm off base. Hopefully we can improve their readability a bit so users can understand easily.
Open to other suggestions as well!
4167c08
to
eebd3f8
Compare
@mahoneycm re-requesting review to confirm your comments have been addressed. |
eebd3f8
to
4539fd0
Compare
@aduth I left one more suggestion for the direction of the test descriptions! Apologies for not getting back to you sooner. Thank you for your continued support and input 🙏 |
Co-authored-by: Charlie Mahoney <charlie.mahoney@bixal.com>
@mahoneycm Thanks for the re-review. I applied the latest suggestions from the review threads. Let me know if there are others you'd still like to see updated from the unresolved threads. |
@mlloydbixal Adding you as a reviewer for this to get us unblocked on #6291 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aduth Ok last batch of suggestions to make the existing tests match the new convention and to remove a duplicate test for unexpected modifiers in keypress!
After this we should be good to go
Co-authored-by: Charlie Mahoney <charlie.mahoney@bixal.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks so much @aduth 👍
Summary
Reduced the JavaScript bundle size. By optimizing the implementation of core component code, overall JavaScript sizes are reduced.
Breaking change
This is not a breaking change.
Related pull requests
Split from #5793, to simplify review.
Includes additional inline code comments based on review feedback from that pull request.
Preview link
N/A
Problem statement
See #5793
Solution
Replace use of
receptor/keymap
with equivalent custom implementation.Testing and review
Verify unit tests pass:
For user acceptance testing, Modal is a good component to test for regressions, since its focus trap includes both simple key mapping (Tab) as well as modifier combinations (Shift+Tab).