-
Notifications
You must be signed in to change notification settings - Fork 334
making showLayerPanel toggleable in the layerPanel #831
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
base: master
Are you sure you want to change the base?
Conversation
|
I left these settings out of the viewer state, and only allowed them to be configured from Python or via JavaScript directly, because I thought it may be confusing for users to end up in a viewer state without the expected Neuroglancer UI. However, it may be reasonable to expose these as part of the Neuroglancer state. There is the issue, though, of making these interoperate correctly with the existing Python or JavaScript configuration options. Just adding these directly to the viewer state means that resetting the viewer state will also reset these UI configuration options, which previously was not the case. Instead I think we want the effective option to be "enabled in UI configuration state AND enabled in viewer state" --- meaning that if a particular UI control is disabled from the existing ViewerConfigState in Python, then it cannot be enabled from the viewer state. |
|
Separately there is the question of which options to expose in the UI, as you have done here with the showLayerPanel option, and which to just expose in the JSON state. |
|
makes sense. I think having the layer side panel makes it possible to get to the layer controls, I did consider putting some kind of eyeball button next to all the layers to just hide all the elements of the list, but since there was already this mechanism I thought this would be a better direction. I will try to make the layerPanel visible option a seperate option that is tracked in the state.. and if the existing UI configuration option is disabled I'll also turn this option off (so that the user cannot make the layerPanel visible). I do think that having it available in the UI is useful, particularly given that you have the layerPanel side panel now which can modally accessed and hidden. |
|
but to be clear, i really only expect a small subset of people to use this option when they are using a generic deployment to do a task that has a lot of layers, or layers whose name bars get very long because they have segment properties with long strings. |
|
I'm confused as to why the screenshot tests failed, when all i did was add a button to the LayerPanelList and I don't think that's visible in any of these tests. |
|
thanks @fcollman and @jbms! I had thought about this before but wasn't sure how best to combine the JSON state and the viewer config, I think this is a very nice merge of the two. Not sure why the tests are failing, I merged master and tried locally and they were fine. Maybe worth trying a merge of master into this? |
1ef66c3 to
92db0e8
Compare
92db0e8 to
c8d44f1
Compare
Co-authored-by: Sean Martin <[email protected]>
This is particularly useful for those people who are trying to make simplified neuroglancer visualizations, and/or users who are working with large numbers of layers.