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

Add table icons to the WorkBench data sets dialog based on base table #4475

Merged
merged 24 commits into from
Feb 14, 2024

Conversation

grantfitzsimmons
Copy link
Member

@grantfitzsimmons grantfitzsimmons commented Jan 28, 2024

Solves #1562

image

Steps to test:

  1. Verify that all existing data sets use the base table icon rather than the "WB" icon in the WorkBench data sets dialog
  2. Create a new data set in several base tables
  3. Add many columns with complicated mappings
  4. Add values across the spreadsheet
  5. Save and upload
  6. Open dialog and verify the base table icon is used and all looks correct
  7. Upload an existing spreadsheet
  8. Map, validate, and upload
  9. Open dialog and verify the base table icon is used and all looks correct
  10. Perform the testing steps 2-8 with the batch attachment uploader to ensure all is working as expected (no icons will show in that dialog)

Copy link
Member

@maxpatiiuk maxpatiiuk left a 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?

Co-authored-by: Max Patiiuk <max@patii.uk>
@grantfitzsimmons
Copy link
Member Author

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)

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 baseTableName

@maxpatiiuk
Copy link
Member

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 baseTableName

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

@maxpatiiuk
Copy link
Member

spoiler about the cause of the TypeScript error you are getting in GitHub Actions The 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

Copy link
Member

@maxpatiiuk maxpatiiuk left a 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

@grantfitzsimmons grantfitzsimmons requested a review from a team January 28, 2024 03:33
@grantfitzsimmons grantfitzsimmons marked this pull request as ready for review January 28, 2024 03:39
@grantfitzsimmons grantfitzsimmons requested a review from a team January 28, 2024 03:39
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

👍

@realVinayak
Copy link
Collaborator

Nice! Maybe extend that to batch image upload too? You can also get what the table is from the uploadplan there!

Copy link
Collaborator

@emenslin emenslin left a 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.

@realVinayak
Copy link
Collaborator

funny that we have so multiple names for batch upload
batch attachment upload
batch image upload
bulk uploader (in the code)

@grantfitzsimmons grantfitzsimmons requested a review from a team January 31, 2024 15:02
@grantfitzsimmons
Copy link
Member Author

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.

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!

@grantfitzsimmons
Copy link
Member Author

image

There you go– your dreams have come true @realVinayak!

@grantfitzsimmons
Copy link
Member Author

I'll fix the tests soon– no merging until that's complete!

@grantfitzsimmons grantfitzsimmons added this to the Grant's issue list milestone Feb 1, 2024
Copy link
Collaborator

@emenslin emenslin 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 in batch attachment upload now as well! :)
Screenshot 2024-02-01 111602

@grantfitzsimmons grantfitzsimmons requested a review from a team February 5, 2024 01:05
Copy link

@bronwyncombs bronwyncombs left a comment

Choose a reason for hiding this comment

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

Excellent 🐸 🎩

Screenshot 2024-02-13 at 8 26 13 AM Screenshot 2024-02-13 at 8 25 37 AM

@grantfitzsimmons grantfitzsimmons merged commit 9ba6a23 into production Feb 14, 2024
9 checks passed
@grantfitzsimmons grantfitzsimmons deleted the issue-1562 branch February 14, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Data Sets should use the table icon they are mapped to
6 participants