Skip to content

Conversation

lgriffee
Copy link
Contributor

@lgriffee lgriffee commented Feb 13, 2024

WHY are these changes introduced?

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

We need migrations for primitive tokens associated with the removal of the Text heading-3xl and heading-2xl variants/classes/alias tokens.

WHAT is this pull request doing?

This PR creates a migration for deprecated font custom properties in v13 using the generic codemod styles-replace-custom-property.

v13-styles-replace-custom-property-font

Deprecated CSS Custom Property Replacement Value
--p-font-size-750 --p-font-size-600
--p-font-size-800 --p-font-size-600
--p-font-size-900 --p-font-size-600
--p-font-size-1000 --p-font-size-600
--p-font-letter-spacing-denser --p-font-letter-spacing-dense
--p-font-letter-spacing-densest --p-font-letter-spacing-dense
--p-font-line-height-1000 --p-font-line-height-800
--p-font-line-height-1200 --p-font-line-height-800
--p-text-heading-3xl-font-family --p-text-heading-xl-font-family
--p-text-heading-3xl-font-size --p-text-heading-xl-font-size
--p-text-heading-3xl-font-weight --p-text-heading-xl-font-weight
--p-text-heading-3xl-font-letter-spacing --p-text-heading-xl-font-letter-spacing
--p-text-heading-3xl-font-line-height --p-text-heading-xl-font-line-height
--p-text-heading-2xl-font-family --p-text-heading-xl-font-family
--p-text-heading-2xl-font-size --p-text-heading-xl-font-size
--p-text-heading-2xl-font-weight --p-text-heading-xl-font-weight
--p-text-heading-2xl-font-letter-spacing --p-text-heading-xl-font-letter-spacing
--p-text-heading-2xl-font-line-height --p-text-heading-xl-font-line-height

Note

Major version upgrade guidance is located on a separate PR on the v13 branch.

@lgriffee lgriffee added the #gsd:38846 Admin Quality Improvements (Q1 2024) label Feb 13, 2024
@lgriffee lgriffee self-assigned this Feb 13, 2024
@lgriffee
Copy link
Contributor Author

/snapit

Copy link
Contributor

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

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

yarn add @shopify/polaris-icons@0.0.0-snapshot-release-20240213170059
yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20240213170059
yarn add @shopify/polaris@0.0.0-snapshot-release-20240213170059

@lgriffee
Copy link
Contributor Author

/snapit

Copy link
Contributor

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

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

yarn add @shopify/polaris-icons@0.0.0-snapshot-release-20240213193456
yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20240213193456
yarn add @shopify/polaris@0.0.0-snapshot-release-20240213193456

@lgriffee lgriffee marked this pull request as ready for review February 13, 2024 22:54
@lgriffee lgriffee merged commit c8fabc0 into main Feb 14, 2024
@lgriffee lgriffee deleted the v13-font-migrations branch February 14, 2024 16:48
lgriffee added a commit that referenced this pull request Feb 14, 2024
### WHY are these changes introduced?

Fixes https://github.com/Shopify/polaris-internal/issues/1388
Fixes https://github.com/Shopify/polaris-internal/issues/1428
Related to #11596

### WHAT is this pull request doing?

Adds migration documentation for the removal of the `Text` `heading-3xl`
and `heading-2xl` variants/classes/alias tokens as well as associated
primitive tokens.

