Skip to content

Conversation

@jesstelford
Copy link
Contributor

@jesstelford jesstelford commented Apr 24, 2023

Refs #8949

Screenshot 2023-04-24 at 2 15 38 pm

Add legacy patterns to left nav with legacy badge, below all of the new patterns

I wasn't able to do this due to the way our nav is automatically generated from the .md files; the pattern page has its own rendering engine which isn't compatible with the legacy patterns, but in order to show legacy patterns in the left nav, we would have to render the legacy patterns as new patterns. Catch-22 (unless we go and update all the legacy patterns to render like new patterns which might take a bit of effort).

// @ts-expect-error require.context is a Webpack-specific thing
const req = require.context('../src/components', true, /.stories.tsx$/);
req.keys().forEach((filePath) =>
req.keys().forEach((filePath: string) =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't know how these TS failures made it to main, but I wasn't able to build the site locally without fixing them 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The associate route is gone and now redirects back to /patterns#legacy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The associate route is gone and now redirects back to /patterns#legacy

},
{
source: '/patterns-legacy',
destination: '/patterns#legacy',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to catch any URLs that've been shared since we made the change; Don't want to leave any 404s in our wake.

return memo;
}, {} as PatternJSON);

export const legacyPatterns: PatternJSON = Object.keys(pages)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cludgey, but it matches how we're doing it for New Patterns (above).

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
polaris-react-cjs 240.81 KB (0%)
polaris-react-esm 156.93 KB (0%)
polaris-react-esnext 219.13 KB (0%)
polaris-react-css 47.27 KB (0%)

@gwyneplaine
Copy link
Contributor

/stageit

@github-actions
Copy link
Contributor

🚀 5dfba0e97ff52af2f3d9a56c9d9dcf2ca760b5e7 is now deploying to staging. View status.

@jesstelford jesstelford merged commit 32dae86 into main Apr 27, 2023
@jesstelford jesstelford deleted the legacy-patterns-nav branch April 27, 2023 03:23
laurkim pushed a commit that referenced this pull request Apr 27, 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/stylelint-polaris@12.0.0

### Major Changes

- [#9097](#9097)
[`a64e38948`](a64e389)
Thanks [@samrose3](https://github.com/samrose3)! - Re-enabled layout
warnings for coverage rules

## @shopify/polaris@10.49.0

### Minor Changes

- [#9051](#9051)
[`722b818b4`](722b818)
Thanks [@camielvs](https://github.com/camielvs)! - Added `integer`
option for the `type` prop of TextField

### Patch Changes

- [#9108](#9108)
[`6fd00eb7c`](6fd00eb)
Thanks [@laurkim](https://github.com/laurkim)! - Refactored `Box` border
radius properties to fix issues with cascading styles

## @shopify/polaris-cli@0.1.35

### Patch Changes

-   Updated dependencies \[]:
    -   @shopify/polaris-migrator@0.18.1

## @shopify/polaris-codemods@0.1.1

### Patch Changes

- Updated dependencies
\[[`a64e38948`](a64e389)]:
    -   @shopify/stylelint-polaris@12.0.0

## @shopify/polaris-migrator@0.18.1

### Patch Changes

- Updated dependencies
\[[`a64e38948`](a64e389)]:
    -   @shopify/stylelint-polaris@12.0.0

## polaris.shopify.com@0.52.0

### Minor Changes

- [#9087](#9087)
[`efdcb10db`](efdcb10)
Thanks [@lgriffee](https://github.com/lgriffee)! - Updated instances of
"spacing" on `/design/space` to "space".


- [#9088](#9088)
[`13e9b1e47`](13e9b1e)
Thanks [@lgriffee](https://github.com/lgriffee)! - Matched v11 migration
docs to migrations folder


- [#9099](#9099)
[`227490514`](2274905)
Thanks [@chazdean](https://github.com/chazdean)! - Updated `ButtonGroup`
examples to include `Pressed with segmented buttons`

### Patch Changes

- [#9062](#9062)
[`32dae8638`](32dae86)
Thanks [@jesstelford](https://github.com/jesstelford)! - Merge
/patterns-legacy index page into /patterns to ease discovery (includes a
redirect so old links continue to work)

- Updated dependencies
\[[`722b818b4`](722b818),
[`6fd00eb7c`](6fd00eb)]:
    -   @shopify/polaris@10.49.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
juzser pushed a commit to juzser/polaris that referenced this pull request Jul 27, 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/stylelint-polaris@12.0.0

### Major Changes

- [Shopify#9097](Shopify#9097)
[`a64e38948`](Shopify@a64e389)
Thanks [@samrose3](https://github.com/samrose3)! - Re-enabled layout
warnings for coverage rules

## @shopify/polaris@10.49.0

### Minor Changes

- [Shopify#9051](Shopify#9051)
[`722b818b4`](Shopify@722b818)
Thanks [@camielvs](https://github.com/camielvs)! - Added `integer`
option for the `type` prop of TextField

### Patch Changes

- [Shopify#9108](Shopify#9108)
[`6fd00eb7c`](Shopify@6fd00eb)
Thanks [@laurkim](https://github.com/laurkim)! - Refactored `Box` border
radius properties to fix issues with cascading styles

## @shopify/polaris-cli@0.1.35

### Patch Changes

-   Updated dependencies \[]:
    -   @shopify/polaris-migrator@0.18.1

## @shopify/polaris-codemods@0.1.1

### Patch Changes

- Updated dependencies
\[[`a64e38948`](Shopify@a64e389)]:
    -   @shopify/stylelint-polaris@12.0.0

## @shopify/polaris-migrator@0.18.1

### Patch Changes

- Updated dependencies
\[[`a64e38948`](Shopify@a64e389)]:
    -   @shopify/stylelint-polaris@12.0.0

## polaris.shopify.com@0.52.0

### Minor Changes

- [Shopify#9087](Shopify#9087)
[`efdcb10db`](Shopify@efdcb10)
Thanks [@lgriffee](https://github.com/lgriffee)! - Updated instances of
"spacing" on `/design/space` to "space".


- [Shopify#9088](Shopify#9088)
[`13e9b1e47`](Shopify@13e9b1e)
Thanks [@lgriffee](https://github.com/lgriffee)! - Matched v11 migration
docs to migrations folder


- [Shopify#9099](Shopify#9099)
[`227490514`](Shopify@2274905)
Thanks [@chazdean](https://github.com/chazdean)! - Updated `ButtonGroup`
examples to include `Pressed with segmented buttons`

### Patch Changes

- [Shopify#9062](Shopify#9062)
[`32dae8638`](Shopify@32dae86)
Thanks [@jesstelford](https://github.com/jesstelford)! - Merge
/patterns-legacy index page into /patterns to ease discovery (includes a
redirect so old links continue to work)

- Updated dependencies
\[[`722b818b4`](Shopify@722b818),
[`6fd00eb7c`](Shopify@6fd00eb)]:
    -   @shopify/polaris@10.49.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ascherkus pushed a commit to ascherkus/polaris that referenced this pull request Feb 19, 2025
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/stylelint-polaris@12.0.0

### Major Changes

- [Shopify#9097](Shopify#9097)
[`a64e38948`](Shopify@d289bb9)
Thanks [@samrose3](https://github.com/samrose3)! - Re-enabled layout
warnings for coverage rules

## @shopify/polaris@10.49.0

### Minor Changes

- [Shopify#9051](Shopify#9051)
[`722b818b4`](Shopify@a7b28bf)
Thanks [@camielvs](https://github.com/camielvs)! - Added `integer`
option for the `type` prop of TextField

### Patch Changes

- [Shopify#9108](Shopify#9108)
[`6fd00eb7c`](Shopify@6c91a77)
Thanks [@laurkim](https://github.com/laurkim)! - Refactored `Box` border
radius properties to fix issues with cascading styles

## @shopify/polaris-cli@0.1.35

### Patch Changes

-   Updated dependencies \[]:
    -   @shopify/polaris-migrator@0.18.1

## @shopify/polaris-codemods@0.1.1

### Patch Changes

- Updated dependencies
\[[`a64e38948`](Shopify@d289bb9)]:
    -   @shopify/stylelint-polaris@12.0.0

## @shopify/polaris-migrator@0.18.1

### Patch Changes

- Updated dependencies
\[[`a64e38948`](Shopify@d289bb9)]:
    -   @shopify/stylelint-polaris@12.0.0

## polaris.shopify.com@0.52.0

### Minor Changes

- [Shopify#9087](Shopify#9087)
[`efdcb10db`](Shopify@1a72f1e)
Thanks [@lgriffee](https://github.com/lgriffee)! - Updated instances of
"spacing" on `/design/space` to "space".


- [Shopify#9088](Shopify#9088)
[`13e9b1e47`](Shopify@33a15a2)
Thanks [@lgriffee](https://github.com/lgriffee)! - Matched v11 migration
docs to migrations folder


- [Shopify#9099](Shopify#9099)
[`227490514`](Shopify@d525b82)
Thanks [@chazdean](https://github.com/chazdean)! - Updated `ButtonGroup`
examples to include `Pressed with segmented buttons`

### Patch Changes

- [Shopify#9062](Shopify#9062)
[`32dae8638`](Shopify@3c7b4fc)
Thanks [@jesstelford](https://github.com/jesstelford)! - Merge
/patterns-legacy index page into /patterns to ease discovery (includes a
redirect so old links continue to work)

- Updated dependencies
\[[`722b818b4`](Shopify@a7b28bf),
[`6fd00eb7c`](Shopify@6c91a77)]:
    -   @shopify/polaris@10.49.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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