Skip to content

fix(Storybook): update documentation links#6989

Merged
paul-balchin-ibm merged 10 commits into
carbon-design-system:mainfrom
paul-balchin-ibm:6659_fix-storybook-docs-links
Mar 12, 2025
Merged

fix(Storybook): update documentation links#6989
paul-balchin-ibm merged 10 commits into
carbon-design-system:mainfrom
paul-balchin-ibm:6659_fix-storybook-docs-links

Conversation

@paul-balchin-ibm
Copy link
Copy Markdown
Contributor

@paul-balchin-ibm paul-balchin-ibm commented Feb 26, 2025

Closes #6659

Review and fix 404 links where possible.

What did you change?

38 various Storybook pages: .mdx, .docs-pages.js, and .stories.js.

Fixed once we figured out the difference between .mdx, .docs-page.js, and the various ways of using <StoryDocsPage /> Note: some changes would not refresh or rebuild for no apparent reason: ActionBar, NotificationsPanel, Saving, TagSet.

How did you test and verify your work?

  • Storybook

@paul-balchin-ibm paul-balchin-ibm requested a review from a team as a code owner February 26, 2025 17:07
@paul-balchin-ibm paul-balchin-ibm requested review from elycheea and makafsal and removed request for a team February 26, 2025 17:07
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 26, 2025

Deploy Preview for ibm-products-web-components ready!

Name Link
🔨 Latest commit f732f30
🔍 Latest deploy log https://app.netlify.com/sites/ibm-products-web-components/deploys/67d058bdf26e9600086827e1
😎 Deploy Preview https://deploy-preview-6989--ibm-products-web-components.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.

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 26, 2025

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit f732f30
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/67d058bdfbf5d7000899ef5f
😎 Deploy Preview https://deploy-preview-6989--carbon-for-ibm-products.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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.73%. Comparing base (ccb1295) to head (f732f30).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6989      +/-   ##
==========================================
- Coverage   81.74%   81.73%   -0.01%     
==========================================
  Files         399      399              
  Lines       12970    12970              
  Branches     4269     4269              