![Screenshot 2024-02-13 at 10 41
28 AM](https://github.com/Shopify/polaris/assets/21976492/cc83d845-2cf0-439c-a060-8ee6147ad2a7)

![Screenshot 2024-02-13 at 10 41
46 AM](https://github.com/Shopify/polaris/assets/21976492/f36826c6-4ccd-486b-8297-165c7f43da19)
@lgriffee lgriffee restored the v13-font-migrations branch February 14, 2024 17:10
lgriffee added a commit that referenced this pull request Feb 14, 2024
…itive tokens (#11599)

### WHY are these changes introduced?

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

### WHAT is this pull request doing?

Removes the `Text` `heading3xl` and `heading2xl` variants and any
[related primitive
tokens](#11596).
sam-b-rose pushed a commit that referenced this pull request Feb 15, 2024
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/polaris-icons@8.3.0

### Minor Changes

- [#11526](#11526)
[`b65f1e679`](b65f1e6)
Thanks [@j-wanita](https://github.com/j-wanita)! - Add list icons for
product, collection, metaobject and text


- [#11531](#11531)
[`78ed5fe0d`](78ed5fe)
Thanks [@j-wanita](https://github.com/j-wanita)! - Updated metaobject,
metaobject reference, and metaobject filled icons

## @shopify/polaris-migrator@0.28.0

### Minor Changes

- [#11596](#11596)
[`c8fabc011`](c8fabc0)
Thanks [@lgriffee](https://github.com/lgriffee)! - Created migration to
replace deprecated `font` custom properties in polaris-react v13.0.0

### Patch Changes

- [#11603](#11603)
[`2c53d6476`](2c53d64)
Thanks [@lgriffee](https://github.com/lgriffee)! - Updated migration to
replace deprecated `font` custom properties in polaris-react v13.0.0

## @shopify/polaris@12.16.0

### Minor Changes

- [#11585](#11585)
[`1ba3181b6`](1ba3181)
Thanks [@tauthomas01](https://github.com/tauthomas01)! - Added a
`disabled` prop to `ResourceItem`


- [#11568](#11568)
[`525194767`](5251947)
Thanks [@mrcthms](https://github.com/mrcthms)! - Updated the stacking
logic of multiple Toasts to take up less screen real estate


- [#11587](#11587)
[`5ab254b3b`](5ab254b)
Thanks [@sainihas](https://github.com/sainihas)! - Update dropzone
container background color when no Outline

### Patch Changes

- [#11581](#11581)
[`47dac1b2e`](47dac1b)
Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed an issue
where scrollbars weren't showing up in IndexTable on mac os when show
when scrolling preference is selected


- [#11560](#11560)
[`0b38b6115`](0b38b61)
Thanks [@apliano](https://github.com/apliano)! - Fixed `Combobox` not
rendering `Popover` until the second firing of the `onChange` event


- [#11584](#11584)
[`23d8297ff`](23d8297)
Thanks [@mrcthms](https://github.com/mrcthms)! - Updated
`useIsSelectAllActionsSticky` logic to not set any sticky behaviour if
we do not have access to the root element


- [#11543](#11543)
[`165bc6eae`](165bc6e)
Thanks [@mrcthms](https://github.com/mrcthms)! - Fixed `IndexFilters`
height changing when toggling between default and filtering modes


- [#11563](#11563)
[`3937739d2`](3937739)
Thanks [@chloerice](https://github.com/chloerice)! - Fixed
`FormLayout.Item` overflowing viewport at xs breakpoint when user
settings enlarge text size


- [#11595](#11595)
[`f829ed487`](f829ed4)
Thanks [@oksanashopify](https://github.com/oksanashopify)! - Updated
DropZone minimum size from 50px to 40px to fit within a small Thumbnail

- Updated dependencies
\[[`b65f1e679`](b65f1e6),
[`78ed5fe0d`](78ed5fe)]:
    -   @shopify/polaris-icons@8.3.0

## polaris.shopify.com@0.63.0

### Minor Changes

- [#11596](#11596)
[`c8fabc011`](c8fabc0)
Thanks [@lgriffee](https://github.com/lgriffee)! - Created migration to
replace deprecated `font` custom properties in polaris-react v13.0.0


- [#11568](#11568)
[`525194767`](5251947)
Thanks [@mrcthms](https://github.com/mrcthms)! - Updated the stacking
logic of multiple Toasts to take up less screen real estate

### Patch Changes

- Updated dependencies
\[[`b65f1e679`](b65f1e6),
[`47dac1b2e`](47dac1b),
[`0b38b6115`](0b38b61),
[`23d8297ff`](23d8297),
[`1ba3181b6`](1ba3181),
[`165bc6eae`](165bc6e),
[`78ed5fe0d`](78ed5fe),
[`3937739d2`](3937739),
[`f829ed487`](f829ed4),
[`525194767`](5251947),
[`5ab254b3b`](5ab254b)]:
    -   @shopify/polaris-icons@8.3.0
    -   @shopify/polaris@12.16.0

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
…11596)

### WHY are these changes introduced?

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

We need migrations for primitive tokens associated with the removal of
the Text `heading-3xl` and `heading-2xl` variants/classes/alias tokens.

### WHAT is this pull request doing?

This PR creates a migration for deprecated `font` custom properties in
v13 using the generic codemod
[`styles-replace-custom-property`](Shopify#8265).

#### v13-styles-replace-custom-property-font
| Deprecated CSS Custom Property | Replacement Value |
| -- | -- | 
| `--p-font-size-750`  | `--p-font-size-600` | 
| `--p-font-size-900` | `--p-font-size-600` | 
| `--p-font-size-1000` | `--p-font-size-600` | 
| `--p-font-letter-spacing-denser` | `--p-font-letter-spacing-dense` | 
| `--p-font-letter-spacing-densest` | `--p-font-letter-spacing-dense` | 
| `--p-font-line-height-1000` | `--p-font-line-height-800` | 
| `--p-font-line-height-1200` | `--p-font-line-height-800` | 
|`--p-text-heading-3xl-font-family`| `--p-text-heading-xl-font-family`|
|`--p-text-heading-3xl-font-size`| `--p-text-heading-xl-font-size`|
| `--p-text-heading-3xl-font-weight`| `--p-text-heading-xl-font-weight`|
|`--p-text-heading-3xl-font-letter-spacing`|
`--p-text-heading-xl-font-letter-spacing`|
| `--p-text-heading-3xl-font-line-height`|
`--p-text-heading-xl-font-line-height`|
|`--p-text-heading-2xl-font-family`| `--p-text-heading-xl-font-family`|
| `--p-text-heading-2xl-font-size`| `--p-text-heading-xl-font-size`|
| `--p-text-heading-2xl-font-weight`| `--p-text-heading-xl-font-weight`|
| `--p-text-heading-2xl-font-letter-spacing`|
`--p-text-heading-xl-font-letter-spacing`|
|`--p-text-heading-2xl-font-line-height`|
`--p-text-heading-xl-font-line-height`|
>[!NOTE]
>Major version upgrade guidance is located [on a separate PR on the v13
branch](Shopify#11597).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#gsd:38846 Admin Quality Improvements (Q1 2024)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants