Contact Collection and Dataset owner feature#609
Conversation
1e33bdb to
5cedc6c
Compare
There was a problem hiding this comment.
I left some suggestions to improve the code and organize it in a better way.
I think the way you name the contact repository methods is a bit confusing, ContactDTO, submitContactInfo, useSubmitContact. Maybe something more related to what you are doing which is sending feedback to the owners.
On the other hand I think you had a confusion between repositories and factories, factories is a convention that the project has to create or instantiate the components at page level.
And repositories must be created only once in these factories and passed through props to the component that wants to use it.
Also you can simplify success message with a toast instead of an alert.
Please take a look at all the comments first and then see what needs to be changed.
If you need any help let me know, after these changes I will analyze the UI and functionality in more depth.
|
I've approved but I saw that component test coverage is not reaching the branch coverage min of 95%. |
|
I think you are missing testing closing the dialog? See https://coveralls.io/builds/72453589/source?filename=src%2Fsections%2Fshared%2Fcontact%2Fcontact-modal%2Fcontact-modal.tsx#L74 |
g-saracca
left a comment
There was a problem hiding this comment.
Looks good! Approving!
|
Hello! One quick observation - after a user sends an email, click on contact again. I noticed that the email form doesn't reset and all the previous data is still present. Can be reproduced in both states (Authenticated/non authenticated user). Screen.Recording.2025-03-19.at.3.25.23.PM.mov |
|
tested updating User email successfully: Screen.Recording.2025-03-19.at.3.46.13.PM.mov |
|
Looks good from my end, merging PR |
What this PR does / why we need it:
The goal is to replicate the Contact feature on the Collection Page and Dataset Page.
Which issue(s) this PR closes:
Special notes for your reviewer:
Not sure contact factory is written in a correct way or not to create contact repository
Suggestions on how to test this:
Show a success alert on the page after submission.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
No
Additional documentation: