Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Slug): move slug examples under experimental section #15294

Merged
merged 8 commits into from
Dec 5, 2023

Conversation

tw15egan
Copy link
Member

@tw15egan tw15egan commented Nov 30, 2023

Based on feedback from @mattrosno. This moves all slug-specific stories under the unstable__slug storybook folder. It also adds comments to components with a slug prop to mark it as an experimental prop. Also closes #15296

Changelog

New

  • A new Examples folder under unstable__Slug in storybook. This contains an example of each component that has the slug prop.

Changed

  • Moved the AI Form story to under unstable__Slug, as well as all associated styles
  • Moved the Tile slug test story to under unstable__Slug, as well as all associated styles
  • Moved the Radio Button and Checkbox slug test stories to under unstable__Slug, as well as all associated styles
  • Added Experimental: before each slug prop type definition

Removed

Testing / Reviewing

  • Ensure the existing Tile and Form stories do not have any regressions with the removal of the story-style files.
  • Ensure the components render as expected inside unstable__Slug --> Form
  • Ensure the components render as expected inside unstable__Slug --> Examples and the props work as expected

Copy link

netlify bot commented Nov 30, 2023

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit b67dc40
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/656e3557fa73bb000866cb42
😎 Deploy Preview https://deploy-preview-15294--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@mattrosno mattrosno left a comment

Choose a reason for hiding this comment

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

This is great. One question. Why do I see slug in the prop table here:

https://deploy-preview-15294--v11-carbon-react.netlify.app/?path=/story/components-textinput--default

But not in the experimental example?

https://deploy-preview-15294--v11-carbon-react.netlify.app/?path=/story/experimental-unstable-slug-examples--text-input

That seems important in all these examples, to show how the Slug is passed into each component?

@tw15egan
Copy link
Member Author

tw15egan commented Dec 1, 2023

@mattrosno I can add it, I just had those select few props to test the components in various states. Adding the slug prop to that table isn’t going to let them change the slug that is rendered inside the component though. The knobs are great for basic state changes, but to understand how to use the slug prop I’d expect the story code itself to be more help.

We could also add example usage inside the mdx file if we want

Copy link
Member

@mattrosno mattrosno left a comment

Choose a reason for hiding this comment

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

Storybook organization and experimental status in prop tables LGTM.

I found one bug. I don't know if this is getting addressed in a different issue or not. The label is overlapping with the slug where if you click directly on the slug icon, it selects that label not the slug. If you click outside of that label but still within the 32px slug, it then triggers the slug as expected.

image

@tw15egan
Copy link
Member Author

tw15egan commented Dec 4, 2023

@mattrosno fixed 👍🏻 I believe that was unique to Textarea since the label and slug line up, let me know if that's not the case though

@github-actions github-actions bot added this pull request to the merge queue Dec 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 5, 2023
@tw15egan tw15egan added this pull request to the merge queue Dec 5, 2023
@tay1orjones tay1orjones removed this pull request from the merge queue due to a manual request Dec 5, 2023
@tay1orjones tay1orjones merged commit 5067a9b into carbon-design-system:main Dec 5, 2023
21 checks passed
danoro96 pushed a commit to danoro96/carbon that referenced this pull request Jan 18, 2024
…ign-system#15294)

* docs(Slug): move slug examples under experimental section

* refactor(Slug): move all slug examples under slug

* test(e2e): update form test to match new location

* refactor(Slug): add controls to slug example components

* docs(Slug): add slug to controls table

* style(TextArea): fix label width issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Disabled prop under checkbox is not showing in the storybook
4 participants