docs: fixes LinkTo and adds new docs to README#2997
Conversation
☁️ Nx Cloud ReportWe didn't find any information for the current pull request with the commit 098861d. Check the Nx Cloud Source Control Integration documentation for more information. Alternatively, you can contact us at cloud-support@nrwl.io. Sent with 💌 from NxCloud. |
…amut into cs-iconbutton-stories
LinKCoding
left a comment
There was a problem hiding this comment.
Thanks for checking through the links!!
I noted some links that didn't work, left some suggestions for consideration, and passed off some QA work that I didn't catch on my own work (sorries).
Thanks again!!
packages/styleguide/src/lib/Atoms/Buttons/IconButton/IconButton.mdx
Outdated
Show resolved
Hide resolved
packages/styleguide/src/lib/Molecules/AccordionButtonDeprecated/AccordionButtonDeprecated.mdx
Outdated
Show resolved
Hide resolved
packages/styleguide/src/lib/Molecules/AccordionDeprecated/AccordionDeprecated.mdx
Outdated
Show resolved
Hide resolved
| ### Loading | ||
|
|
||
| The `loading` prop will render a <LinkTo component="Shimmer">`Shimmer`</LinkTo> loading state. See an example below! The first `PreviewTip` is perpetually in the loading state and the second simulates loading on focus. | ||
| The `loading` prop will render a <LinkTo id="Atoms/Loaders/Shimmer">`Shimmer`</LinkTo> loading state. See an example below! The first `PreviewTip` is perpetually in the loading state and the second simulates loading on focus. |
There was a problem hiding this comment.
hard to know that Shimmer is an actual link, maybe add the text "loading state" into the <LinkTo />
E.g.
Shimmer loading state.
| const DefaultExample = () => { | ||
| return ( | ||
| export const Default: Story = { | ||
| render: () => ( |
There was a problem hiding this comment.
oof... I did a lot of these Example ... render: () => <Example /> kinda patterns. Sorries!
There was a problem hiding this comment.
np!!! it's inconsistent when it renders and doesn't 🤷
| - `ConnectedFormGroup`: <LinkTo kind='Atoms/FormGroups'>FormGroups</LinkTo> that use the context provided by `ConnectedForm` for error and disabled states. | ||
| - `ConnectedFormInputs`: <LinkTo kind='Atoms/FormInputs'>FormInputs</LinkTo> the use the context provided by `ConnectedForm` for field registration and validation as well as required and disabled states. Should be used through `ConnectedFormGroup`. | ||
| - `SubmitButton`: A submit type <LinkTo kind='Atoms/Button'>Button</LinkTo> that uses the context provided by `ConnectedForm` for loading and disabled states. | ||
| - `ConnectedForm`: A <LinkTo id='Atoms/Form'>Form</LinkTo> that provides context to all `Connected` components. |
There was a problem hiding this comment.
Should be something like Atoms/FormElements/Form
| - `ConnectedFormInputs`: <LinkTo kind='Atoms/FormInputs'>FormInputs</LinkTo> the use the context provided by `ConnectedForm` for field registration and validation as well as required and disabled states. Should be used through `ConnectedFormGroup`. | ||
| - `SubmitButton`: A submit type <LinkTo kind='Atoms/Button'>Button</LinkTo> that uses the context provided by `ConnectedForm` for loading and disabled states. | ||
| - `ConnectedForm`: A <LinkTo id='Atoms/Form'>Form</LinkTo> that provides context to all `Connected` components. | ||
| - `ConnectedFormGroup`: <LinkTo id='Atoms/FormGroups'>FormGroups</LinkTo> that use the context provided by `ConnectedForm` for error and disabled states. |
There was a problem hiding this comment.
Atoms/FormElements/FormGroup
(omit the 's')?
| `ConnectedRadioGroupInput` is the exception to the rule, and has some props that differ, particularly `options` — which takes an array of `ConnectedBaseRadioInputProps` components. | ||
|
|
||
| For further styling configurations, check out <LinkTo kind="Atoms/FormInputs/RadioGroup">RadioGroup</LinkTo>. | ||
| For further styling configurations, check out <LinkTo id="Atoms/FormInputs/RadioGroup">RadioGroup</LinkTo>. |
There was a problem hiding this comment.
Atoms/FormInputs/Radio
cause RadioGroup got combined into Radio
maybe it can be Atoms/FormInputs/Radio#RadioGroup or #radio-group? not sure if id allows for subheadings but it'd be nifty
LinKCoding
left a comment
There was a problem hiding this comment.
Updates and updated links work great!
I noticed 2 small things that shouldn't take long and are non-blocking :)
🚀🚀🚀
README.md
Outdated
| 1. Stories are written using storybook's [Component Story Format](https://storybook.js.org/docs/formats/component-story-format/) | ||
| 1. Run `yarn nx storybook styleguide` to start the storybook server | ||
| 2. Add new stories to `packages/styleguide/src` | ||
| 3. Stories are written using storybook's [Component Story Format](https://storybook.js.org/docs/formats/component-story-format/) and [MDX](https://storybook.js.org/docs/writing-docs/mdx#basic-example). Check out our Storybook's comprehensive guide on writing stories [here](https://storybook.js.org/docs/react/get-started/introduction). |
There was a problem hiding this comment.
"... Check out our Storybook's comprehensive ..."
Omit "our"
There was a problem hiding this comment.
i meant to link our storybook 😮💨
|
|
||
| - If you'd like interactive contents, use a <LinkTo id="molecules-popover">Popover</LinkTo> | ||
| - [use case]- for [describe the use case], use the [similar component] component. | ||
| - If you'd like interactive contents, use a <LinkTo id="Molecules/Popover">Popover</LinkTo> |
There was a problem hiding this comment.
missed this before, but should have a period. 🙏
📬Published Alpha Packages:@codecademy/styleguide@68.3.2-alpha.098861.0 |
|
🚀 Styleguide deploy preview ready! |
Overview
Fixes LinkTo and adds new docs to README. Also adds inline examples to ToolTips after realizing they weren't rendering
PR Checklist
Testing Instructions