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

feat(keyboard-key): create package #4136

Merged
merged 42 commits into from
Nov 13, 2024
Merged

feat(keyboard-key): create package #4136

merged 42 commits into from
Nov 13, 2024

Conversation

krisantrobus
Copy link
Collaborator

This pull request introduces a new KeyboardKey component. It's purpose is to display visual indicators for keyboard shortcuts available to users.

Copy link

stackblitz bot commented Nov 4, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
paste-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 5:22pm
paste-remix ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 5:22pm

Copy link

changeset-bot bot commented Nov 4, 2024

🦋 Changeset detected

Latest commit: 7ce2925

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

This PR includes changesets to release 4 packages
Name Type
@twilio-paste/codemods Minor
@twilio-paste/core Minor
@twilio-paste/design-tokens Minor
@twilio-paste/keyboard-key Major

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

changeset-bot bot commented Nov 4, 2024

🦋 Changeset detected

Latest commit: bff42f7

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

This PR includes changesets to release 7 packages
Name Type
@twilio-paste/codemods Minor
@twilio-paste/core Major
@twilio-paste/design-tokens Patch
@twilio-paste/keyboard-key Major
@twilio-paste/theme-designer Patch
@twilio-paste/token-contrast-checker Patch
@twilio-paste/nextjs-template 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

@krisantrobus krisantrobus marked this pull request as draft November 4, 2024 17:53
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 4, 2024
@@ -59,11 +58,11 @@ export interface KeyboardKeyProps extends HTMLPasteProps<"div"> {
* @type string
* @memberof KeyboardKeyProps
*/
keyText?: string;
keyEvent?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggestion (non-blocking): maybe add to the description comment here that the docs have a chart of usable keyEvents? or a link to the map that you were using at one point?

slash would it make sense to limit the type of keyEvent from string to an actual list of usable key codes? I'm guessing no for scalability, but wanted to ask

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A really great suggestion. Pushing up the comment update. We can use the event.which which is the code number. It's something I feel developers would be more used to but it changes based on browser as mentioned in the link to the table. It is also deprecated so browsers at some point in the future may stop returning that field.

nkrantz
nkrantz previously approved these changes Nov 12, 2024
Copy link
Collaborator

@nkrantz nkrantz left a comment

Choose a reason for hiding this comment

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

Very nice changes, thanks for incorporating all the feedback!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 12, 2024
serifluous
serifluous previously approved these changes Nov 12, 2024
Copy link

cypress bot commented Nov 13, 2024

Paste    Run #9047

Run Properties:  status check passed Passed #9047  •  git commit 821bacfe54 ℹ️: Merge 7ce29252297553c34d5829940be7b4d97a564f43 into 65d60549287436daf2f752dd142d...
Project Paste
Branch Review create-keyboard-key
Run status status check passed Passed #9047
Run duration 06m 05s
Commit git commit 821bacfe54 ℹ️: Merge 7ce29252297553c34d5829940be7b4d97a564f43 into 65d60549287436daf2f752dd142d...
Committer krisantrobus
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 125
View all changes introduced in this branch ↗︎

@kodiakhq kodiakhq bot merged commit a4404ea into main Nov 13, 2024
46 checks passed
@kodiakhq kodiakhq bot deleted the create-keyboard-key branch November 13, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Components Related to the component library (core) of this system Area: Core bundle Area: Infrastructure Related to our infrastructure and build tools Area: Primitives Area: Repo Area: Tokens Comments and questions related to tokens lgtm This PR has been approved by a maintainer 🚀 merge it! 🕵🏻‍♀️ Run website visual regression When applied, we will run a full suite of visual regression tests across the doc site size:XXL This PR changes 1000+ lines, ignoring generated files. Type: Tests Adds tests to the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants