pepkit / pephub

A web API and database for biological sample metadata
https://pephub.databio.org
BSD 2-Clause "Simplified" License
13 stars 2 forks source link

Edit table should adjust to the current screen #287

Closed khoroshevskyi closed 5 months ago

khoroshevskyi commented 5 months ago

I don't see the bottom scroll bar while editing pep on pephub. And it bothers a lot of users

nleroy917 commented 5 months ago

Example of one that is particularly egregious that I can fork and test out on my own?

nleroy917 commented 5 months ago

Actually, this is hard for me to reproduce. I always get a bottom scroll bar

khoroshevskyi commented 5 months ago

you can make huge description, this is the way you reproduce it

khoroshevskyi commented 5 months ago

Example https://pephub.databio.org/khoroshevskyi/bedboss_test_gse201797?tag=samples

nleroy917 commented 5 months ago

i see - this makes sense. I'll use this as a guide to try and fix this

nleroy917 commented 5 months ago

So, my idea is to just use JavaScript to grab the difference in height between the top of the sample table and the top of your browser window, and use that to compute the height of the table. It's like one line of code and should work well.

I suppose, however, the downside to this is that if you have huge descriptions, your sample table will be very very small. In fact if the description is so large that it rolls down the page then you'll end up with a sample table with negative height?

I suppose a more intelligent solution is one where you can "scroll away" that top section, but that might require more thought about how to do that one.

khoroshevskyi commented 5 months ago

Is it possible to set max window length for the description, like a scroll bar?

nleroy917 commented 5 months ago

yeah I can - thats kind of what i was thinking, it just might look weird? I can try it out

nleroy917 commented 5 months ago

Yes this is easy - it just looks weird when scrolling....

image