From 5f5f64928c6c64b1a5c54d8d800fe56d25abbb7d Mon Sep 17 00:00:00 2001 From: uxemilylee <136400574+uxemilylee@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:46:01 -1000 Subject: [PATCH] docs(Gamut): update headings to sentence case Update all headings in Gamut Storybook to sentence case for consistency with our Codecademy writing guidelines --- .../stories/Atoms/Animation.stories.mdx | 4 +- .../stories/Atoms/Badge/Badge.stories.mdx | 16 ++--- .../stories/Atoms/Button/index.stories.mdx | 26 +++---- .../styleguide/stories/Atoms/Card.stories.mdx | 8 +-- .../stories/Atoms/FloatingCard.stories.mdx | 12 ++-- .../Atoms/FormElements/FormGroup.stories.mdx | 6 +- .../FormElements/FormGroupLabel.stories.mdx | 2 +- .../Atoms/FormInputs/Checkbox.stories.mdx | 8 +-- .../Atoms/FormInputs/Input.stories.mdx | 12 ++-- .../Atoms/FormInputs/Radio.stories.mdx | 4 +- .../Atoms/FormInputs/Select.stories.mdx | 6 +- .../FormInputs/SelectDropdown.stories.mdx | 16 ++--- .../Atoms/FormInputs/TextArea.stories.mdx | 2 +- .../stories/Atoms/Icons/Mini.stories.mdx | 2 +- .../stories/Atoms/Icons/Regular.stories.mdx | 19 +++++- .../stories/Atoms/Illustrations.stories.mdx | 6 +- .../stories/Atoms/Patterns.stories.mdx | 2 +- .../Atoms/PopoverContainer/index.stories.mdx | 6 +- .../Atoms/ProgressBar/index.stories.mdx | 12 ++-- .../styleguide/stories/Atoms/Tag.stories.mdx | 14 ++-- .../stories/Atoms/Toggle.stories.mdx | 14 ++-- .../Foundations/ColorMode/index.stories.mdx | 6 +- .../stories/Foundations/Layout.stories.mdx | 4 +- .../Foundations/System/Compose.stories.mdx | 2 +- .../System/Responsive Properties.stories.mdx | 4 +- .../Foundations/System/Variants.stories.mdx | 4 +- .../Foundations/Theme/index.stories.mdx | 20 +++--- .../Foundations/Typography.stories.mdx | 4 +- .../stories/Foundations/Utilities.stories.mdx | 10 +-- .../stories/Installation.stories.mdx | 2 +- .../stories/Layouts/Box/FlexBox.stories.mdx | 4 +- .../stories/Layouts/Box/GridBox.stories.mdx | 2 +- .../stories/Layouts/Box/index.stories.mdx | 6 +- .../Layouts/ContentContainer.stories.mdx | 8 +-- .../stories/Layouts/LayoutGrid.stories.mdx | 12 ++-- .../stories/Meta/Best Practices.stories.mdx | 8 +-- .../stories/Meta/Contributing.stories.mdx | 18 ++--- .../styleguide/stories/Meta/FAQs.stories.mdx | 8 +-- .../stories/Meta/Stories.stories.mdx | 12 ++-- .../stories/Molecules/Alert/index.stories.mdx | 22 +++--- .../Molecules/Coachmark/index.stories.mdx | 4 +- .../Molecules/Disclosure/index.stories.mdx | 6 +- .../stories/Molecules/Flyout.stories.mdx | 8 +-- .../Molecules/Menu/MenuItem.stories.mdx | 2 +- .../Molecules/Menu/MenuSeparator.stories.mdx | 2 +- .../stories/Molecules/Menu/index.stories.mdx | 12 ++-- .../Molecules/Modals/About.stories.mdx | 4 +- .../Molecules/Modals/Dialog.stories.mdx | 10 +-- .../Molecules/Modals/Modal.stories.mdx | 6 +- .../Molecules/Modals/Overlay.stories.mdx | 2 +- .../Molecules/Pagination/index.stories.mdx | 4 +- .../Molecules/Popover/index.stories.mdx | 2 +- .../stories/Molecules/Tabs/index.stories.mdx | 16 ++--- .../stories/Molecules/Tip/About.stories.mdx | 6 +- .../Tip/DeprecatedToolTip.stories.mdx | 4 +- .../stories/Molecules/Tip/InfoTip.stories.mdx | 2 +- .../stories/Molecules/Tip/ToolTip.stories.mdx | 12 ++-- .../stories/Molecules/Toast.stories.mdx | 12 ++-- .../ConnectedForm/ConnectedForm.stories.mdx | 2 +- .../ConnectedFormGroup.stories.mdx | 2 +- .../ConnectedFormInputs.stories.mdx | 2 +- .../stories/Organisms/GridForm.stories.mdx | 68 +++++++++---------- .../Lists & Tables/DataList.stories.mdx | 10 +-- .../Lists & Tables/DataTable.stories.mdx | 28 ++++---- .../Lists & Tables/List/index.stories.mdx | 32 ++++----- .../Organisms/Markdown/index.stories.mdx | 4 +- .../stories/Typography/Anchor.stories.mdx | 10 +-- .../stories/Typography/Text.stories.mdx | 12 ++-- .../stories/UX Writing/About.stories.mdx | 2 +- 69 files changed, 325 insertions(+), 314 deletions(-) diff --git a/packages/styleguide/stories/Atoms/Animation.stories.mdx b/packages/styleguide/stories/Atoms/Animation.stories.mdx index 89eb222b0b..96e2c3dff8 100644 --- a/packages/styleguide/stories/Atoms/Animation.stories.mdx +++ b/packages/styleguide/stories/Atoms/Animation.stories.mdx @@ -34,12 +34,12 @@ import { RotationExample } from './Animation.examples.tsx'; include={['rotated', 'degrees', 'height', 'width']} /> -## Rotation Example +## Rotation example Animations should not be the click target of actions, but rather the container for the content you wish to animate. - + {(args) => } diff --git a/packages/styleguide/stories/Atoms/Badge/Badge.stories.mdx b/packages/styleguide/stories/Atoms/Badge/Badge.stories.mdx index 5a99f3a85c..67f70997c5 100644 --- a/packages/styleguide/stories/Atoms/Badge/Badge.stories.mdx +++ b/packages/styleguide/stories/Atoms/Badge/Badge.stories.mdx @@ -23,13 +23,13 @@ import { TertiaryFillExample } from './examples'; }} /> -Badges are generally found next to interface elements that need to be called out. They are small Atoms that can either be used inline, or inside larger Molecules and Organisms. +Badges are generally found next to interface elements that need to be called out. They are small atoms that can either be used inline, or inside larger molecules and organisms. ## Usage - Use Badges to display read-only information like statuses, attributes, and other emphasized information. -- Use the `variant` and `size` properties to ensure your badges have the right visibility and visual hierarchy on your page. -- Use an Icon to draw attention to the badge using the `icon` prop. +- Use the `variant` and `size` properties to ensure your Badges have the right visibility and visual hierarchy on your page. +- Use an Icon to draw attention to the Badge using the `icon` prop. - **Limit Badge text to 1–2 words if possible.** These elements are most effective when displaying short pieces of text. - **Do not use Badges for elements that are meant to be clickable or interactive**. Badges are fully rounded to distinguish themselves from elements such as Buttons. @@ -39,12 +39,12 @@ export const BadgeTemplate = (args) => ( ## Variants -We support the following variants of Badges: `primary`, `secondary`, `tertiary`, `tertiaryFill`, and `accent`. +We support the following Badge variants: `primary`, `secondary`, `tertiary`, `tertiaryFill`, and `accent`. -- **Greyscale Badges** provide different levels of priority for the `primary`, `secondary`, `tertiary`, and `tertiaryFill` variants. +- **Greyscale** provides different levels of priority for the `primary`, `secondary`, `tertiary`, and `tertiaryFill` variants. - **Accent colors** like `accent` are meant to be used sparingly so they can stand out against other elements. -Additional variants should designed with both ColorModes in mind. For example, the `accent` and `secondary` variants work against both light and dark backgrounds, while the `primary` and `tertiary`, and `tertiaryFill` variants both adapt to their ColorMode (which you can check out by using the toolbar at the top of this page!) +Additional variants should be designed with both ColorModes in mind. For example, the `accent` and `secondary` variants work against both light and dark backgrounds, while the `primary` and `tertiary`, and `tertiaryFill` variants both adapt to their ColorMode (which you can check out by using the toolbar at the top of this page!) @@ -90,7 +90,7 @@ We have two `size` options, which should be used according to their context: -## Leading Icon +## Leading icon Include the `icon` property when the icon reinforces the badge’s message and improves scannability. Since badges are inherently small, it's recommended to use Gamut's mini icons. @@ -118,7 +118,7 @@ Include the `icon` property when the icon reinforces the badge’s message and i -## Code Playground +## Code playground {(args) => badge} diff --git a/packages/styleguide/stories/Atoms/Button/index.stories.mdx b/packages/styleguide/stories/Atoms/Button/index.stories.mdx index 332633e3a9..9dd2d7aecc 100644 --- a/packages/styleguide/stories/Atoms/Button/index.stories.mdx +++ b/packages/styleguide/stories/Atoms/Button/index.stories.mdx @@ -71,7 +71,7 @@ All but CTA button support a size of either `normal` (default) or `small`.
-## Writing Tips +## Writing tips Writing words for a link or button? Above all else, make sure that the words alone make it clear where a button or link will take the user. Refer to the checklist below for guidance. For more tips and best practices, check out the full guide about writing for buttons and links. @@ -98,7 +98,7 @@ Writing words for a link or button? Above all else, make sure that the words alo
-## CTA Button +## CTAButton {(args) => } @@ -106,7 +106,7 @@ Writing words for a link or button? Above all else, make sure that the words alo -## Fill Button +## FillButton {(args) => } @@ -114,7 +114,7 @@ Writing words for a link or button? Above all else, make sure that the words alo -## Stroke Button +## StrokeButton {(args) => } @@ -122,7 +122,7 @@ Writing words for a link or button? Above all else, make sure that the words alo -## Text Button +## TextButton **Note**: Our text buttons use bold formatting to differentiate themselves from normal text, as color alone does not meet the 3:1 contrast ratio required for accessibility. However, bold formatting may not be sufficient in all contexts, such as when placed alongside a bold heading. @@ -134,7 +134,7 @@ In these cases, we recommend including a leading or trailing icon to further dis -## Icon Button +## IconButton You must pass a string for the `tip` prop to label your icon button. The `tipProps` prop is optional and can be used to customize the tooltip - for more information on `tooltip`s + `IconButton`s see the ToolTip page. @@ -155,7 +155,7 @@ You must pass a string for the `tip` prop to label your icon button. The `tipPro -## Button Variants +## Button variants We have 2 button color modes: `light` and `dark`. For different priority buttons we provide `primary` and `secondary` variants. @@ -173,12 +173,12 @@ For different priority buttons we provide `primary` and `secondary` variants. ``` -## Inline Icon +## Inline icons Our FillButtons, StrokeButtons, and TextButtons all support a single inline icon. You can align the icon to the left or right of the button text using the `iconPosition` prop. These icons should be from the mini set to be legible at a smaller size. - + {() => ( @@ -199,18 +199,18 @@ Our FillButtons, StrokeButtons, and TextButtons all support a single inline icon -### Light Mode +### Light mode - + -## Dark Mode +## Dark mode - + diff --git a/packages/styleguide/stories/Atoms/Card.stories.mdx b/packages/styleguide/stories/Atoms/Card.stories.mdx index 1d54a88561..0fc8ac0e78 100644 --- a/packages/styleguide/stories/Atoms/Card.stories.mdx +++ b/packages/styleguide/stories/Atoms/Card.stories.mdx @@ -49,7 +49,7 @@ We provide 5 style variants for Card. -## Shadow Variants +## Shadow variants We provide 3 style variants for shadow. @@ -65,7 +65,7 @@ We provide 3 style variants for shadow. -### Shadow Variant "outline" with color +### Shadow variant outline with color The outline color will inherit the color of the card. @@ -78,9 +78,9 @@ The outline color will inherit the color of the card. -# Color Mode as Default +# ColorMode as default -Card elements respond to the current Color Mode they are used in. Note that their background color will match the background of their context and secondary colors are used for their hover effect. As these are not the typical inverse effects we utilize in color mode, please check with your design team before use. +Card elements respond to the current ColorMode they are used in. Note that their background color will match the background of their context and secondary colors are used for their hover effect. As these are not the typical inverse effects we utilize in color mode, please check with your design team before use. {() => ( diff --git a/packages/styleguide/stories/Atoms/FloatingCard.stories.mdx b/packages/styleguide/stories/Atoms/FloatingCard.stories.mdx index 42be8a956a..e16d9c8e91 100644 --- a/packages/styleguide/stories/Atoms/FloatingCard.stories.mdx +++ b/packages/styleguide/stories/Atoms/FloatingCard.stories.mdx @@ -20,7 +20,7 @@ import { LinkTo, PropsTable } from '~styleguide/blocks';
-## Usage Guidelines +## Usage guidelines - They have patterned drop shadow to indicate that are outside the normal document flow. - This is a shared component for `Toast`, `Dialog`, and `Coachmark`; before using this component directly please check that these components do not cover your use case! @@ -48,12 +48,12 @@ FloatingCards can optionally display a beak. This is used to indicate a point of
-## Shadow Direction +## Shadow direction There are 2 types of shadow directions. By default, FloatingCards is set with a shadow offset to the bottom-left. - + {() => ( {['bottomLeft', 'bottomRight'].map((shadow) => ( @@ -64,7 +64,7 @@ There are 2 types of shadow directions. By default, FloatingCards is set with a -## Shadow Pattern +## Shadow pattern We can specify the pattern of the FloatingCard shadow by providing the `pattern` prop with the imported pattern from `@codecademy/gamut-patterns`. @@ -83,7 +83,7 @@ export const MyComponent: React.FC = () => { }; ``` -## Card Wrapper Display +## Card wrapper display The wrapper display may need to be changed from the default `inline-block` @@ -100,7 +100,7 @@ export const MyComponent: React.FC = () => { }; ``` -## Code Playground +## Code playground Edit attributes and see what’s possible to do with this component or get the exact output you want. diff --git a/packages/styleguide/stories/Atoms/FormElements/FormGroup.stories.mdx b/packages/styleguide/stories/Atoms/FormElements/FormGroup.stories.mdx index b020f35360..ea24e1288a 100644 --- a/packages/styleguide/stories/Atoms/FormElements/FormGroup.stories.mdx +++ b/packages/styleguide/stories/Atoms/FormElements/FormGroup.stories.mdx @@ -29,7 +29,7 @@ import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'; -### Form Group htmlFor +### FormGroup + htmlFor It is best to provide `htmlFor` to both the FormGroup + inner form element to make it super accessible. If this is not provided, the FormLabel will default to `
`. If an `htmlFor` is provided, it will be a `