-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Merge /patterns-legacy index page into /patterns to ease discovery #9062
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'polaris.shopify.com': patch | ||
| --- | ||
|
|
||
| Merge /patterns-legacy index page into /patterns to ease discovery (includes a redirect so old links continue to work) |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,6 +134,11 @@ const nextConfig = { | |
| destination: '/patterns-legacy/text-fields', | ||
| permanent: true, | ||
| }, | ||
| { | ||
| source: '/patterns-legacy', | ||
| destination: '/patterns#legacy', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| permanent: true, | ||
| }, | ||
| ...actions, | ||
| ...deprecated, | ||
| ...feedbackIndicators, | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,15 @@ export const patterns: PatternJSON = Object.keys(pages) | |
| return memo; | ||
| }, {} as PatternJSON); | ||
|
|
||
| export const legacyPatterns: PatternJSON = Object.keys(pages) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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). |
||
| .filter((slug) => slug.startsWith('patterns-legacy/')) | ||
| .sort((a, b) => a.localeCompare(b)) | ||
| .reduce((memo, key) => { | ||
| // @ts-expect-error Yes it is compatible Typescript. Shhhh. | ||
| memo[key] = pages[key]; | ||
| return memo; | ||
| }, {} as PatternJSON); | ||
|
|
||
| export const getComponentCategories = (): string[] => { | ||
| const componentCategories: string[] = []; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
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 🤷