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

feat(code-snippet): update story to Storybook v7 #11312

Conversation

m4olivei
Copy link
Contributor

@m4olivei m4olivei commented Jan 3, 2024

Related Ticket(s)

Closes #11311

Description

Adjustments to code-snippet component to be compatible with Storybook v7.

Changelog

Changed

  • Updated code-snippet Storybook component for Storybook v7

@m4olivei m4olivei requested a review from a team as a code owner January 3, 2024 20:13
@m4olivei m4olivei requested review from ariellalgilmore and annawen1 and removed request for a team January 3, 2024 20:13
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jan 3, 2024

@m4olivei
Copy link
Contributor Author

m4olivei commented Jan 3, 2024

As an aside, I noticed a couple of bugs with code snippet here, also on the main branch:

  • Multiline is missing the clipboard icon. Just shows two perpendicular lines on hover:

image

  • In the Playground story, after setting feedback and feedbackTimeout, the feedback dissapears nearly instantly, even with a feedbackTimeout of 5000 (5 seconds).

Copy link

@RichKummer RichKummer left a comment

Choose a reason for hiding this comment

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

LGTM @m4olivei !

One question: would there be a quick way to add the layering design from the react Storybook into this? The format in react does a great job of highlighting the layer structure which feels missing here.

Screenshot 2024-01-08 at 1 44 34 PM

@m4olivei
Copy link
Contributor Author

m4olivei commented Jan 8, 2024

Thanks for the review @RichKummer !

One question: would there be a quick way to add the layering design from the react Storybook into this? The format in react does a great job of highlighting the layer structure which feels missing here.

Yes! This is now fixed.

After your comment I dug in a bit more on this point. I discovered that stories for some components, including code-snippet, we were not fully declaring their dependencies for the layering decoration. This gets exposed with the small set of components that we're presently rendering in this branch of Storybook, as we build back up to the full set. I've corrected that in this and all my other PR's that incorporate the same "With Layer" style stories.

@m4olivei m4olivei force-pushed the chore/code-snippet-sb-v7 branch from 9da3e3f to 63004f9 Compare January 10, 2024 20:19
Copy link
Contributor

@IgnacioBecerra IgnacioBecerra left a comment

Choose a reason for hiding this comment

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

LGTM!

@kennylam kennylam merged commit c9193f9 into carbon-design-system:feat/cwc-storybook-7-vite Jan 11, 2024
7 of 14 checks passed
kennylam added a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Jun 11, 2024
…m#11312)

* chore(code-snippet): update code-snippet to sb v7

* chore(code-snippet): include storybook layers components

* chore(code-snippet): include storybook layers components

---------

Co-authored-by: kennylam <[email protected]>
Co-authored-by: Ignacio Becerra <[email protected]>
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.

5 participants