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: Add support for expand/collapse keyboard shortcuts #12980

Merged

Conversation

teimurjan
Copy link
Contributor

@teimurjan teimurjan commented Nov 2, 2020

What I did

Added STORIES_EXPAND_ALL and STORIES_COLLAPSE_ALL listeners to useExpanded hook. By doing that I fixed broken collapse/expand shortcuts and made api.collapseAll, api.expandAll working.

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.

Thanks for this! I completely forgot about it. I have only one small suggestion. Other than that this LGTM.

lib/ui/src/components/sidebar/useExpanded.ts Outdated Show resolved Hide resolved
@ghengeveld ghengeveld assigned teimurjan and unassigned ghengeveld Nov 9, 2020
@teimurjan
Copy link
Contributor Author

@ghengeveld

@ghengeveld
Copy link
Member

@teimurjan Could you please pull in the latest changes from next. Some tests are failing but I don't see how they relate to this PR.

@teimurjan
Copy link
Contributor Author

@ghengeveld done

@teimurjan
Copy link
Contributor Author

@ghengeveld it still fails. do you have an idea why?

@shilman shilman changed the title feat: add support for expand/collapse shortcuts UI: Add support for expand/collapse keyboard shortcuts Dec 1, 2020
@shilman shilman merged commit 94052ae into storybookjs:next Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants