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

Integrate views into the user interface #299

Closed nleroy917 closed 4 months ago

nleroy917 commented 4 months ago

Overview

This PR integrates the views API into the actual user interface of PEPhub. Its quite simple and provides a dropdown where users can select a view to replace the sample table instead of viewing the entire thing. Moreover, it adds functionality to only pull the sample table if the project annotation indicates that the sample able is less than some maximum value (5,000 right now).

If this threshold is broken, it displays a warning to the user telling them to select a view instead.

Relevant issues

Screnshots

Warning popup:

View selector:

image

TODO:

nleroy917 commented 4 months ago

@khoroshevskyi anything else?

nleroy917 commented 4 months ago

Still investigating some weirdness with the way that the network requests hang for config, subsamples, and views

khoroshevskyi commented 4 months ago

It seems like Save button is available in the views, and I can modify sample table image


khoroshevskyi commented 4 months ago

Still investigating some weirdness with the way that the network requests hang for config, subsamples, and views

This problem can be realted to this issue: https://github.com/pepkit/pepdbagent/issues/128

cloudflare-pages[bot] commented 4 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9aa827f
Status:⚡️  Build in progress...

View logs

nleroy917 commented 4 months ago

This problem can be realted to this issue: pepkit/pepdbagent#128

Close, but no. It's the validation that's causing issues. Validating that sample table takes a really long time, so I need to make sure to run that only if the project has less than 5,000 samples

nleroy917 commented 4 months ago

feedback from infrastructure meeting

Instead of a popup, just replace the sample table with a message that says its not going to display the sample table, and tell you to set the view at the top to see samples

khoroshevskyi commented 4 months ago

User feedback (not from me):

MOST important: add info about that, how to modify it

nleroy917 commented 4 months ago

Description of the each view is missing (it is one of the annotations). pepdbagent.views.get_annotation(...)

I agree this is ideal, but real estate is getting cramped up there already... what sort of UI component could we render that adds a description while not making it too large? I could add it to the "More" dropdown and make it a modal