-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix(stories): adjust routing #95442
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(stories): adjust routing #95442
Conversation
8175a67
to
2ce276e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #95442 +/- ##
===========================================
+ Coverage 38.44% 86.54% +48.10%
===========================================
Files 9955 10548 +593
Lines 559478 607699 +48221
Branches 23822 23806 -16
===========================================
+ Hits 215092 525958 +310866
+ Misses 344090 81445 -262645
Partials 296 296 |
0817d94
to
d49a174
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Tree Node Selection Fails for Direct Items
The getStoryTreeNodeFromKey
function incorrectly assumes all items in props.defaultItems
are StorySection
s, failing to find StoryTreeNode
s that are directly present (not wrapped in sections). This causes selection to fail silently for such items. Additionally, within StorySection
processing, it inefficiently calls node.find
on already flattened leaf nodes from category.options
instead of directly comparing node.filesystemPath === key
.
static/app/stories/view/storySearch.tsx#L248-L264
sentry/static/app/stories/view/storySearch.tsx
Lines 248 to 264 in 16ce35d
function getStoryTreeNodeFromKey( | |
key: Key, | |
props: SearchComboBoxProps | |
): StoryTreeNode | undefined { | |
for (const category of props.defaultItems) { | |
if (isStorySection(category)) { | |
for (const node of category.options) { | |
const match = node.find(item => item.filesystemPath === key); | |
if (match) { | |
return match; | |
} | |
} | |
} | |
} | |
return undefined; | |
} |
Was this report helpful? Give feedback by reacting with 👍 or 👎
Follow-up to #95442, which updated sidebar and search routing behavior but did not update the footer navigation. This PR refactors the story footer cards to use the new URL scheme rather than the old query scheme.
Follow-up to #95442, which updated sidebar and search routing behavior but did not update the footer navigation. This PR refactors the story footer cards to use the new URL scheme rather than the old query scheme.
Follow-up to #95365. Previously, legacy URLs would not be redirected. Now, legacy URLs force a redirect. Previously, the sidebar and search pointed to the legacy URLs, which required a redirect. Now, the sidebar and search leverage the new URLs and pass along `state` info.
Follow-up to #95442, which updated sidebar and search routing behavior but did not update the footer navigation. This PR refactors the story footer cards to use the new URL scheme rather than the old query scheme.
Follow-up to #95365.
Previously, legacy URLs would not be redirected.
Now, legacy URLs force a redirect.
Previously, the sidebar and search pointed to the legacy URLs, which required a redirect.
Now, the sidebar and search leverage the new URLs and pass along
state
info.