feat(ui): create standard dialog with header and footer to use across shader code dialogs, screenshot, and future dialogs#805
Open
seankmartin wants to merge 24 commits intogoogle:masterfrom
Open
Conversation
This also involves a refactor. But primarily it is designed so that the dialogs which contain code editors can share styles and features across them. The layer can also inform the header of the code editor, like "Annotation shader editor"
with the changes, the top row is now shared logic across layers, so a specific class is not needed as the style can be controlled from one place
The previous was a bit too big
Will remove or add together
This reverts commit 7338d0d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The overall idea here is to create something more baseline that could be reused across neuroglancer for simple dialogs that have a header and a footer. By the default the footer has a primary button, which just closes the dialog if nothing else is specified for it. And the header contains a title and a close icon. The body contains nothing.
Currently, this would allow removing custom code setting up different kinds of shader code editor overlays/dialogs but it also means we can take a little bit of complexity out of the screenshot dialog.
We're planning to have another header footer dialog in upcoming work with the annotation schema to edit the description for a property which is when we realised that some kind of base class and styling would be quite useful.
We also noticed while applying this that the screenshot dialog had some small missing hover states, so we've added those in.
Open to exact stylings there, don't feel strongly about those. The main aim was to reduce code duplication and have something to use as a basis for future dialogs. Overall, the dialogs would look something like this: