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

[preview 4] Redesign panel sections in sidebar #1721

Closed
wants to merge 13 commits into from

Conversation

victorlin
Copy link
Member

Prototyping for #1704. For preview purposes only. Do not merge.

The component was written to allow tooltip as optional, so make that
explicit. Other props should be required.
This keeps the styling closer to where it is used.
Previously, it looked like language was a part of Panel Options.
Instead of determining in the sidebar and passing down as props.
Disabling this makes typed prop drilling more readable by not requiring
a conditional for optional props¹.

¹ https://stackoverflow.com/a/48816255
Split AnnotatedHeader into AnnotatedTitle and ControlHeader. A future
commit will introduce PanelHeader.

This places the header info icon immediately to the right of the title,
instead of the far right side (to make room for the upcoming panel
visibility toggle).
Do this with some new panel-specific components that build upon the
existing AnnotatedTitle and Toggle components.

Simplify headers and translations to just the panel name (e.g. Tree)
instead of "Show <panel name>" / "<panel name> Options".

Conditionally render the entire "Panel Options" section including the
header.

This also adds a section for the entropy panel to maintain its
toggle-ability. This is an empty section because it does not have any
sidebar options.
This color is now used for more than just the unselected background.
I chose the title "Display" even though it is called "layout" in the
state because "Layout" is already used to describe tree layout, and I
didn't want translations to conflict.

I also contemplated putting this control at the top. However, its
conditional rendering worsens usability upon toggling panel visibility,
as the scroll position is changed due to its placement above the
toggles.
@victorlin victorlin force-pushed the victorlin/move-panel-toggles-preview4 branch from e3eabae to 8a69ca2 Compare November 13, 2023 22:46
@victorlin victorlin temporarily deployed to auspice-victorlin-move--smhs4h November 13, 2023 22:46 Inactive
@victorlin victorlin closed this Nov 14, 2023
@victorlin victorlin deleted the victorlin/move-panel-toggles-preview4 branch November 14, 2023 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants