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

Update Badge tokens #11275

Merged
merged 10 commits into from
Dec 13, 2023
Merged

Update Badge tokens #11275

merged 10 commits into from
Dec 13, 2023

Conversation

yurm04
Copy link
Contributor

@yurm04 yurm04 commented Dec 4, 2023

WHY are these changes introduced?

Fixes https://github.com/Shopify/polaris-internal/issues/1066

WHAT is this pull request doing?

  • Updated semantic tokens in polaris-tokens
  • Creating two new badge specialty tokens
  • Updating Badge to use new tokens
Before After
capture-448f740d capture-c81386f5

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

🎩 checklist

@yurm04 yurm04 requested review from a team and heyjoethomas December 4, 2023 19:44
@lgriffee
Copy link
Member

lgriffee commented Dec 4, 2023

Adding this comment just for project documentation purposes:

Before After
capture-448f740d capture-d1e10430

Copy link
Member

@lgriffee lgriffee left a comment

Choose a reason for hiding this comment

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

✨🎉

polaris-tokens/src/themes/base/color.ts Outdated Show resolved Hide resolved
polaris-tokens/src/themes/base/color.ts Outdated Show resolved Hide resolved
polaris-tokens/src/themes/base/color.ts Outdated Show resolved Hide resolved
.changeset/light-flowers-pay.md Outdated Show resolved Hide resolved
Copy link
Contributor

@heyjoethomas heyjoethomas left a comment

Choose a reason for hiding this comment

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

The default badge should not be teal. This screen should show each badge and value.

@bernardojoaogarcia
Copy link

It seems like the default badge and the enabled badge got the same token changes as the new badge. We need to create 2 tokens for the new badge with the teal color values, and then swap the fill-transparent-secondary and the text-secondary tokens that are specifically mapped to the new badge. No changes are being made to the default badge or the enabled badge.

@bernardojoaogarcia
Copy link

bernardojoaogarcia commented Dec 6, 2023

  1. Token value changes

Info badge
fill-info-secondary Azure 4 -> Azure 5
text-info Azure 14 -> Azure 15

Success badge
fill-success-secondary Green 3 -> Green 4

Caution badge
fill-caution-secondary Yellow 4 -> Yellow 5

Critical badge
fill-critical-secondary Red 6 -> Red 7

  1. Create new token

New Badge (Specialty tokens)
*create 2 new specialty tokens for the new badge:
badge-new-bg-fill = Teal 5
badge-new-text = Teal 14

  1. Swap New badge tokens

fill-transparent-secondary -> badge-new-bg-fill
text-secondary -> badge-new-text

@yurm04
Copy link
Contributor Author

yurm04 commented Dec 6, 2023

Sorry gang, I misinterpreted the original issue. I read everything as "new badge tokens" instead of "New Badge" tokens and updated everything to the new tokens instead of just the toneNew class. This is not the first time i've made that mistake and it probably won't be the last 🤦 Thanks for catching

Updated PR and screenshots in the description.

Copy link
Member

@alex-page alex-page left a comment

Choose a reason for hiding this comment

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

Seems legit to me. Just would get @bernardojoaogarcia to double check the design changes. Awesome work @yurm04 🚀

Copy link

@bernardojoaogarcia bernardojoaogarcia left a comment

Choose a reason for hiding this comment

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

Thanks @yurm04 ✨🚀

@yurm04 yurm04 dismissed heyjoethomas’s stale review December 8, 2023 21:16

another UXer approved

@yurm04
Copy link
Contributor Author

yurm04 commented Dec 8, 2023

thanks, @bernardojoaogarcia! could you also review and accept the changes in chromatic? I think that's the last task before we can merge this in

@bernardojoaogarcia
Copy link

@yurm04 Looking through some of the changes in chromatic I noticed that we are currently using the new badge on the Nav! I’m pretty sure we wouldn’t want this type of styling in the nav, so I need to first assess whether 1. we should change the nav badges to default badges or 2. revert the new badge tokens to the original color and keep them visually the same as the default badges. Let's figure out the new badge first before proceeding. This flew under the radar because they currently have the exact same visual representation. @yesenia-perezcruz @sarahill

Screenshot 2023-12-08 at 4 53 59 PM

@bernardojoaogarcia
Copy link

bernardojoaogarcia commented Dec 12, 2023

After chatting with @sarahill, we figured it’s probably a good call to ditch the new badge tweaks in this PR and just roll back to the original tokens it used. The new badge requires more digging and possibly a new Gen3 pattern to go with it that holistically covers New features. @yurm04

@bernardojoaogarcia
Copy link

bernardojoaogarcia commented Dec 12, 2023

We should just omit steps 2 & 3 of this issue :).

@yurm04 yurm04 requested a review from alex-page December 13, 2023 16:55
@yurm04
Copy link
Contributor Author

yurm04 commented Dec 13, 2023

@bernardojoaogarcia I updated with the new changes for your review

Copy link

@bernardojoaogarcia bernardojoaogarcia left a comment

Choose a reason for hiding this comment

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

Nice, thank you! @yurm04 ✨ 🙏

Copy link
Member

@lgriffee lgriffee left a comment

Choose a reason for hiding this comment

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

@yurm04 yurm04 merged commit 4a7e090 into main Dec 13, 2023
8 checks passed
@yurm04 yurm04 deleted the ye/update-badge-tokens branch December 13, 2023 19:07
alex-page pushed a commit that referenced this pull request Dec 14, 2023
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @shopify/[email protected]

### Minor Changes

- [#11275](#11275)
[`4a7e090bc`](4a7e090)
Thanks [@yurm04](https://github.com/yurm04)! - Updated semantic tokens
`fill-info-secondary`, `text-info`, `fill-success-secondary`,
`fill-caution-secondary`, `fill-critical-secondary`.


- [#10958](#10958)
[`5c183e0e1`](5c183e0)
Thanks [@mrcthms](https://github.com/mrcthms)! - Added a live region to
the `Page` `Header` to announce the `title` after navigation changes

### Patch Changes

- [#11338](#11338)
[`4ddba49c4`](4ddba49)
Thanks [@alex-page](https://github.com/alex-page)! - `<Toast>` Fix icon
color to properly inherit the parent color

- Updated dependencies
\[[`4a7e090bc`](4a7e090)]:
    -   @shopify/[email protected]

## @shopify/[email protected]

### Minor Changes

- [#11275](#11275)
[`4a7e090bc`](4a7e090)
Thanks [@yurm04](https://github.com/yurm04)! - Updated semantic tokens
`fill-info-secondary`, `text-info`, `fill-success-secondary`,
`fill-caution-secondary`, `fill-critical-secondary`.

## @shopify/[email protected]

### Patch Changes

- Updated dependencies
\[[`4a7e090bc`](4a7e090)]:
    -   @shopify/[email protected]
    -   @shopify/[email protected]

## @shopify/[email protected]

### Patch Changes

- Updated dependencies
\[[`4a7e090bc`](4a7e090)]:
    -   @shopify/[email protected]

## [email protected]

### Patch Changes

- Updated dependencies
\[[`4a7e090bc`](4a7e090)]:
    -   @shopify/[email protected]

## [email protected]

### Patch Changes

- [#11334](#11334)
[`ebff4315b`](ebff431)
Thanks [@sarahill](https://github.com/sarahill)! - Added color token
documentation

- Updated dependencies
\[[`4ddba49c4`](4ddba49),
[`4a7e090bc`](4a7e090),
[`5c183e0e1`](5c183e0)]:
    -   @shopify/[email protected]
    -   @shopify/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this pull request Apr 22, 2024
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Open it as a draft if it’s a work in progress
-->

### WHY are these changes introduced?

Fixes https://github.com/Shopify/polaris-internal/issues/1066

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?
* Updated semantic tokens in `polaris-tokens`
* Creating two new `badge` specialty tokens
* Updating `Badge` to use new tokens

| Before | After |
| -- | -- | 

|![capture-448f740d](https://github.com/Shopify/polaris/assets/21976492/051b4a56-ffc6-45d6-86c7-a0d88ea13eb2)|![capture-c81386f5](https://github.com/Shopify/polaris/assets/4642404/8eb43d0d-5a96-4bde-a1e7-f9c2139cb391)|



<!--
  Summary of the changes committed.

Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.

  Include a video if your changes include interactive content.

If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:

  <details>
    <summary>Summary of your gif(s)</summary>
    <img src="..." alt="Description of what the gif shows">
  </details>
-->

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

### 🎩 checklist

- [ ] Tested a
[snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases)
- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide

---------

Co-authored-by: Laura Griffee <[email protected]>
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.

6 participants