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

Refactor "focus-ring" tokens and mixins to support both "active" and "critical" colors #98

Merged
merged 5 commits into from Mar 21, 2022

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Mar 18, 2022

📌 Summary

The Dropdown components has "link" items that have not only action but also critical colors (see #68 for example).
At the moment the "focus-ring" tokens and mixins support only the action

🛠️ Detailed description

In this PR I have:

  • refactored “focus-ring” tokens to support both “action” and “critical“ colors
  • regenerated tokens and CSS helpers in output
  • refactored the “focus-ring” mixins to support both “action” (default) and “critical“ colors
  • updated documentation page for “focus-ring”

Notice: I have bumped the minor change for the @hashicorp/design-system-tokens (despite being a breaking change) and the patch change for the @hashicorp/design-system-components because of the fact that we have not yet released a version 1.0.0 of the packages. I'll take care to open a PR for DevDot to update their codebase and take care of the breaking change (just a matter or renaming a classname in a couple of places).

📸 Screenshots

screenshot_1127


👀 How to review

👉 Review commit-by-commit or by files changed (as you prefer)

Reviewer's checklist:

  • +1 Percy
  • Confirm that PR has a changelog update via Changesets if needed

💬 Please consider using conventional comments when reviewing this PR.


@didoo didoo requested a review from MelSumner March 18, 2022 21:04
@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2022

🦋 Changeset detected

Latest commit: 411cd9b

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

This PR includes changesets to release 2 packages
Name Type
@hashicorp/design-system-tokens Minor
@hashicorp/design-system-components 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

@vercel
Copy link

vercel bot commented Mar 18, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

hds-flight-website – ./

🔍 Inspect: https://vercel.com/hashicorp/hds-flight-website/2oFBmED7Q8bhcp59ovzzg51JcUXZ
✅ Preview: https://hds-flight-website-git-focus-ring-mixin-refactoring-hashicorp.vercel.app

hds-components – ./

🔍 Inspect: https://vercel.com/hashicorp/hds-components/3ukMvcGZa6hzgVkNVJQupdtdfhuS
✅ Preview: https://hds-components-git-focus-ring-mixin-refactoring-hashicorp.vercel.app

@didoo
Copy link
Contributor Author

didoo commented Mar 18, 2022

@MelSumner I have refactored the hds-focus-ring-with-pseudo-element mixin, so you can use it in your Dropdown "link" items (once reviewed/approved/merged you have to pull main in your branch).

@didoo didoo closed this Mar 18, 2022
@didoo didoo deleted the focus-ring-mixin-refactoring branch March 18, 2022 21:11
@didoo didoo restored the focus-ring-mixin-refactoring branch March 21, 2022 09:23
@didoo didoo reopened this Mar 21, 2022
@didoo
Copy link
Contributor Author

didoo commented Mar 21, 2022

Note: re-opened because I deleted the branch by mistake.

Copy link
Contributor

@MelSumner MelSumner left a comment

Choose a reason for hiding this comment

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

This is super useful, thank you for doing this! 👍

@didoo didoo merged commit 7fe1ac1 into main Mar 21, 2022
@didoo didoo deleted the focus-ring-mixin-refactoring branch March 21, 2022 15:28
@github-actions github-actions bot mentioned this pull request Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants