-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
UI: Remove duplicate status items in context menu #32901
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
UI: Remove duplicate status items in context menu #32901
Conversation
|
Hi everyone This PR fixes #32825 The duplication in the sidebar context menu was caused by repeated status aggregation ... both summary and individual story statuses were being shown. The fix introduces a deduplication step in ContextMenu.tsx using a Map to filter out repeated link IDs while preserving order. Verified — duplicate “status” items (e.g. “1 story with warnings”) are now removed. @storybookjs/core kindly requesting review whenever you get a chance and consider merging Thanks for maintaining this amazing project! |
|
Hi @yannbf This PR (#32901 – remove duplicate status items in context menu) fixes issue #32825, all checks are passing, and it can be cleanly merged. Thanks again! |
📝 WalkthroughWalkthroughRemoved commented-out code rendering shortcuts for a context menu item. Introduced deduplication logic to merge topLinks and links arrays, filtering out duplicate items by id, and updated the tooltip to use the deduplicated result. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
✨ Finishing touches
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (4)**/*.{js,jsx,json,html,ts,tsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
code/**/*.{ts,tsx,js,jsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
{code/**,scripts/**}/**/*.{ts,tsx,js,jsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-09-24T09:39:39.233ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Package BenchmarksCommit: No significant changes detected, all good. 👏 |
|
Hi @yannbf |
|
Thanks for your contribution. I just want to let you know that, in most large FOSS projects, reviews can take weeks to occur because maintainers are extremely busy. The usual response time for Storybook is one to two weeks, and it can climb to a month if some maintainers are sick or if there is an ongoing major release. By pinging Yann every day, you are generating additional notifications for him, which take him time. But that won't result in a faster review. Yann has many responsibilities in the team and needs to address other tasks with a higher priority. In particular, please do not ping It's okay to ask for an update after 4 weeks, but not every day. It's also okay to ask questions about the CI, so I'll be answering that in a bit 😄 If every contributor did this, the entire team would be swamped with emails and unable to get work done. We appreciate your enthusiasm, but the best way you can help us get your contribution in is to be patient. 🙏 Now, onto CI. You can click on the CircleCI statuses to check what happened. The lint error shows your code is not well formatted, so you'll need to run the formatting command ( The E2E test error is probably related to changes in the context menu. You can run this locally with: cd test-storybooks/portable-stories-kitchen-sink/react
yarn
yarn run storybook
yarn run playwright-e2e |
|
I am sorry for that , Thanks for teaching me new things 😁. |
|
View your CI Pipeline Execution ↗ for commit 68212aa
☁️ Nx Cloud last updated this comment at |
|
Hey there @Rameshkumar31595, thanks a lot for your contribution. Unfortunately, it doesn't really address the original issue. Although we truly appreciate it, as this bug was an internal-qa report from the team where we needed to do more fixes, I went ahead and worked on that in this PR: #32965 which will supersede this one. I'll be closing this PR. Thanks! |
This PR fixes issue #32825 by deduplicating sidebar context menu links before rendering.
It removes duplicate “status” entries such as “1 story with warnings” while preserving the menu order.
Fixes: #32825
Summary by CodeRabbit