Skip to content

Commit eb30870

Browse files
committed
Preload inter on Storybook (#10048)
### WHY are these changes introduced? Resolves #10038 ### WHAT is this pull request doing? * Preloads the `inter` font to avoid flakey width/postion calculations in chromatic snapshots (more context in the issue) * Run chromatic in CI when `polaris-react/.storybook` changes * Accept chromatic baseline UI snapshots using inter > Note: I think inter now shows when the beta flag is off as well but this is ok as we are on the `next` branch and in the process of removing the beta flag ### How to 🎩 #### To duplicate the original bug: 1. Go to [this story](https://storybook.polaris.shopify.com/?path=/story/all-components-legacycard--with-separate-header&globals=polarisSummerEditions2023:true) 2. Make sure the cache is empty (empty cache and hard reload) 3. Refresh (or rerender) to see popover overlay shift <details> <summary>Replicate Bug Demo</summary> https://github.com/Shopify/polaris/assets/20652326/53ed5e19-7c8d-4ee4-ab95-81a2c08e279d </details> #### To tophat fix: 1. Go to [this story on this PR's chromatic](https://5d559397bae39100201eedc1-qhkfhdyjuo.chromatic.com/?path=/story/all-components-legacycard--with-separate-header) 2. Repeat steps 2-3 above <details> <summary>Fixed Bug Demo</summary> https://github.com/Shopify/polaris/assets/20652326/de28ff59-84ab-46bd-b28a-31dbede8f001 </details>
1 parent 8eb0769 commit eb30870

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.github/workflows/ci-a11y-vrt-experimental.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ on:
88
paths:
99
- 'polaris-react/src/**'
1010
- 'polaris-react/playground/**'
11+
- 'polaris-react/.storybook/**'
1112
- 'polaris-tokens/src/**'
1213
pull_request:
1314
paths:
1415
- 'polaris-react/src/**'
1516
- 'polaris-react/playground/**'
17+
- 'polaris-react/.storybook/**'
1618
- 'polaris-tokens/src/**'
1719

1820
jobs:

polaris-react/.storybook/preview-head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
crossorigin="anonymous"
66
/>
77
<link
8+
rel="preload"
89
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
910
rel="stylesheet"
1011
/>

0 commit comments

Comments
 (0)