==========================================
- Hits        10602    10601       -1     
- Misses       2368     2369       +1     
Components Coverage Δ
ibm-products ∅ <ø> (∅)
ibm-products-web-components ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@paul-balchin-ibm paul-balchin-ibm marked this pull request as draft February 26, 2025 17:30
},
{
href: 'https://react.carbondesignsystem.com/?path=/docs/modal--default',
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview',
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal',

While this updates correctly, I think removing --overview is actually safer in case there are future changes to their story organization.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah. I didn't know that was a thing.

label: 'Carbon Modal usage guidelines',
},
{
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview',
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal',

href: 'https://www.carbondesignsystem.com/guidelines/motion/overview/',
label: 'Carbon motion guidelines',
href: 'https://pages.github.ibm.com/carbon/ibm-products/patterns/cascade/',
label: 'Cascade overview',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interesting that we’re calling it “overview” instead of usage guidelines. Is it because the Cascade doesn’t go to a Usage tab? But
I would keep with the same naming for now but open this as a discussion in #6959.

Suggested change
label: 'Cascade overview',
label: 'Cascade usage guidelines',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's the problem with specificity.

/ibm-products/components/about-modal/usage/ → "AboutModal usage guidelines"

  • Is part of the "Component" navigation.
  • "/usage/" in the URL.
  • "Usage" tab name.
  • "guidelines" is a word used in the doc, but not specifically about AboutModal.

ibm-products/patterns/cascade/

  • Is part of the "Patterns" navigation.
  • No mention of "/usage/" in the URL.
  • No "Usage" tab. (No tabs at all)
  • No mention of "guidelines" anywhere.
  • "Overview" is the first section. (But is one of three with the same heading level)

ibm-products/guidelines/accessibility/overview/

  • "Guidelines" is a specific section in the navigation. (But it's not directly linkable)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While I understand your point, for this current issue, I’d avoid introducing new naming until we have a larger discussion on the IA via #6959.

For most of our patterns, you’ll notice that the majority of our “patterns” do still have a Usage and Code tab, whether or not that’s correct. (You’ll see occasional ”Overviews” too.) While I’m not sure why Cascade and Notifications panel don’t currently have one, I would treat them the same until the larger docs issue.

},
{
href: 'https://react.carbondesignsystem.com/?path=/docs/modal--default',
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview',
href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal',

Comment thread packages/ibm-products/src/components/GetStartedCard/GetStartedCard.mdx Outdated

# InterstitialScreenViewModule

[InterstitialScreen overview](https://pages.github.ibm.com/carbon/ibm-products/components/onboarding/interstitial-screen/)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
[InterstitialScreen overview](https://pages.github.ibm.com/carbon/ibm-products/components/onboarding/interstitial-screen/)
[InterstitialScreen usage guidelines](https://pages.github.ibm.com/carbon/ibm-products/components/onboarding/interstitial-screen/)

# NotificationsPanel

[CD&AI Notifications panel usage guidelines](https://pages.github.ibm.com/carbon/ibm-products/patterns/notifications/usage/)
[CD&AI Notifications panel usage guidelines](https://pages.github.ibm.com/carbon/ibm-products/components/notification-panel/usage/)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
[CD&AI Notifications panel usage guidelines](https://pages.github.ibm.com/carbon/ibm-products/components/notification-panel/usage/)
[Notifications panel usage guidelines](https://pages.github.ibm.com/carbon/ibm-products/components/notification-panel/usage/)

This one is actually coming up as a broken link in Storybook — although we updated the MDX, it looks like notifications panel URL actually comes from the Stories file where we have the <StoryDocsPage>.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I mentioned that in the description above. There are some .mdx files (not all) where changes can be saved, but are not being "built".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ahh, I figured out the issue in NotificationsPanel

export default {
  title: 'IBM Products/Components/Notifications panel/NotificationsPanel',
  component: NotificationsPanel,
  tags: ['autodocs'],
  parameters: {
    styles,
    layout: 'fullscreen',
    docs: {
      page: mdx,
    },
  },
  // ...
}

Currently, docs are under argTypes. Might be the same issue for those other pages. 👀

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the .mdx page was old, I replaced it with a docs-page.js in #6904.

# Saving

[Usage guidelines](https://pages.github.ibm.com/carbon/ibm-products/patterns/saving/usage/)
[Saving usage guidelines](https://pages.github.ibm.com/carbon/ibm-products/components/save/usage/)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This one doesn’t seem to have updated the URL in Storybook which already uses “Saving usage guidelines” — probably need to overwrite it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like the mdx is commented out in Saving.stories.jsx. Adding them back in should fix it. 👍

Copy link
Copy Markdown
Contributor Author

@paul-balchin-ibm paul-balchin-ibm Mar 3, 2025

Choose a reason for hiding this comment

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

Replaced .mdx file with inline <StoryDocsPage ... />, same as .../CreateTearsheetNarrow.stories.jsx.


# ScrollGradient

[Scrolling overview](https://pages.github.ibm.com/carbon/ibm-products/components/datagrid/scrolling/usage/)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
[Scrolling overview](https://pages.github.ibm.com/carbon/ibm-products/components/datagrid/scrolling/usage/)

The scroll gradient doesn’t actually have any supporting guidelines.

Comment on lines +9 to +12
|
[Carbon Tag usage guidelines](https://carbondesignsystem.com/components/tag/usage/)
|
[Carbon Tag documentation](https://react.carbondesignsystem.com/?path=/docs/components-tag--overview)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn’t look like these updates are applied since TagSet doesn’t use the MDX file at the moment. (I see it but it’s commented out.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The import of the .mdx file was commented out in the .stories.js file.

If you and I were part of the "in crowd", we would have known that because the page property wasn't defined, then by default the Storybook setup was automatically injecting the following...

export default {
  page: () => (
    <StoryDocsPage />
  ),
}

...which is why we didn't understand why our .mdx updates weren't being applied.

Whoever did the last update didn't clean up behind themselves, leaving us to deal with the mess.

Comment thread packages/ibm-products/src/components/TagSet/TagSet.stories.jsx Outdated
elycheea
elycheea previously approved these changes Mar 6, 2025
Copy link
Copy Markdown
Contributor

@elycheea elycheea left a comment

Choose a reason for hiding this comment

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

I made one small fix since I realize that my last suggested change broke since StoryDocsPage was never imported in the TagSet stories before. 😲 TagSet docs should be back up now. 😅

davidmenendez
davidmenendez previously approved these changes Mar 10, 2025
@paul-balchin-ibm paul-balchin-ibm added this pull request to the merge queue Mar 12, 2025
Merged via the queue into carbon-design-system:main with commit 50f65d9 Mar 12, 2025
@paul-balchin-ibm paul-balchin-ibm deleted the 6659_fix-storybook-docs-links branch March 12, 2025 12:20
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.

Audit storybook docs for any 404 guideline links

4 participants