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

Links: Update LinkTo component #21569

Merged
merged 4 commits into from Mar 16, 2023
Merged

Links: Update LinkTo component #21569

merged 4 commits into from Mar 16, 2023

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Mar 13, 2023

Fixes #9502 (at least for LinkTo).

What I did

  1. I updated LinkTo and the SELECT_STORY event to take title/name (in addition to) kind/story.
  2. I change the href that the LinkTo component to strip the iframe.html, so it behaves sensibly when you cmd click or copy the URL.

What I didn't do

Update the API to take of={}. This would be a natural evolution but now is not the time to do that.

How to test

Add to a docs mdx file:

import LinkTo from '@storybook/addon-links/react'

<LinkTo title="Example/Header" name="Logged In">Header</LinkTo>

Try:

  1. Clicking normally
  2. Cmd clicking
  3. Copying the URL.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@tmeasday tmeasday merged commit e1077e3 into next Mar 16, 2023
@tmeasday tmeasday deleted the tom/9502-fix-internal-links branch March 16, 2023 22:37
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.

Addon-Docs: MDX links to internal docs cannot be opened in new tab
3 participants