GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
208 stars 62 forks source link

Allow drawer widget to be "popped out" into a dialog box #4443

Closed cmdcolin closed 5 months ago

cmdcolin commented 5 months ago

This is a proposal to allow drawer widgets to be "popped out" into a dialog box, giving more space to the widget contents than the small drawer can provide at the risk of being a modal dialog

Screenshot 2024-06-14 at 3 30 41 PM

the icon to pop out is in the drawer widget header

Screenshot 2024-06-14 at 3 32 44 PM

this is sort of in contrast to the proposal to allow widgets to become part of the "view stack". that could potentially be done also i suppose, but this was comparatively easier to implement

cmdcolin commented 5 months ago

xref #1510

cmdcolin commented 5 months ago

some caveats: the track selector doesn't quite look right in this mode since it uses requires a parent node for auto-sizing which is sort of finicky with the dialog. the embedded components do handle this somewhat reasonably though so could double check that. might also be nice if we could allow user-resizing of the dialog box.

Screenshot 2024-06-14 at 3 35 36 PM
cmdcolin commented 5 months ago

I adapted the "ModalWidget" code from embedded-core to the purpose of the Modal dialog used in this case, which addresses some of the styling challenges mentioned above

cmdcolin commented 5 months ago

just gonna go with merge :) i think it's a fun feature that could help some rare circumstances, and seems to not hurt. a "model=true" flag is passed in so things could detect if they are in a dialog

cmdcolin commented 5 months ago

let me know if there are concerns