From 9818c188d5dc4a0a8d9c8edaf658f1b2ec98892b Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Mon, 1 Jul 2024 11:39:36 -0400 Subject: [PATCH] call most things smoot-design --- frontends/mit-open/.storybook/preview.tsx | 13 +++++++++---- .../components/BannerPage/BannerPage.stories.tsx | 2 +- .../components/BasicDialog/BasicDialog.stories.tsx | 2 +- .../components/Breadcrumbs/Breadcrumbs.stories.tsx | 2 +- .../src/components/Card/Card.stories.tsx | 2 +- .../src/components/Carousel/Carousel.stories.tsx | 2 +- .../src/components/Checkbox/Checkbox.stories.tsx | 2 +- .../src/components/ChoiceBox/ChoiceBox.stories.tsx | 2 +- .../ChoiceBox/ChoiceBoxFieldCheckbox.stories.tsx | 2 +- .../ChoiceBox/ChoiceBoxFieldRadio.stories.tsx | 2 +- .../components/FormDialog/FormDialog.stories.tsx | 2 +- .../LearningResourceCard.stories.tsx | 2 +- .../LearningResourceListCard.stories.tsx | 2 +- .../LearningResourceExpanded.stories.tsx | 2 +- .../LoadingSpinner/LoadingSpinner.stories.tsx | 2 +- .../src/components/NavDrawer/NavDrawer.stories.tsx | 2 +- .../src/components/PlainList/PlainList.stories.tsx | 2 +- .../src/components/Radio/Radio.stories.tsx | 2 +- .../BooleanRadioChoiceField.stories.tsx | 2 +- .../RadioChoiceField/RadioChoiceField.stories.tsx | 2 +- .../RoutedDrawer/RoutedDrawer.stories.tsx | 2 +- .../ShareTooltip/ShareTooltip.stories.tsx | 2 +- .../TruncateText/TruncateText.stories.tsx | 2 +- .../src/stories/Breakpoints.stories.tsx | 2 +- 24 files changed, 32 insertions(+), 27 deletions(-) diff --git a/frontends/mit-open/.storybook/preview.tsx b/frontends/mit-open/.storybook/preview.tsx index cc3f15b864..dff37eda94 100644 --- a/frontends/mit-open/.storybook/preview.tsx +++ b/frontends/mit-open/.storybook/preview.tsx @@ -17,10 +17,15 @@ const preview: Preview = { options: { // @ts-expect-error These have type {import("@storybook/types").IndexEntry} // But this function is run in JS and seems not to be compiled. - storySort: (a, b) => - a.id === b.id - ? 0 - : a.id.localeCompare(b.id, undefined, { numeric: true }), + storySort: ({ id: a }, { id: b }) => { + if (a.slice(0, 3) === "old" && b.slice(0, 3) !== "old") { + return 1 + } + if (b.slice(0, 3) === "old" && a.slice(0, 3) !== "old") { + return -1 + } + return a.localeCompare(b, undefined, { numeric: true }) + }, }, }, globals: { diff --git a/frontends/ol-components/src/components/BannerPage/BannerPage.stories.tsx b/frontends/ol-components/src/components/BannerPage/BannerPage.stories.tsx index 1f66d72ccc..2b3d81d6ef 100644 --- a/frontends/ol-components/src/components/BannerPage/BannerPage.stories.tsx +++ b/frontends/ol-components/src/components/BannerPage/BannerPage.stories.tsx @@ -7,7 +7,7 @@ const PUBLIC_URL = process.env.PUBLIC_URL || process.env.STORYBOOK_PUBLIC_URL || "" const meta: Meta = { - title: "ol-components/BannerPage", + title: "old/BannerPage", render: (props) => ( Page content diff --git a/frontends/ol-components/src/components/BasicDialog/BasicDialog.stories.tsx b/frontends/ol-components/src/components/BasicDialog/BasicDialog.stories.tsx index 1b84037984..7dc773f4d7 100644 --- a/frontends/ol-components/src/components/BasicDialog/BasicDialog.stories.tsx +++ b/frontends/ol-components/src/components/BasicDialog/BasicDialog.stories.tsx @@ -4,7 +4,7 @@ import { BasicDialog } from "./BasicDialog" import Typography from "@mui/material/Typography" const meta: Meta = { - title: "ol-components/BasicDialog", + title: "smoot-design/BasicDialog", render: (props) => ( Dialog Content diff --git a/frontends/ol-components/src/components/Breadcrumbs/Breadcrumbs.stories.tsx b/frontends/ol-components/src/components/Breadcrumbs/Breadcrumbs.stories.tsx index e8b7533c05..db1433de8e 100644 --- a/frontends/ol-components/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +++ b/frontends/ol-components/src/components/Breadcrumbs/Breadcrumbs.stories.tsx @@ -5,7 +5,7 @@ import { withRouter } from "storybook-addon-react-router-v6" import styled from "@emotion/styled" const meta: Meta = { - title: "ol-components/Breadcrumbs", + title: "smoot-design/Breadcrumbs", component: Breadcrumbs, decorators: [withRouter], } diff --git a/frontends/ol-components/src/components/Card/Card.stories.tsx b/frontends/ol-components/src/components/Card/Card.stories.tsx index 9d7f3b630a..6df43c1b34 100644 --- a/frontends/ol-components/src/components/Card/Card.stories.tsx +++ b/frontends/ol-components/src/components/Card/Card.stories.tsx @@ -6,7 +6,7 @@ import { RiMenuAddLine, RiBookmarkLine } from "@remixicon/react" import { withRouter } from "storybook-addon-react-router-v6" const meta: Meta = { - title: "ol-components/Card", + title: "smoot-design/Cards/Card", argTypes: { size: { options: ["small", "medium"], diff --git a/frontends/ol-components/src/components/Carousel/Carousel.stories.tsx b/frontends/ol-components/src/components/Carousel/Carousel.stories.tsx index 10a62482c3..1ff940a459 100644 --- a/frontends/ol-components/src/components/Carousel/Carousel.stories.tsx +++ b/frontends/ol-components/src/components/Carousel/Carousel.stories.tsx @@ -26,7 +26,7 @@ const StyledCarousel = styled(Carousel)({ }) const meta: Meta = { - title: "ol-components/Carousel", + title: "smoot-design/Carousel", render: (props) => (
This carousel: diff --git a/frontends/ol-components/src/components/Checkbox/Checkbox.stories.tsx b/frontends/ol-components/src/components/Checkbox/Checkbox.stories.tsx index d523119a07..214881b3bc 100644 --- a/frontends/ol-components/src/components/Checkbox/Checkbox.stories.tsx +++ b/frontends/ol-components/src/components/Checkbox/Checkbox.stories.tsx @@ -15,7 +15,7 @@ const StateWrapper = (props: CheckboxProps) => { } const meta: Meta = { - title: "ol-components/Checkbox", + title: "smoot-design/Checkbox", component: StateWrapper, argTypes: { onChange: { diff --git a/frontends/ol-components/src/components/ChoiceBox/ChoiceBox.stories.tsx b/frontends/ol-components/src/components/ChoiceBox/ChoiceBox.stories.tsx index 1ca5652ee7..1093acab61 100644 --- a/frontends/ol-components/src/components/ChoiceBox/ChoiceBox.stories.tsx +++ b/frontends/ol-components/src/components/ChoiceBox/ChoiceBox.stories.tsx @@ -15,7 +15,7 @@ const StateWrapper = (props: ChoiceBoxProps) => { } const meta: Meta = { - title: "ol-components/ChoiceBox", + title: "smoot-design/ChoiceBox", component: StateWrapper, argTypes: { type: { diff --git a/frontends/ol-components/src/components/ChoiceBox/ChoiceBoxFieldCheckbox.stories.tsx b/frontends/ol-components/src/components/ChoiceBox/ChoiceBoxFieldCheckbox.stories.tsx index c0a12525e1..aad62e7cd8 100644 --- a/frontends/ol-components/src/components/ChoiceBox/ChoiceBoxFieldCheckbox.stories.tsx +++ b/frontends/ol-components/src/components/ChoiceBox/ChoiceBoxFieldCheckbox.stories.tsx @@ -52,7 +52,7 @@ const StateWrapper = (props: CheckboxChoiceBoxFieldProps) => { } const meta: Meta = { - title: "ol-components/ChoiceBoxField", + title: "smoot-design/ChoiceBoxField", component: StateWrapper, } diff --git a/frontends/ol-components/src/components/ChoiceBox/ChoiceBoxFieldRadio.stories.tsx b/frontends/ol-components/src/components/ChoiceBox/ChoiceBoxFieldRadio.stories.tsx index fc8df86839..0110ccf909 100644 --- a/frontends/ol-components/src/components/ChoiceBox/ChoiceBoxFieldRadio.stories.tsx +++ b/frontends/ol-components/src/components/ChoiceBox/ChoiceBoxFieldRadio.stories.tsx @@ -44,7 +44,7 @@ const StateWrapper = (props: RadioChoiceBoxFieldProps) => { } const meta: Meta = { - title: "ol-components/ChoiceBoxField", + title: "smoot-design/ChoiceBoxField", component: StateWrapper, } diff --git a/frontends/ol-components/src/components/FormDialog/FormDialog.stories.tsx b/frontends/ol-components/src/components/FormDialog/FormDialog.stories.tsx index d759c6a3a7..878ed2fd94 100644 --- a/frontends/ol-components/src/components/FormDialog/FormDialog.stories.tsx +++ b/frontends/ol-components/src/components/FormDialog/FormDialog.stories.tsx @@ -35,7 +35,7 @@ const DialogDemo = (props: FormDialogProps) => { } const meta: Meta = { - title: "ol-components/FormDialog", + title: "smoot-design/FormDialog", component: DialogDemo, argTypes: { onReset: { diff --git a/frontends/ol-components/src/components/LearningResourceCard/LearningResourceCard.stories.tsx b/frontends/ol-components/src/components/LearningResourceCard/LearningResourceCard.stories.tsx index 307bc4c962..59d16dbcda 100644 --- a/frontends/ol-components/src/components/LearningResourceCard/LearningResourceCard.stories.tsx +++ b/frontends/ol-components/src/components/LearningResourceCard/LearningResourceCard.stories.tsx @@ -22,7 +22,7 @@ const LearningResourceCardStyled = styled(LearningResourceCard)` ` const meta: Meta = { - title: "ol-components/LearningResourceCard", + title: "smoot-design/Cards/LearningResourceCard", argTypes: { resource: { options: ["Loading", "Without Image", ...Object.values(ResourceTypeEnum)], diff --git a/frontends/ol-components/src/components/LearningResourceCard/LearningResourceListCard.stories.tsx b/frontends/ol-components/src/components/LearningResourceCard/LearningResourceListCard.stories.tsx index ce142c091f..78898821d7 100644 --- a/frontends/ol-components/src/components/LearningResourceCard/LearningResourceListCard.stories.tsx +++ b/frontends/ol-components/src/components/LearningResourceCard/LearningResourceListCard.stories.tsx @@ -15,7 +15,7 @@ const makeResource: typeof _makeResource = (overrides) => { } const meta: Meta = { - title: "ol-components/LearningResourceListCard", + title: "smoot-design/Cards/LearningResourceListCard", argTypes: { resource: { options: ["Loading", ...Object.values(ResourceTypeEnum)], diff --git a/frontends/ol-components/src/components/LearningResourceExpanded/LearningResourceExpanded.stories.tsx b/frontends/ol-components/src/components/LearningResourceExpanded/LearningResourceExpanded.stories.tsx index f86a942c6e..a7c5183a02 100644 --- a/frontends/ol-components/src/components/LearningResourceExpanded/LearningResourceExpanded.stories.tsx +++ b/frontends/ol-components/src/components/LearningResourceExpanded/LearningResourceExpanded.stories.tsx @@ -18,7 +18,7 @@ const makeResource: typeof _makeResource = (overrides) => { } const meta: Meta = { - title: "ol-components/LearningResourceExpanded", + title: "smoot-design/LearningResourceExpanded", component: LearningResourceExpanded, args: { imgConfig: { diff --git a/frontends/ol-components/src/components/LoadingSpinner/LoadingSpinner.stories.tsx b/frontends/ol-components/src/components/LoadingSpinner/LoadingSpinner.stories.tsx index 9363ca5e74..ebf4feab30 100644 --- a/frontends/ol-components/src/components/LoadingSpinner/LoadingSpinner.stories.tsx +++ b/frontends/ol-components/src/components/LoadingSpinner/LoadingSpinner.stories.tsx @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react" import { LoadingSpinner } from "./LoadingSpinner" const meta: Meta = { - title: "ol-components/LoadingSpinner", + title: "smoot-design/LoadingSpinner", component: LoadingSpinner, } diff --git a/frontends/ol-components/src/components/NavDrawer/NavDrawer.stories.tsx b/frontends/ol-components/src/components/NavDrawer/NavDrawer.stories.tsx index 71cc683e73..98e258caac 100644 --- a/frontends/ol-components/src/components/NavDrawer/NavDrawer.stories.tsx +++ b/frontends/ol-components/src/components/NavDrawer/NavDrawer.stories.tsx @@ -52,7 +52,7 @@ const NavDrawerDemo = () => { } const meta: Meta = { - title: "ol-components/NavDrawer", + title: "smoot-design/NavDrawer", component: NavDrawerDemo, argTypes: { onReset: { diff --git a/frontends/ol-components/src/components/PlainList/PlainList.stories.tsx b/frontends/ol-components/src/components/PlainList/PlainList.stories.tsx index 7468ddba69..8981a50103 100644 --- a/frontends/ol-components/src/components/PlainList/PlainList.stories.tsx +++ b/frontends/ol-components/src/components/PlainList/PlainList.stories.tsx @@ -8,7 +8,7 @@ const Item = styled.li` ` const meta: Meta = { - title: "ol-components/PlainList", + title: "smoot-design/PlainList", render: (args) => { return ( diff --git a/frontends/ol-components/src/components/Radio/Radio.stories.tsx b/frontends/ol-components/src/components/Radio/Radio.stories.tsx index d54413e056..e574968441 100644 --- a/frontends/ol-components/src/components/Radio/Radio.stories.tsx +++ b/frontends/ol-components/src/components/Radio/Radio.stories.tsx @@ -15,7 +15,7 @@ const StateWrapper = (props: RadioProps) => { } const meta: Meta = { - title: "ol-components/Radio", + title: "smoot-design/Radio", component: StateWrapper, argTypes: { onChange: { diff --git a/frontends/ol-components/src/components/RadioChoiceField/BooleanRadioChoiceField.stories.tsx b/frontends/ol-components/src/components/RadioChoiceField/BooleanRadioChoiceField.stories.tsx index 6a7d35653d..e948024152 100644 --- a/frontends/ol-components/src/components/RadioChoiceField/BooleanRadioChoiceField.stories.tsx +++ b/frontends/ol-components/src/components/RadioChoiceField/BooleanRadioChoiceField.stories.tsx @@ -18,7 +18,7 @@ function StateWrapper(props: BooleanRadioChoiceFieldProps) { } const meta: Meta = { - title: "ol-components/BooleanRadioChoiceField", + title: "~smoot-design/BooleanRadioChoiceField", component: StateWrapper, argTypes: { onChange: { diff --git a/frontends/ol-components/src/components/RadioChoiceField/RadioChoiceField.stories.tsx b/frontends/ol-components/src/components/RadioChoiceField/RadioChoiceField.stories.tsx index bb9f55855d..25e8903d09 100644 --- a/frontends/ol-components/src/components/RadioChoiceField/RadioChoiceField.stories.tsx +++ b/frontends/ol-components/src/components/RadioChoiceField/RadioChoiceField.stories.tsx @@ -4,7 +4,7 @@ import { useArgs } from "@storybook/preview-api" import { RadioChoiceField, BooleanRadioChoiceField } from "./RadioChoiceField" const meta: Meta = { - title: "ol-components/RadioChoiceField", + title: "smoot-design/RadioChoiceField", argTypes: { onChange: { action: "changed", diff --git a/frontends/ol-components/src/components/RoutedDrawer/RoutedDrawer.stories.tsx b/frontends/ol-components/src/components/RoutedDrawer/RoutedDrawer.stories.tsx index 861710f4b1..856b06aa7b 100644 --- a/frontends/ol-components/src/components/RoutedDrawer/RoutedDrawer.stories.tsx +++ b/frontends/ol-components/src/components/RoutedDrawer/RoutedDrawer.stories.tsx @@ -16,7 +16,7 @@ const Content = styled.div({ }) const meta: Meta = { - title: "ol-components/RoutedDrawer", + title: "smoot-design/RoutedDrawer", decorators: [withRouter], } diff --git a/frontends/ol-components/src/components/ShareTooltip/ShareTooltip.stories.tsx b/frontends/ol-components/src/components/ShareTooltip/ShareTooltip.stories.tsx index 767529c948..f847e0778d 100644 --- a/frontends/ol-components/src/components/ShareTooltip/ShareTooltip.stories.tsx +++ b/frontends/ol-components/src/components/ShareTooltip/ShareTooltip.stories.tsx @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from "@storybook/react" import { ShareTooltip } from "./ShareTooltip" const meta: Meta = { - title: "ol-components/ShareTooltip", + title: "old/ShareTooltip", component: ShareTooltip, } diff --git a/frontends/ol-components/src/components/TruncateText/TruncateText.stories.tsx b/frontends/ol-components/src/components/TruncateText/TruncateText.stories.tsx index 65bbcf771e..40684dc769 100644 --- a/frontends/ol-components/src/components/TruncateText/TruncateText.stories.tsx +++ b/frontends/ol-components/src/components/TruncateText/TruncateText.stories.tsx @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react" import { TruncateText } from "./TruncateText" const meta: Meta = { - title: "ol-components/TruncateText", + title: "smoot-design/TruncateText", component: TruncateText, argTypes: { lineClamp: { diff --git a/frontends/ol-components/src/stories/Breakpoints.stories.tsx b/frontends/ol-components/src/stories/Breakpoints.stories.tsx index 696232d8cf..5f5fab95d1 100644 --- a/frontends/ol-components/src/stories/Breakpoints.stories.tsx +++ b/frontends/ol-components/src/stories/Breakpoints.stories.tsx @@ -23,7 +23,7 @@ const BreakpointsDemo = () => { } const meta: Meta = { - title: "ol-components/Breakpoints", + title: "smoot-design/Container Breakpoints", component: BreakpointsDemo, parameters: { viewports: {},