Skip to content

fix: Merge sidebar options maintaining original values#157

Merged
Sidnioulz merged 2 commits intoSidnioulz:mainfrom
aduth:fix/sidebar-merge
Mar 19, 2026
Merged

fix: Merge sidebar options maintaining original values#157
Sidnioulz merged 2 commits intoSidnioulz:mainfrom
aduth:fix/sidebar-merge

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Mar 11, 2026

Fixes #150

Updates config handling to maintain user-specified sidebar options.

addons.setConfig performs a shallow merge, so passing an object that contains only renderLabel means that any other options specified by downstream consumers (e.g. showRoots, etc.) would be discarded.

The changes proposed here maintain the expected defaulting renderLabel behavior while also carrying forward any other sidebar settings.

Comment thread src/manager.tsx
@Sidnioulz Sidnioulz self-requested a review March 19, 2026 11:37
@Sidnioulz Sidnioulz self-assigned this Mar 19, 2026
@Sidnioulz Sidnioulz added the bug Something isn't working label Mar 19, 2026
@Sidnioulz
Copy link
Copy Markdown
Owner

Thank you for your contribution @aduth! Much appreciated!

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@2aa1fbd). Learn more about missing BASE report.
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #157   +/-   ##
=======================================
  Coverage        ?   66.25%           
=======================================
  Files           ?       22           
  Lines           ?      326           
  Branches        ?      115           
=======================================
  Hits            ?      216           
  Misses          ?       98           
  Partials        ?       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

aduth and others added 2 commits March 19, 2026 12:53
Signed-off-by: Steve Dodier-Lazaro <sidnioulz@gmail.com>
Signed-off-by: Steve Dodier-Lazaro <sidnioulz@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

@Sidnioulz Sidnioulz merged commit fd51485 into Sidnioulz:main Mar 19, 2026
7 of 8 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.0.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The addons seems to prevent Storybook's collapsedRoots from working

3 participants