jbrowse-components icon indicating copy to clipboard operation
jbrowse-components copied to clipboard

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

Open cmdcolin opened this issue 3 years ago • 4 comments
trafficstars

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 avatar Aug 23 '22 21:08 cmdcolin

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

cmdcolin avatar Aug 23 '22 22:08 cmdcolin

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.

carolinebridge avatar Sep 26 '22 15:09 carolinebridge

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 avatar Sep 26 '22 16:09 cmdcolin

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 avatar Sep 26 '22 16:09 cmdcolin

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

cmdcolin avatar Nov 02 '22 20:11 cmdcolin