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

Add onPrimary variant to KeybindingHint #5414

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Conversation

iansan5653
Copy link
Contributor

Adds an onPrimary variant to KeybindingHint to close #5351 and improve the appearance of primary button hints:

image

This is a temporary fix until we have a more full-featured design spec for this component, at which point we can implement this in a better manner. I don't really love the onEmphasis/onPrimary variant names, but it's consistent with what's there and doesn't break anything.

Changelog

New

Adds an onPrimary variant to KeybindingHint for use on primary buttons

Changed

Removed

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

@iansan5653 iansan5653 requested a review from a team as a code owner December 11, 2024 17:36
@iansan5653 iansan5653 requested a review from TylerJDev December 11, 2024 17:36
Copy link

changeset-bot bot commented Dec 11, 2024

🦋 Changeset detected

Latest commit: 2ab4c4d

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

Uh oh! @iansan5653, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

🤖 Beep boop! This comment was added automatically by github/accessibility-alt-text-bot.

Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Dec 11, 2024
Copy link
Contributor

github-actions bot commented Dec 11, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 102.79 KB (+0.07% 🔺)
packages/react/dist/browser.umd.js 103.12 KB (-0.02% 🔽)

Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

Nice!

args: {keys: 'Mod+Enter', variant: 'onPrimary'},
}

export const DangerButton: StoryObj<KeybindingHintProps> = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't add an onDanger variant since danger buttons have a light resting background that works OK with the current design. Just added a story to demonstrate that

@iansan5653 iansan5653 added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit d44a4cf Dec 11, 2024
42 checks passed
@iansan5653 iansan5653 deleted the keybindinghint-on-primary branch December 11, 2024 19:34
@primer primer bot mentioned this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dark keybinding indicator when used with emphasis
2 participants