Closed leekahung closed 9 months ago
Would need to update tests for the modal to include validation
Just looking at your videos above - I think I'd prefer the error be shown on the Username field instead of the notification hook toast popup. It would directly show the user which field is incorrect and needs fixing.
Like triggering the 'error' prop on the field and helper text of 'user does not exist' (or similar) as well.
Just looking at your videos above - I think I'd prefer the error be shown on the Username field instead of the notification hook toast popup. It would directly show the user which field is incorrect and needs fixing.
Like triggering the 'error' prop on the field and helper text of 'user does not exist' (or similar) as well.
Got it included, see updated clip in description.
This PR:
Resolves #415 by including an early validation step that exits the
handleAddContact
function ifwebId
being added does not exist. Minor clean-up toAddContactModal.jsx
has also been included.Screenshots (if applicable):
https://github.com/codeforpdx/PASS/assets/14917816/34243825-53e1-4a86-82bc-9a54cc637ad7
Future Steps:
Related to a new bug, but if you were to include another user with a webId that already exists, but is already included in the contacts list, the new submission will overwrite the information from the existing contact from the list.
https://github.com/codeforpdx/PASS/assets/14917816/79c1b849-9b7d-497b-a90a-3469d7029dd0