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

Maintenance: Fix broken and outdated documentation links #29412

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

jonniebigodes
Copy link
Contributor

@jonniebigodes jonniebigodes commented Oct 20, 2024

Closes #29352

With this pull request, the links included in the monorepo were updated to address the recent updates to the documentation, preventing them from generating errors (e.g., 404 and 500).

What was done:

  • Updated the links where possible to match the current state of the documentation

This body of work may require patching back to the main branch and released as a patch version. I would leave it up to the rest of the maintainers to address how best to proceed.

Greptile Summary

Updated documentation links across multiple files in the Storybook codebase to fix broken and outdated references.

  • Removed '/react' and version-specific segments from URLs to make them framework-agnostic
  • Updated links in error messages, comments, and test files to reflect current documentation structure
  • Modified prompt messages in migration scripts to use correct, up-to-date documentation links
  • Added TODO comments for temporary fixes related to preventing 500 errors during migrations
  • Ensured consistency in link updates across various renderer files (HTML, Preact, React, Server, Svelte, Vue3, Web Components)

Copy link

nx-cloud bot commented Oct 20, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 059df06. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@jonniebigodes jonniebigodes added the maintenance User-facing maintenance tasks label Oct 20, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

29 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile

@kasperpeulen kasperpeulen added ci:docs Run the CI jobs for documentation checks only. documentation maintenance User-facing maintenance tasks ci:normal and removed maintenance User-facing maintenance tasks documentation ci:docs Run the CI jobs for documentation checks only. ci:normal labels Oct 21, 2024
Copy link
Contributor

@kylegach kylegach left a comment

Choose a reason for hiding this comment

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

Wow, great clean up work!! ❤️

I left one comment to be addressed, but will go ahead and approve to unblock you.

code/core/src/server-errors.ts Show resolved Hide resolved
Copy link
Contributor

@kylegach kylegach left a comment

Choose a reason for hiding this comment

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

I fixed the underlying bug that was breaking a bunch of redirects. It's definitely better to have the canonical URLs being used everywhere, though, so this PR is still great.

The one exception is that some of the migration guide links pertain specifically to SB 8 features, so those should retain the version in the URL. I've left comments calling each of those out.

prompt({}) {
return dedent`
You have features.legacyMdx1 in your Storybook main config file. This feature has been removed. Shall we remove it from your Storybook main config file?
Link: https://storybook.js.org/docs/8.0/migration-guide
Link: https://storybook.js.org/docs/migration-guide
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, I've fixed the bug that broke some redirects, including this one.

Proof: https://storybook.js.org/docs/8.0/migration-guide

Because this link is specific to the 7→8 migration guide, it's best that the version remains so that it points to the correct place when SB 9 is released.

Suggested change
Link: https://storybook.js.org/docs/migration-guide
Link: https://storybook.js.org/docs/8.0/migration-guide

@@ -108,7 +109,7 @@ export const viteConfigFile = {
If you already have these plugins, you can ignore this message.

You can find more information on how to do this here:
https://storybook.js.org/docs/8.0/migration-guide/#missing-viteconfigjs-file
https://storybook.js.org/docs/migration-guide#missing-viteconfigjs-file
Copy link
Contributor

Choose a reason for hiding this comment

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

See prior comment

Suggested change
https://storybook.js.org/docs/migration-guide#missing-viteconfigjs-file
https://storybook.js.org/docs/8.0/migration-guide#missing-viteconfigjs-file

@@ -118,7 +119,7 @@ export const viteConfigFile = {
Please add a vite.config.js file to your project root.

You can find more information on how to do this here:
https://storybook.js.org/docs/8.0/migration-guide/#missing-viteconfigjs-file
https://storybook.js.org/docs/migration-guide#missing-viteconfigjs-file
Copy link
Contributor

Choose a reason for hiding this comment

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

See prior comment

Suggested change
https://storybook.js.org/docs/migration-guide#missing-viteconfigjs-file
https://storybook.js.org/docs/8.0/migration-guide#missing-viteconfigjs-file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:normal maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Link to Storybook docs from composition menu fails
3 participants