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 collapse roots to sidebar navigation #13685

Merged
merged 11 commits into from
Feb 25, 2021
Merged

Conversation

tooppaaa
Copy link
Contributor

@tooppaaa tooppaaa commented Jan 20, 2021

Issue: Roots should be collapsible

What I did

Add capacity to collapse roots (default and runtime)

How to test

  • Storybook
    image

@tooppaaa
Copy link
Contributor Author

@ghengeveld @domyen Could you please review this one ? :)

@domyen
Copy link
Member

domyen commented Jan 22, 2021

Thanks this is awesome!

QA below:

I can jump in to help with the CSS alignment when this is resolved.

@ghengeveld ghengeveld self-requested a review January 25, 2021 19:45
@tooppaaa
Copy link
Contributor Author

@domyen @ghengeveld, updated !

@shilman shilman changed the title feat(Tree): add capacity to collapse roots UI: Add collapse roots to sidebar navigation Feb 1, 2021
@shilman shilman added this to the 6.2 core milestone Feb 1, 2021
@tooppaaa
Copy link
Contributor Author

@domyen @ghengeveld, Any news ? I can't remember where I left this.

@domyen
Copy link
Member

domyen commented Feb 24, 2021

Haven't had a chance to look at it yet! It's on my todo list 🙏

@ghengeveld
Copy link
Member

@tooppaaa I'm going to get this over the line for you ASAP.

@ghengeveld ghengeveld self-assigned this Feb 25, 2021
@ghengeveld
Copy link
Member

ghengeveld commented Feb 25, 2021

I did a bunch of work on this:

  • I fixed and cleaned up the styling so the root labels appear exactly as they did before.
  • I made the triangle icon appear only on hover for expanded roots to keep a clean aesthetic, and aligned it correctly.
  • The expand/collapse all icon now appears only when the root node is expanded, so that you have a minimalistic look when it's collapsed and because its behavior is a little weird on collapsed roots. That also means we don't need special handling on this button when the root is collapsed or expanded.
  • I renamed some options/properties for conciseness. Specifically the global config option is now collapsedRoots instead of defaultRootsCollapsed.
  • Roots can no longer be highlighted with the keyboard (up/down), because that would be inconsistent with the expand/collapse all button which also cannot be highlighted like that. Instead they can be focused using the Tab key and toggled using Space or Enter.
Screenshot.2021-02-25.at.17.06.31.mov

@domyen
Copy link
Member

domyen commented Feb 25, 2021

Thanks for getting this over the line @ghengeveld!

I made the triangle icon appear only on hover for expanded roots to keep a clean aesthetic, and aligned it correctly.

Can we show the triangle all the time? That way it is more obvious and thus easier to use.

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.

awesome @tooppaaa @ghengeveld 💯

This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants