-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add collapsible accordion sections in configuration editor #2796
Conversation
710ed44
to
7dc1dd6
Compare
Codecov Report
@@ Coverage Diff @@
## main #2796 +/- ##
==========================================
- Coverage 59.98% 59.97% -0.01%
==========================================
Files 584 584
Lines 26676 26679 +3
Branches 6454 6458 +4
==========================================
Hits 16002 16002
- Misses 10345 10348 +3
Partials 329 329
Continue to review full report at Codecov.
|
I considered whether it is desirable to limit the width of the callback editor to the width of the parent, and what the behavior might be. It seems like the two things that might be ideal is that it would wrap, but jexls are single line, or it extends to the right. If it extends to the right, that means that individual element could have a side scroll, or the entire side panel side scrolls. This PR has the entire side panel side scroll. This helps avoid a bit of "too many scroll bars" ...just a single side scrollbar for the drawer. |
summary: this PR, which does not limit the width of the callback editor, could perhaps be better than trying to limit the width of the callback editor |
curious what @garrettjstevens and @scottcain might think, follows from discussion yesterday |
I think collapsible sections could be nice, but with this PR I can't really see the "hierarchy" of the config sections (e.g. that "textSearchAdapter" is nested under "textSearching"). I use that hierarchy a lot to navigate the config editor, so it would be nice for me to be able to see that better. |
In the old hierarchical track selector I think we specifically put a darker color on the accordion colors...could probably do that here too |
7dc1dd6
to
b4c4814
Compare
That border helps me, although might I suggest |
9e6ffab
to
db276c8
Compare
plugins/config/src/ConfigurationEditorWidget/components/ConfigurationEditor.js
Outdated
Show resolved
Hide resolved
I like the config path, it makes it easier to understand what I'm looking at. What would you think if we enabled the collapse/expand animation, but made it shorter? The default looks like it's 300, and I think as short as 150 it looks fine. I've noticed that the animation helps me to navigate more easily. |
150ms is good, feels fairly fast. pushed to here |
maybe can merge! great feedback @garrettjstevens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 from me
This is a possible helper for #1402
Adds collapsible sections to the config editor. All sections are expanded by default, but they can be collapsed. The animation on collapsing is disabled so it happens quickly.
I wasn't able to make the configuration editor for the long callback strings get smaller (be contained in the width of the drawer) but you can sidescroll now (overflow:none is removed)
live link
https://jbrowse.org/code/jb2/accordion_config_editor/?config=test_data%2Fvolvox%2Fconfig.json&session=share-BfuDrTSD5P&password=LFGyt