GMOD / jbrowse-components

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

Unable to click "force load" button at high zoom levels in some cases #3158

Closed cmdcolin closed 1 year ago

cmdcolin commented 2 years ago

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

Screenshot from 2022-08-23 15-41-31

cmdcolin commented 2 years ago

gwas plugin now always tries to render so less common but could come up in other scenarios

carolinebridge commented 2 years ago

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.

cmdcolin commented 2 years ago

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?

cmdcolin commented 2 years ago

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

cmdcolin commented 1 year ago

this is probably a rare use case. may not be worth spending too much time on it unless it comes up again