Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query metadata for reviewcards #994

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

TobiasKampmann
Copy link
Contributor

@TobiasKampmann TobiasKampmann commented Feb 12, 2024

Preview: https://940-query-metadata-for-re.loculus.org

resolves #940

Summary

Currently exclude status processing and received as the endpoint get-data-to-edit exclude them.

This is a draft to discuss.

Allowing lazy loading for the individual card shows especially when throttling the bandwidth via dev tools. The list appears very fast and will be filled as data arrives. There is currently no indicator of loading yet => draft

By enabling compression server side and with our dummy data, even with sending all data, it works even this way.

Missing: When a sequence entry has a warning the icon should be yellow. Lazy loading makes that not-so-trivial as the information that there is a warning is lazy loaded.

Screenshot

image

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by an appropriate test.

@TobiasKampmann TobiasKampmann force-pushed the 940-query-metadata-for-reviewcards branch from 3cc6c72 to 6b1114d Compare February 12, 2024 12:53
@TobiasKampmann TobiasKampmann added the preview Triggers a deployment to argocd label Feb 12, 2024
@corneliusroemer corneliusroemer added RFC website Tasks related to the web application labels Feb 12, 2024
@TobiasKampmann TobiasKampmann force-pushed the 940-query-metadata-for-reviewcards branch 2 times, most recently from b44917d to 5d9524d Compare February 12, 2024 15:49
@TobiasKampmann TobiasKampmann force-pushed the 940-query-metadata-for-reviewcards branch from 5d9524d to 29e8400 Compare February 12, 2024 16:05
@TobiasKampmann
Copy link
Contributor Author

TobiasKampmann commented Feb 12, 2024

To circumvent the issues revealed by this ticket, this is a follow-up:
#1000

Most of the changes here will stay, so I suggest to get this merged before working on the next ticket.

@TobiasKampmann TobiasKampmann marked this pull request as ready for review February 12, 2024 16:15
@theosanderson
Copy link
Member

Congrats on this. I haven't really looked at the code because my brain is fried (off sick).

But I did have a play with it. It looks really good. Do I understand correctly that in the next PR you won't be lazy loading? I think that probably makes sense.

I was initially looking on mobile (which I accept won't be a common use case, but I guess the rest of the site does work on mobile). There, there is some overlapping going on at the right hand side.

I do think we need to use react-tooltip or similar - the native tooltips take too long to appear (here we are using the tooltip to convey real data on the error message, not just a hint of what UI does). Also one can't make the tooltips appear on mobile.

@theosanderson
Copy link
Member

Oh and my suggestion would be to put the padlock at the bottom and the tick/cross etc. at the top

@TobiasKampmann
Copy link
Contributor Author

Thats disappointing with the tooltips, right now we use html capabilities. Less js is always better ;) And it is straight-forward to set just a title...

I guess you didnt discovered the tooltip on the padlock? ;) Should we put the restrictedUntil as a real field if dataUseTerms is restricted?

The overlap stems from the display: absolute. I change that.

@theosanderson
Copy link
Member

theosanderson commented Feb 12, 2024

Hehe, the best experience for our users is always better (and I agree that for many purposes that will be HTML tooltips, but in this case we're not using the tooltip conventionally, we're using it to display a message that changes( e.g. the "Swizzerland is not a country"). So users, however well they know our website, have to trigger the tooltips, which isn't the use case that HTML tooltips are designed for

@theosanderson
Copy link
Member

Your colours on the edit page - text-red-600 - are really nice - we should use them here too :)

@theosanderson
Copy link
Member

Yes, displaying restrictedUntil sounds good!

@corneliusroemer
Copy link
Contributor

corneliusroemer commented Feb 12, 2024

I agree with @theosanderson that the standard tooltip delay is too long

There's a layout issue when submitter ids are of differing lengths:
image

Also layout shift here - I guess we need some sort of (hidden) table to keep things aligned more broadly across sequences

image

@TobiasKampmann
Copy link
Contributor Author

But we display the full error message, too.. So execpt for the padlock-restrictedUntil info there is no essential info behind a tooltip right now...

@TobiasKampmann
Copy link
Contributor Author

The delay is not customizable. I forfeit and reintroduce a js lib for that ;)

@corneliusroemer
Copy link
Contributor

We might want to show tooltips for all sorts of things so we need a library eventually anyways. I agree that in this case here they might not be essential (yet) but that's just a question of time.

@theosanderson
Copy link
Member

theosanderson commented Feb 12, 2024

I don't think we have to keep things aligned across sequences. If there is a super long location in one field then all the other sequence tiles will be mostly empty space. For me the core of this looks good. We can definitely see if we can make improvments downstream.

@TobiasKampmann TobiasKampmann force-pushed the 940-query-metadata-for-reviewcards branch from 29e8400 to e7c4b6e Compare February 12, 2024 17:37
@TobiasKampmann
Copy link
Contributor Author

the overlapping issue is a bit harder...

I would suggest to make a "linebreak" after the accession/submission Id block. This way the buttons as they are should be overlap-free. Maybe one have to limit the width of the id-block, too.

@theosanderson
Copy link
Member

Let's not add a line break if you mean that will be visible on the page. We can definitely make this work with flexbox and stuff. Feel free to leave it as is with the overlap and raise an issue for me to fix the overlap

@TobiasKampmann
Copy link
Contributor Author

I found a solution. We use a bit more space on small displays, but it looks very good ... in my opinion :D

@TobiasKampmann
Copy link
Contributor Author

Its not perfect though... There is a width, where the break doesnt appear, but stuff overlap. But as a first draft, I suggest, this is fine for now.

@theosanderson
Copy link
Member

theosanderson commented Feb 13, 2024

Sounds good. I'll let Fabian comment on the code as my brain is still not really working and in any case I struggle with Kotlin, but appearance looks good to merge and we can tweak later.

@TobiasKampmann TobiasKampmann force-pushed the 940-query-metadata-for-reviewcards branch 2 times, most recently from ed9a7bb to 8c21720 Compare February 13, 2024 09:55
website/src/components/ConfirmationDialog.tsx Outdated Show resolved Hide resolved
website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@fengelniederhammer fengelniederhammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
@theosanderson
Copy link
Member

(BTW, after submitting 500 sequences if I move to another tab and then back to the review page the page is fully white for like 5 seconds or more. But I presume that will change with pagination etc.)

Copy link
Contributor

@corneliusroemer corneliusroemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unusable when there are ~1000 sequences, but this will get better with pagination

image

I thought this would be ok, but now I'm stuck with 1000 sequences and browser freezes totally making preview unusable.

For now, could we somehow limit the number of cards shown to prevent browsers from freezing when someone uploads 1000 sequences (which does happen in testing)?

I managed to dig myself out of the hole by using: https://940-query-metadata-for-re.loculus.org/dummy-organism/user/seq (the old submit view) which didn't crash. So now we're back to usable - but would be best to avoid having something that freezes with modest numbers of sequences on main.

@theosanderson
Copy link
Member

theosanderson commented Feb 13, 2024

Unusable when there are ~1000 sequences, but this will get better with pagination

But Tobias has acknowledged that (in general terms) and suggested we defer that fix until #1000.. #994 (comment) that seems fine. That should entirely change things since the website should only ever have knowledge of 50-100 sequences at a time, and otherwise just a number of pages

IMO we should go for whatever makes development the fastest and doesn't lead to a worse final outcome

Copy link
Contributor

@corneliusroemer corneliusroemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as there's a workaround via the old review page (without that one would be stuck indefinitely with a crashing page)

@TobiasKampmann TobiasKampmann force-pushed the 940-query-metadata-for-reviewcards branch 2 times, most recently from d8e73ef to 3d7e75e Compare February 14, 2024 09:26
@TobiasKampmann
Copy link
Contributor Author

@theosanderson currently the restricted until is in the tooltip of the padlock.

Should I just add restrictedUntil as a metadataField, i.e., displaying it as such.

@theosanderson
Copy link
Member

@theosanderson currently the restricted until is in the tooltip of the padlock.

Should I just add restrictedUntil as a metadataField, i.e., displaying it as such.

IMO your current approach is good!

@TobiasKampmann
Copy link
Contributor Author

Then there is only one thing left:
When data is loaded and a seq is AWAITING_APPROVAL will switch its check icon from green to yellow when warnings are loaded.

@TobiasKampmann TobiasKampmann force-pushed the 940-query-metadata-for-reviewcards branch from 3d7e75e to 5646075 Compare February 14, 2024 09:50
Copy link
Contributor

@fengelniederhammer fengelniederhammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

website/src/components/ReviewPage/ReviewCard.tsx Outdated Show resolved Hide resolved
…-edit

 * add data use terms to response of get-sequences
 * add data use terms icon to overview
@TobiasKampmann TobiasKampmann force-pushed the 940-query-metadata-for-reviewcards branch from 5646075 to e725672 Compare February 14, 2024 12:11
@TobiasKampmann TobiasKampmann merged commit 5853417 into main Feb 14, 2024
12 checks passed
@TobiasKampmann TobiasKampmann deleted the 940-query-metadata-for-reviewcards branch February 14, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Triggers a deployment to argocd website Tasks related to the web application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

query metadata for ReviewCards
4 participants