Skip to content

Commit e2372a0

Browse files
authored
feat(form-layout): update form component to form-layout (#4316)
* feat(form-layout): update form component to form-layout * feat(form-layout): add redirect * fix(form-layout): broken links * fix(form-layout): broken links * feat(form-layout): override title and desc * feat(form-layout): override title and desc
1 parent 2e46992 commit e2372a0

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

cypress/integration/sitemap-vrt/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export const SITEMAP = [
108108
"/components/file-uploader/",
109109
"/components/file-uploader/api",
110110
"/components/file-uploader/changelog",
111-
"/components/form/",
112-
"/components/form/api",
113-
"/components/form/changelog",
111+
"/components/form-layout/",
112+
"/components/form-layout/api",
113+
"/components/form-layout/changelog",
114114
"/components/combobox/",
115115
"/components/date-picker/",
116116
"/components/date-picker/api",

packages/paste-website/next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const nextConfig = {
6464
{ source: "/articles", destination: "/blog", permanent: true },
6565
{ source: "/patterns/navigation", destination: "/experiences/navigation", permanent: true },
6666
{ source: "/patterns/filter-group", destination: "/patterns/filter", permanent: true },
67+
{ source: "/components/form", destination: "/components/form-layout", permanent: true },
6768
];
6869
},
6970
// https://nextjs.org/docs/pages/api-reference/next-config-js/headers

packages/paste-website/src/pages/components/form/api.mdx renamed to packages/paste-website/src/pages/components/form-layout/api.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const meta = {
22
title: 'Form - API',
33
package: '@twilio-paste/form',
44
description: 'A Form groups related form elements that allow users to input information or configure options.',
5-
slug: '/components/form/api',
5+
slug: '/components/form-layout/api',
66
};
77

88
import Changelog from '@twilio-paste/form/CHANGELOG.md'; // I don't know why this is needed but if you remove it the page fails to render
@@ -16,13 +16,16 @@ export default ComponentPageLayout;
1616

1717
export const getStaticProps = async () => {
1818
const navigationData = await getNavigationData();
19-
const feature = await getFeature('Form');
19+
const feature = await getFeature('Form Layout');
2020
const {componentApi, componentApiTocData} = getComponentApi('@twilio-paste/form');
2121
return {
2222
props: {
2323
data: {
2424
...packageJson,
2525
...feature,
26+
nameOverride: 'Form Layout',
27+
descriptionOverride:
28+
'A Form Layout groups related form elements that allow users to input information or configure options.',
2629
},
2730
componentApi,
2831
mdxHeadings: [...mdxHeadings, ...componentApiTocData],

packages/paste-website/src/pages/components/form/changelog.mdx renamed to packages/paste-website/src/pages/components/form-layout/changelog.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const meta = {
22
title: 'Form - Changelog',
33
package: '@twilio-paste/form',
44
description: 'A Form groups related form elements that allow users to input information or configure options.',
5-
slug: '/components/form/changelog',
5+
slug: '/components/form-layout/changelog',
66
};
77

88
import Changelog from '@twilio-paste/form/CHANGELOG.md';
@@ -16,12 +16,15 @@ export default ComponentPageLayout;
1616

1717
export const getStaticProps = async () => {
1818
const navigationData = await getNavigationData();
19-
const feature = await getFeature('Form');
19+
const feature = await getFeature('Form Layout');
2020
return {
2121
props: {
2222
data: {
2323
...packageJson,
2424
...feature,
25+
nameOverride: 'Form Layout',
26+
descriptionOverride:
27+
'A Form Layout groups related form elements that allow users to input information or configure options.',
2528
},
2629
navigationData,
2730
mdxHeadings,

packages/paste-website/src/pages/components/form/index.mdx renamed to packages/paste-website/src/pages/components/form-layout/index.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export const meta = {
2-
title: 'Form',
2+
title: 'Form Layout',
33
package: '@twilio-paste/form',
44
description: 'A Form groups related form elements that allow users to input information or configure options.',
5-
slug: '/components/form/',
5+
slug: '/components/form-layout/',
66
};
77

88
import {Box} from '@twilio-paste/box';
@@ -51,12 +51,15 @@ export default ComponentPageLayout;
5151

5252
export const getStaticProps = async () => {
5353
const navigationData = await getNavigationData();
54-
const feature = await getFeature('Form');
54+
const feature = await getFeature('Form Layout');
5555
return {
5656
props: {
5757
data: {
5858
...packageJson,
5959
...feature,
60+
nameOverride: 'Form Layout',
61+
descriptionOverride:
62+
'A Form Layout groups related form elements that allow users to input information or configure options.',
6063
},
6164
navigationData,
6265
mdxHeadings,

0 commit comments

Comments
 (0)