-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add table icons to the WorkBench data sets dialog based on base table #4475
Conversation
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.
Code looks good but I have a concern
The reason upload plan wasn't added by Ben to this endpoint is that it could be bad for performance (make the data sets dialog take more time to load, especially since we don't have any pagination or caching for this endpoint)
could you modify this PR to only add baseTableName field instead of the entire uploadPlan?
specifyweb/frontend/js_src/lib/components/Toolbar/WbsDialog.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Max Patiiuk <max@patii.uk>
specifyweb/frontend/js_src/lib/components/Toolbar/WbsDialog.tsx
Outdated
Show resolved
Hide resolved
This is interesting– and absolutely something I considered. The upload plan is generally much smaller than the whole data set, but there are situations where it can become fairly complicated. I'll see if I can only add |
No problem - the other thing you can do is benchmark what impact this change makes on a representative or worst case database And also, adding pagination is something we have to do anyway at some point, so that would mitigate the concern quite a bit |
spoiler about the cause of the TypeScript error you are getting in GitHub ActionsThe typescript type you modified appears to be used not just in the WorkBench, but also in the Attachments Bulk Upload - you would likely need to create a separate TypeScript type that extend this one with one new field added, and then use this new TypeScript type in the WorkBench |
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.
as per the performance test you did, I am fine with the way this PR is (or with only including baseTableName)
btw, if you are curious, take a look at GraphQL (as opposed to REST APIs that we use) - with GraphQL, the front-end defines what data it needs, and the back-end sends just that data
specifyweb/frontend/js_src/lib/components/Toolbar/WbsDialog.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.
👍
Nice! Maybe extend that to batch image upload too? You can also get what the table is from the uploadplan there! |
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.
Everything workbench wise looks good, I like the new icons. The last part of the testing checklist says to test the same things on batch attachment uploader however there weren't any changes made there.
funny that we have so multiple names for batch upload |
I should have clarified that I did not intend for the icons to be included in the batch attachment upload tool, I just wanted to ensure no functionality was lost/broken due to these changes! |
There you go– your dreams have come true @realVinayak! |
This reverts commit 9389ae3.
I'll fix the tests soon– no merging until that's complete! |
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.
specifyweb/frontend/js_src/lib/components/AttachmentsBulkImport/Datasets.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.
Solves #1562
Steps to test: