jbrowse-components
jbrowse-components copied to clipboard
Unable to click "force load" button at high zoom levels in some cases
When looking at e.g. GWAS data, it may get the feature density is too high error but we want to override that. The jbrowse-plugin-gwas may want to ignore the feature density somehow, but currently, it looks like this

gwas plugin now always tries to render so less common but could come up in other scenarios
I looked into this for a bit today -- it might be difficult to determine when the container for the alert is "too small" to click the button (unless this is only a thing if you're viewing all regions...I think it might be risky to assume that).
Might consider moving the force load to a universal snackbar alert instead of directly on the track? Or if there's a concern for having those overlap / have multiple in a row for different LGV's perhaps overlay one force load overtop of all the regions (instead of constraining to each region) to have the button / message accessible that way.
it might be difficult to determine when the container for the alert is "too small"
i think we could probably technically make the block "measure itself" using a ref -> ref.getClientBoundingRect().width or similar (there are also maybe fancy css ways like https://stackoverflow.com/questions/12251750/can-media-queries-resize-based-on-a-div-element-instead-of-the-screen but the ref measuring should be fine). then maybe if block is smaller than 500px we just make it a compact version of itself e.g. error or warning text on mouseover or something?
this is a random note but now that blocks are smaller (forced to 800px following https://github.com/GMOD/jbrowse-components/pull/3207), we may not need the "repeater" concept that doubles the error messages
this is probably a rare use case. may not be worth spending too much time on it unless it comes up again