GMOD / jbrowse-components

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

Fix cascading sub menus bug in embedded components in v2.14.0 #4544

Closed cmdcolin closed 3 weeks ago

cmdcolin commented 3 weeks ago

The embedded-core ViewMenu (e.g. where there are view level options like Export SVG) ended up diverging slightly from the app-core ViewMenu, where it did not use CascadingMenu, and then a bug introduced during refactoring (removal of Grow component from the @jbrowse/core/ui/Menu) resulted in the cascading effect not working, instead putting all cascading menus on the screen at once

screenshot image

This fixes it by both a) Adding the Grow back to @jbrowse/core/ui/Menu b) Converting the embedded-core ViewMenu to use CascadingMenu, just because there are benefits to the CascadingMenu (it avoids offscreen behavior)