Skip to content

docs: fixes LinkTo and adds new docs to README#2997

Merged
codecademydev merged 12 commits intomainfrom
cs-iconbutton-stories
Dec 17, 2024
Merged

docs: fixes LinkTo and adds new docs to README#2997
codecademydev merged 12 commits intomainfrom
cs-iconbutton-stories

Conversation

@dreamwasp
Copy link
Contributor

@dreamwasp dreamwasp commented Dec 16, 2024

Overview

Fixes LinkTo and adds new docs to README. Also adds inline examples to ToolTips after realizing they weren't rendering

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: GM-917
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • [n/a] The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

  • Check out the new README
  • Check some places with LinkTo
  • Check out the examples in ToolTips

@nx-cloud
Copy link

nx-cloud bot commented Dec 16, 2024

☁️ Nx Cloud Report

We didn't find any information for the current pull request with the commit 098861d.
Please verify you are running the latest version of the NxCloud runner.

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.

@dreamwasp dreamwasp changed the title start fixing linkto + readme docs: fixes LinkTo and adds new docs to README Dec 16, 2024
@dreamwasp dreamwasp marked this pull request as ready for review December 16, 2024 21:19
@dreamwasp dreamwasp requested a review from a team as a code owner December 16, 2024 21:19
Copy link
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!!

### 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: () => (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof... I did a lot of these Example ... render: () => <Example /> kinda patterns. Sorries!

Copy link
Contributor Author

@dreamwasp dreamwasp Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@dreamwasp dreamwasp requested a review from LinKCoding December 17, 2024 19:04
Copy link
Contributor

@LinKCoding LinKCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... Check out our Storybook's comprehensive ..."
Omit "our"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed this before, but should have a period. 🙏

@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/styleguide@68.3.2-alpha.098861.0

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://6761dc01f655b938571b4a4a--gamut-preview.netlify.app

Deploy Logs

@dreamwasp dreamwasp added the Ship It :shipit: Automerge this PR when possible label Dec 17, 2024
@codecademydev codecademydev merged commit dce0716 into main Dec 17, 2024
8 of 9 checks passed
@codecademydev codecademydev removed the Ship It :shipit: Automerge this PR when possible label Dec 17, 2024
@codecademydev codecademydev deleted the cs-iconbutton-stories branch December 17, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants