Skip to content

Commit

Permalink
[Storybook] Consolidate se23 feature toggles (#10242)
Browse files Browse the repository at this point in the history
### WHY are these changes introduced?
Part of #10191

<img width="1276" alt="Screenshot 2023-08-25 at 1 28 07 PM"
src="https://github.com/Shopify/polaris/assets/20652326/9e245dd7-ebab-4225-92c7-4438f2f986e2">

### WHAT is this pull request doing?

- Delete`.github/workflows/ci-a11y-vrt.yml`
- Rename `.github/workflows/ci-a11y-vrt-experimental.yml` to
`.github/workflows/ci-a11y-vrt.yml`
- Removes feature toggles from storybook

> Note: I kept the panel and features object so that we can easily add
them back in the future

### Tophat
- Make sure storybook on the PR is with the feature flag on
- Make sure the toggles are not there anymore
- Make sure there isn't an experimental Accessibility and visual
regression check anymore and that CI passes
  • Loading branch information
sophschneider committed Sep 18, 2023
1 parent d091b9e commit e6f70ea
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 147 deletions.
119 changes: 0 additions & 119 deletions .github/workflows/ci-a11y-vrt-experimental.yml

This file was deleted.

10 changes: 6 additions & 4 deletions .github/workflows/ci-a11y-vrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ on:
paths:
- 'polaris-react/src/**'
- 'polaris-react/playground/**'
- 'polaris-react/.storybook/**'
- 'polaris-tokens/src/**'
pull_request:
paths:
- 'polaris-react/src/**'
- 'polaris-react/playground/**'
- 'polaris-react/.storybook/**'
- 'polaris-tokens/src/**'

jobs:
Expand Down Expand Up @@ -45,9 +47,9 @@ jobs:
**/.turbo
node_modules/.cache/turbo
polaris-react/build-internal/cache
key: ${{ runner.os }}-accessibility-test-v1-${{ github.sha }}
key: ${{ runner.os }}-accessibility-test-v2-${{ github.sha }}
restore-keys: |
${{ runner.os }}-accessibility-test-v1-
${{ runner.os }}-accessibility-test-v2-
- name: Install dependencies
run: yarn --frozen-lockfile
Expand Down Expand Up @@ -85,9 +87,9 @@ jobs:
**/.turbo
node_modules/.cache/turbo
polaris-react/build-internal/cache
key: ${{ runner.os }}-visual-regression-test-v1-${{ github.sha }}
key: ${{ runner.os }}-visual-regression-test-v2-${{ github.sha }}
restore-keys: |
${{ runner.os }}-visual-regression-test-v1-
${{ runner.os }}-visual-regression-test-v2-
- name: Install dependencies
run: yarn --frozen-lockfile
Expand Down
15 changes: 1 addition & 14 deletions polaris-react/.storybook/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,7 @@ addons.register('polaris/global-controls', () => {
});
});

export const featureFlagOptions = {
polarisSummerEditions2023: {
name: 'polarisSummerEditions2023',
description: 'Toggle the summer editions feature flag',
defaultValue: true,
control: {type: 'boolean'},
},
polarisSummerEditions2023ShadowBevelOptOut: {
name: 'polarisSummerEditions2023ShadowBevelOptOut',
description: 'Toggle the shadow-bevel opt out feature flag',
defaultValue: false,
control: {type: 'boolean'},
},
};
export const featureFlagOptions = {};

export const gridOptions = {
showGrid: {
Expand Down
11 changes: 1 addition & 10 deletions polaris-react/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,12 @@ function AppProviderDecorator(Story, context) {
document.getElementById('inter-font-link').removeAttribute('href');
}

const {
polarisSummerEditions2023,
polarisSummerEditions2023ShadowBevelOptOut,
} = context.globals;

if (context.args.omitAppProvider) return <Story {...context} />;

return (
<AppProvider
features={{
polarisSummerEditions2023:
process.env.STORYBOOK_SE23 === 'on'
? true
: polarisSummerEditions2023,
polarisSummerEditions2023ShadowBevelOptOut,
polarisSummerEditions2023: true,
}}
i18n={enTranslations}
>
Expand Down

0 comments on commit e6f70ea

Please sign in to comment.