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 Space-0 Token To Have a Unit #9904

Merged
merged 2 commits into from
Aug 8, 2023
Merged

Conversation

benwolfram
Copy link
Contributor

WHY are these changes introduced?

Using a unitless value (aka 0) inside of a calc causes calc to error, thus breaking the CSS rule you are trying to use. Here, I am adding a unit to the value to fix this problem. Per this design tokens format module, values should include units, including 0.

WHAT is this pull request doing?

This is allowing for the space-0 token to be used inside of a calc.

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

I built the tokens package and saw the correct value was outputted in the build file.

--p-space-0:0rem;

Documentation is updated

image

🎩 checklist

@benwolfram benwolfram self-assigned this Aug 8, 2023
@aaronccasanova
Copy link
Member

LGTM 👍 Mind adding a changeset entry with yarn changeset and cutting a snapshot?

@benwolfram
Copy link
Contributor Author

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2023

🫰✨ Thanks @benwolfram! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]

@benwolfram
Copy link
Contributor Author

Should have that now I think @aaronccasanova

@aaronccasanova
Copy link
Member

NPM distribution and Storybook looks good 👍

image

image

@benwolfram benwolfram merged commit 36e4ee8 into main Aug 8, 2023
13 checks passed
@benwolfram benwolfram deleted the update-unitless-zero-spacing branch August 8, 2023 21:40
This was referenced Aug 8, 2023
sam-b-rose pushed a commit that referenced this pull request Aug 15, 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]

### Major Changes

- [#9887](#9887)
[`a3da87e2e`](a3da87e)
Thanks [@lgriffee](https://github.com/lgriffee)! - Removed deprecated
v10 custom properties from stylelint-polaris disallowed lists

### Patch Changes

- Updated dependencies
\[[`36e4ee8af`](36e4ee8)]:
    -   @shopify/[email protected]

## @shopify/[email protected]

### Minor Changes

- [#10042](#10042)
[`1d82a3b12`](1d82a3b)
Thanks [@m4thieulavoie](https://github.com/m4thieulavoie)! - introduce a
subdued prop to the popover pane component


- [#9868](#9868)
[`cb1dbbbd3`](cb1dbbb)
Thanks [@mattkubej](https://github.com/mattkubej)! - Introduce
disableKeyboardShortcuts prop to IndexFilters


- [#9862](#9862)
[`93b902094`](93b9020)
Thanks [@brittcorry](https://github.com/brittcorry)! - Added support for
the ```Filters``closeOnChildOverlayClick``` prop to `IndexFilters`


- [#9872](#9872)
[`f585a57e0`](f585a57)
Thanks [@fatimasajadi](https://github.com/fatimasajadi)! - Add a
critical status to the IndexTable

### Patch Changes

- [#10012](#10012)
[`3ae94cef0`](3ae94ce)
Thanks [@melvinadu](https://github.com/melvinadu)! - Fixed wrapping
overflow of strings with no spacing within `Filters` popover


- [#9889](#9889)
[`0cbdbb4f5`](0cbdbb4)
Thanks [@chloerice](https://github.com/chloerice)! - Set the preferred
position of `Pagination` and `Page` `secondaryActions` button tooltips
to `below`


- [#10045](#10045)
[`65ad4e27c`](65ad4e2)
Thanks [@sophschneider](https://github.com/sophschneider)! - Fixed
BannerExperimental no title hidden icon variant


- [#9885](#9885)
[`f0d288099`](f0d2880)
Thanks [@bsharrow](https://github.com/bsharrow)! - `Aligned
the`SkeletonPage\``title`font-weight with the`Page` title


- [#9860](#9860)
[`af0c9d4a2`](af0c9d4)
Thanks [@sophschneider](https://github.com/sophschneider)! - Updated CI
tests to account for both polarisSummerEditions2023 beta flag states


- [#9874](#9874)
[`5569ac69a`](5569ac6)
Thanks [@chloerice](https://github.com/chloerice)! - Fixed `Page` first
`Header` row misalignment


- [#9850](#9850)
[`57d8d5506`](57d8d55)
Thanks [@kyledurand](https://github.com/kyledurand)! - Rebuilt `Filters`
`SearchField`


- [#8988](#8988)
[`535b3fc91`](535b3fc)
Thanks [@m4thieulavoie](https://github.com/m4thieulavoie)! - Added
support for rendering `Text` `as` a `strong` tag


- [#9912](#9912)
[`00b831292`](00b8312)
Thanks [@samrose3](https://github.com/samrose3)! - Fixed primary Button
styles for Chrome on Android devices

- Updated dependencies
\[[`d1bee0f87`](d1bee0f),
[`36e4ee8af`](36e4ee8)]:
    -   @shopify/[email protected]
    -   @shopify/[email protected]

## @shopify/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @shopify/[email protected]

## @shopify/[email protected]

### Patch Changes

- Updated dependencies
\[[`a3da87e2e`](a3da87e),
[`36e4ee8af`](36e4ee8)]:
    -   @shopify/[email protected]
    -   @shopify/[email protected]

## @shopify/[email protected]

### Patch Changes

- [#9879](#9879)
[`d1bee0f87`](d1bee0f)
Thanks [@kyledurand](https://github.com/kyledurand)! - Optimized some
unoptimized icons

## @shopify/[email protected]

### Patch Changes

- Updated dependencies
\[[`a3da87e2e`](a3da87e),
[`36e4ee8af`](36e4ee8)]:
    -   @shopify/[email protected]
    -   @shopify/[email protected]

## @shopify/[email protected]

### Patch Changes

- [#9904](#9904)
[`36e4ee8af`](36e4ee8)
Thanks [@benwolfram](https://github.com/benwolfram)! - Added a unit to
the `space-0` token

## [email protected]

### Minor Changes

- [#9886](#9886)
[`d85099c89`](d85099c)
Thanks [@lgriffee](https://github.com/lgriffee)! - Updated Polaris
Stylelint version matchups chart

### Patch Changes

- Updated dependencies
\[[`d1bee0f87`](d1bee0f),
[`1d82a3b12`](1d82a3b),
[`36e4ee8af`](36e4ee8),
[`cb1dbbbd3`](cb1dbbb),
[`3ae94cef0`](3ae94ce),
[`0cbdbb4f5`](0cbdbb4),
[`93b902094`](93b9020),
[`65ad4e27c`](65ad4e2),
[`f0d288099`](f0d2880),
[`af0c9d4a2`](af0c9d4),
[`5569ac69a`](5569ac6),
[`f585a57e0`](f585a57),
[`57d8d5506`](57d8d55),
[`535b3fc91`](535b3fc),
[`00b831292`](00b8312)]:
    -   @shopify/[email protected]
    -   @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
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

Using a unitless value (aka `0`) inside of a `calc` causes `calc` to
error, thus breaking the CSS rule you are trying to use. Here, I am
adding a unit to the value to fix this problem. Per [this design tokens
format
module](https://design-tokens.github.io/community-group/format/#dimension),
values should include units, including 0.

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

### WHAT is this pull request doing?

<!--
  Summary of the changes committed.

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

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>
-->

<!-- ℹ️ Delete the following for small / trivial changes -->

This is allowing for the `space-0` token to be used inside of a `calc`.

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development)
🗒 [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)

<!--
  Give as much information as needed to experiment with the component
  in the playground.
-->

I built the tokens package and saw the correct value was outputted in
the build file.

```
--p-space-0:0rem;
```

Documentation is updated

<img width="1374" alt="image"
src="https://github.com/Shopify/polaris/assets/3689812/e251151d-cf8d-416b-92d8-e7501e0a7783">


### 🎩 checklist

- [ ] 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: Aaron Casanova <[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.

2 participants