fix(Storybook): update documentation links#6989
Conversation
✅ Deploy Preview for ibm-products-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
🚀 New features to boost your workflow:
|
| }, | ||
| { | ||
| href: 'https://react.carbondesignsystem.com/?path=/docs/modal--default', | ||
| href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview', |
There was a problem hiding this comment.
| 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.
There was a problem hiding this comment.
Ah. I didn't know that was a thing.
| label: 'Carbon Modal usage guidelines', | ||
| }, | ||
| { | ||
| href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview', |
There was a problem hiding this comment.
| 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', |
There was a problem hiding this comment.
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.
| label: 'Cascade overview', | |
| label: 'Cascade usage guidelines', |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
| href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal--overview', | |
| href: 'https://react.carbondesignsystem.com/?path=/docs/components-modal', |
|
|
||
| # InterstitialScreenViewModule | ||
|
|
||
| [InterstitialScreen overview](https://pages.github.ibm.com/carbon/ibm-products/components/onboarding/interstitial-screen/) |
There was a problem hiding this comment.
| [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/) |
There was a problem hiding this comment.
| [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>.
There was a problem hiding this comment.
I mentioned that in the description above. There are some .mdx files (not all) where changes can be saved, but are not being "built".
There was a problem hiding this comment.
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. 👀
There was a problem hiding this comment.
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/) |
There was a problem hiding this comment.
This one doesn’t seem to have updated the URL in Storybook which already uses “Saving usage guidelines” — probably need to overwrite it.
There was a problem hiding this comment.
Looks like the mdx is commented out in Saving.stories.jsx. Adding them back in should fix it. 👍
There was a problem hiding this comment.
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/) |
There was a problem hiding this comment.
| [Scrolling overview](https://pages.github.ibm.com/carbon/ibm-products/components/datagrid/scrolling/usage/) |
The scroll gradient doesn’t actually have any supporting guidelines.
| | | ||
| [Carbon Tag usage guidelines](https://carbondesignsystem.com/components/tag/usage/) | ||
| | | ||
| [Carbon Tag documentation](https://react.carbondesignsystem.com/?path=/docs/components-tag--overview) |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
Co-authored-by: elysia <elysia.hwang@gmail.com>
elycheea
left a comment
There was a problem hiding this comment.
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. 😅
ecd3714
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?