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

hierarchical track selector config options: collapse by default, sort ordering #26

Closed
garrettjstevens opened this issue Nov 29, 2018 · 16 comments · Fixed by #3810
Closed

Comments

@garrettjstevens
Copy link
Collaborator

@rbuels I decided to not actually do any configs for the track selector until the stuff you're working on now gets merged.

I was just planning to do some simple configs to have categories be expanded or collapsed by default. We could probably do a category and track sorting config sometime too, but not sure if we want to add that quite yet.

@rbuels rbuels added the needs review needs verification and/or more specifics label May 8, 2019
@rbuels rbuels removed the needs review needs verification and/or more specifics label Dec 6, 2019
@rbuels
Copy link
Contributor

rbuels commented Dec 6, 2019

draft config options that we would want initially:

  • collapse sections by default (boolean)
  • sort tracks and categories by name ascending/descending
  • explicitly provide sort order of categories and tracks? how would we represent this in the config?

@rbuels rbuels changed the title Implement config options for hierarchical track selector hierarchical track selector config options: collapse by default, sort ordering Dec 6, 2019
@cmdcolin
Copy link
Collaborator

cmdcolin commented May 3, 2021

I think we might want to renew this issue

The ordering is pretty arbitrary and based on ordering in config.json file. Should we implement something new?

@cmdcolin
Copy link
Collaborator

cmdcolin commented May 3, 2021

I believe the v1.1.0 has a default sort by name on categories but the virtualized tree removed this just for reference, resulting in slightly different observed ordering between v1.1.0 and v1.2.0 upcoming

@JoshuaFortriede
Copy link

Is there any update on this? It would be helpful to have more configuration on the track selector, specifically collapsing at category levels. It would also be good to have a defaultCollapse value and then collapse: {"Category_A":false"} to uncollapse specific categories.

@cmdcolin
Copy link
Collaborator

cmdcolin commented Dec 6, 2022

@JoshuaFortriede no updates on this yet but thanks for posting to add interest :) will try to see if we can get this worked in...

@anamariaelek
Copy link

An unexpected behavior I see here: it seems that the track that appears first (in any the category) in the config file ends up being the last one (in that category) in the track selector

@cmdcolin
Copy link
Collaborator

@anamariaelek is there any specific default behavior that you think might be best by chance? just asking cause we could try to make e.g. alphabetical sort on each category a default or e.g. "first that appears in config.json appears first in list" also

@AlbatrosHurleur
Copy link

@cmdcolin
I would vote for display order following config order :)

@anamariaelek
Copy link

anamariaelek commented Jul 14, 2023

I agree with @AlbatrosHurleur, having an option to modify this by changing the order in the config is really useful

@cmdcolin
Copy link
Collaborator

@anamariaelek @AlbatrosHurleur thanks for pushing forward with this issue. I made a PR here that may help to address #3808

can try it out the beta branch with jbrowse create --branch fix_track_ordering newinstance (or wait till next release! hopefully not too long)

@cmdcolin
Copy link
Collaborator

released in v2.6.3, some docs added here! https://jbrowse.org/jb2/docs/config_guides/track_selector/

@cmdcolin
Copy link
Collaborator

by default it should follow more or less the "order in the config.json" with the optional collapsing and alphabetical sorting documented there

@baeywen
Copy link

baeywen commented Sep 15, 2023

i upgraded to v2.6.3, and try to add the collapse feature into config.json following the docs, but it does not work in my test.
"configuration": {
"hierarchical": {
"sort": {
"trackNames": true,
"categories": true
},
"defaultCollapse": {
"topLevelCategories": true
}
}
},

@cmdcolin
Copy link
Collaborator

cmdcolin commented Sep 16, 2023

hi there, it is actually named "defaultCollapsed" and not "defaultCollapse". the docs are incorrect in a couple places on this so I will fix. hope that helps

@cmdcolin
Copy link
Collaborator

note also that the "defaultCollapsed" option are only applied when your session is first loaded, so you may need to clear the ?session= parameter from the URL bar for it to take effect

@baeywen
Copy link

baeywen commented Sep 16, 2023

hi there, it is actually named "defaultCollapsed" and not "defaultCollapse". the docs are incorrect in a couple places on this so I will fix. hope that helps

yes, this solved my problem. Thanks a lot!!

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 a pull request may close this issue.

7 participants