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

Router: Fix navigating to hash links #17134

Merged
merged 1 commit into from Jan 5, 2022
Merged

Router: Fix navigating to hash links #17134

merged 1 commit into from Jan 5, 2022

Conversation

ndelangen
Copy link
Member

Issue: #16918

What I did

  • fix the handling of the hash-urls which are apparently not supported by react-router

How to test

  • go to a component with many stories
  • go to docs mode
  • click on the bottom story
  • expect a hash to be in the manager's URL
  • refresh the manager page
  • expect the preview to scroll to the bottom

@nx-cloud
Copy link

nx-cloud bot commented Jan 5, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 1ab9ad9. 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.

@ndelangen ndelangen self-assigned this Jan 5, 2022
@ndelangen ndelangen requested a review from shilman January 5, 2022 16:13
@ndelangen
Copy link
Member Author

I think this replaces this PR:
#17080

@ndelangen ndelangen mentioned this pull request Jan 5, 2022
@ndelangen ndelangen added the bug label Jan 5, 2022
@sag1v
Copy link

sag1v commented Jan 5, 2022

@ndelangen I'm wondering what kind of test we can add so this broken behavior won't raise it's head in the future.

@ndelangen
Copy link
Member Author

@sag1v fair question, I don't have a good idea right now.

@shilman shilman changed the title fix the issue where mdx links to a hash were broken Router: Fix navigating to hash links Jan 5, 2022
@shilman shilman added ui patch:yes Bugfix & documentation PR that need to be picked to main branch labels Jan 5, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

💯 @ndelangen 💯

@shilman shilman merged commit 4188513 into next Jan 5, 2022
@shilman shilman deleted the fix/16918-mdx-hash-link branch January 5, 2022 16:57
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jan 10, 2022
shilman added a commit that referenced this pull request Jan 10, 2022
@VilleMiekkoja
Copy link

Hash/anchor links still do not seem to work (version 6.4.18).

@sag1v
Copy link

sag1v commented Feb 10, 2022

Hash/anchor links still do not seem to work (version 6.4.18).

What are you experiencing? Does it load a blank page or just doesn't do anything...?

@VilleMiekkoja
Copy link

It loads the component into a new window without the storybook container. It's the iframe.html page version of the component that opens up.

@sag1v
Copy link

sag1v commented Feb 10, 2022

It loads the component into a new window without the storybook container. It's the iframe.html page version of the component that opens up.

Are you able to reproduce it with a clean minimal project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants