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

fix(addon-docs): assume links starting with "https://" are external #17819

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

GuilleDF
Copy link
Contributor

Issue: #17308

What I did

  • I updated the check for MDX links to see if the link starts with https://. Not all external links will, but this seems like a pretty easy way to detect most cases.
  • I set target="_blank" as default for external links, but it can be overridden by the user. Let me know if you agree with this, or would prefer not to have this.

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@nx-cloud
Copy link

nx-cloud bot commented Mar 29, 2022

☁️ Nx Cloud Report

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

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@GuilleDF
Copy link
Contributor Author

Not sure about the test failures, they do seem to pass on my local machine

@kylegach kylegach self-assigned this Apr 4, 2022
@kylegach kylegach added addon: docs patch:yes Bugfix & documentation PR that need to be picked to main branch labels Apr 5, 2022
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.

Hi, @GuilleDF. Thanks for your PR and congratulations on your first contribution! I left a detailed comment which needs addressed, then this should be good-to-go.

addons/docs/src/blocks/mdx.tsx Outdated Show resolved Hide resolved
@GuilleDF GuilleDF requested a review from kylegach April 5, 2022 08:26
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.

This is great! Thanks again, @GuilleDF.

@kylegach kylegach merged commit 83b957d into storybookjs:next Apr 5, 2022
@shilman shilman added maintenance User-facing maintenance tasks and removed patch:yes Bugfix & documentation PR that need to be picked to main branch labels Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants