-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(website): Column remapping when submitting metadata files #3478
Conversation
771d376
to
f6b607a
Compare
3bbd86a
to
bdb1122
Compare
This comment was marked as outdated.
This comment was marked as outdated.
I think the logic needs to be reversed, with a row for each "Column in your file", for which you can choose the inputField to map to. This is because often the uploaded file may only have like 4 columns from the selection. |
ok! |
What happens if you have a column that is not mentioned in the |
Files are generally not rejected. The column remapping however would force you to either map a column to a column that is specified in the input fields, or to just not include the column. You can also just ignore column remapping altogether, and still submit files with whatever structure you like to the backend. |
Ah, so it's possible to skip the remapping? (Sorry, I haven't tried out the feature yet!) |
yes. Remapping is only done if you click the button to add a column mapping. I also took care to not decompress TSV files if no column mapping is to be applied! (I still need to test if this actually works the way I implemented it) |
This comment was marked as outdated.
This comment was marked as outdated.
I just tried this on the preview. Overall, the flow seems sensible to me. But there were a few things I stumbled on.
|
Ideally, I think we should have required columns at the top of the list. And if easy to do, we could highly columns that are already selected with a different background color or similar? |
beyond that, I think it would be good to merge this in asap after some testing. |
5ae506e
to
3809556
Compare
I checked about "And if easy to do, we could highly columns that are already selected with a different background color or similar?" -> Unfortunately the native select element options cannot be styled. I experimented with putting UTF-8 symbols with the text but wasn't happy. I think it's quite helpful though to see which ones are already mapped. A proper solution would, however, involve getting rid of the native select element. Probably not for this PR. EDIT: I ended up actually doing this; replacing the native select element. It is a bit usability improvement I think! |
db4e992
to
61fd1d1
Compare
5c5d4f1
to
219fbe7
Compare
I like the new UI. I would probably prefer if the required and desired fields would not be there twice. But not blocking. |
Thanks! All requested changes have been addressed.
website/src/components/Submission/FileUpload/UploadComponent.tsx
Outdated
Show resolved
Hide resolved
@corneliusroemer In the monday meeting you said you wanted to have a look, and this is arguably a non-trivial PR; Your input is appreciated! Chaoran already said he's fine with how things are, I've adress all of Richards points and I think all the compression related stuff that Anya mentioned is also sorted out. |
website/src/components/Submission/FileUpload/ColumnMappingModal.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I tested with metadata in all zip combinations except for .xz
and this works, I also tried out some column renaming and read through the code. I'm not a typescript expert but everything looks very good and the feature is working really nicely!
resolves #3432
preview URL: https://column-remapping.loculus.org/
Summary
Screenshot
PR Checklist