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

UI: Fix collapse/expand all functionality #28582

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

filipemelo2002
Copy link
Contributor

@filipemelo2002 filipemelo2002 commented Jul 12, 2024

Closes #28457

Fix: Update Menu "Collapse All" option to emit STORIES_COLLAPSE_ALL
Issue: Clicking on "Collapse All" throws an error api.collapseAll is not a function

Solution: Updated the collapse from the Menus.tsx component so it can emit the new events instead of calling the old methods.

Testing

  1. Visit a Storybook
  2. Open the main menu (cog icon)
  3. Click "collapse all"
  4. Verify the tabs were collapsed

References:

Related issue: #28457
Related PR: #25486

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

  • Updated collapse menu item in /code/core/src/manager/container/Menu.tsx to emit STORIES_COLLAPSE_ALL event
  • Removed deprecated api.collapseAll method call
  • Fixed error thrown when clicking 'Collapse All' due to missing method

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

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.

There's also a dangling reference to collapseAll in shortcuts.ts. Can we fix that too?

@filipemelo2002 filipemelo2002 requested a review from shilman July 15, 2024 18:10
@vanessayuenn vanessayuenn assigned ghengeveld and unassigned yannbf Jul 30, 2024
Copy link
Member

@ghengeveld ghengeveld left a comment

Choose a reason for hiding this comment

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

Looks good, just a minor comment to handle expandAll as well.

Copy link
Member

@ghengeveld ghengeveld left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@ghengeveld ghengeveld changed the title Fix: Collapse All menu item UI: Fix collapse/expand all functionality Aug 1, 2024
@ghengeveld ghengeveld enabled auto-merge August 1, 2024 15:10
Copy link

nx-cloud bot commented Aug 1, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d4b319d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@ghengeveld ghengeveld merged commit 735b97f into storybookjs:next Aug 1, 2024
49 checks passed
@github-actions github-actions bot mentioned this pull request Aug 1, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Collapse all broken (api.collapseAll is not a function)
4 participants