-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Deep linking to "kinds" broken in SB5 #5925
Comments
But that's just because there is no story called "UI|MenuItem:default"? This link works: https://storybooks-official.netlify.com/?path=/story/ui-layout-desktop-mocked--default |
Not sure what's going on here 🤷♂️ |
Right on. This was a bad URL 👍 Deep linking is working in SB5 |
@NicoleGrondinAlayacare Confirmed the old behavior in 4.x and the new (regressed) behavior in 5.x. 5.x: https://storybooks-official.netlify.com/?selectedKind=Addons%7CKnobs.withKnobs Updating the issue description |
I reckon we can fix this but it's not trivial. Something for 5.1.0? |
Some notes:
|
Ok. I fixed the regression here: #6688 I still want to look at linking to kind only. I also worked out that the ordering difference between Safari & Chrome is due to this line: https://github.com/storybooks/storybook/blob/5925-fix-kind-deep-linking/lib/ui/src/components/sidebar/treeview/utils.js#L63 (You are supposed to return 1,0,or -1 from sort, I guess browsers differ if you return a bool). I don't think the treeview should be sorting at all, due to reasons discussed (namely the keyboard shortcuts will be inconsistent with the treeview == much uggh). I will get rid off this and fix #5827 also |
Boo-yah!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.37 containing PR #6688 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
More to do |
Zoinks!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.40 containing PR #6720 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
H/t @NicoleGrondinAlayacare
Confirmed the old behavior in 4.x and the new (regressed) behavior in 5.x.
4.x: https://5c7e1a14bc4b210008a05f9f--storybooks-official.netlify.com/?selectedKind=Addons%7CKnobs.withKnobs
5.x: https://storybooks-official.netlify.com/?selectedKind=Addons%7CKnobs.withKnobs
Click on: https://storybooks-official.netlify.com/?path=/story/ui-menuitem--defaultBefore anything shows it will automatically re-route to: https://storybooks-official.netlify.com/?path=/story/ui-panel--defaultClick on: https://storybooks-official.netlify.com/?selectedKind=UI%7CMenuItem&selectedStory=default&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Fstories%2Fstories-panelIt will (correctly) reroute to: https://storybooks-official.netlify.com/?path=/story/ui-menuitem--defaultBut then, before anything shows it will automatically re-route to: https://storybooks-official.netlify.com/?path=/story/ui-panel--defaultThe text was updated successfully, but these errors were encountered: