JumboCode / casa-myrna

JumboCode 2023-2024 project for Casa Myrna, led by Elizabeth Foster
https://casa-myrna-pumv.vercel.app
4 stars 0 forks source link

Refresh Profile List in Employer-Manage-Profiles page after Adding/Modifying/Deleting Profile (no more page refresh) #114

Closed pmelga01 closed 6 months ago

pmelga01 commented 6 months ago

Developer: Pamela Melgar Dates: 2/26/24 - 2/27/24 Time spent: 3 hours

Adjusting filter button to be responsive to variety of mobile devices

Testing

Before: difficult to show

After (desktop): image

Reflection: Man this got me more than I thought it would, but I feel like I got more comfortable with the code as a result. I'm extremely proud that the profile list now updates, but have doubts that there was a better way to implement it. There are some problems I couldn't resolve, there was a trade-off between implementing the profile list updating and with the snackbar message popping up.

Adding profile - (works great now), no known issues.

Modifying profile / Deleting profile - (used to have issue where the snackbar message would never appear, despite the handleSnackbarOpen function being called correctly, I think it's an async / re-render issue with the code I wrote for the profile list updating on the screen, commenting the new code would allow the snackbar to function properly, adding my new code would make it non-existent.

Known issues: To get this to a "good enough state" / better than it was before, attempting to delete the profile or modify a profile will always make the confirmation message snackbar appear, however, if there is an error, it will also appear. In both scenarios, it appears way too briefly, (the adding one demonstrates how it is supposed to work), but it shows up long enough for there to be some user feedback, even if it's a short amount.

Discovered bug while debugging my own code - modifying the email address and pressing save changes doesn't actually modify the email address in the database, and I believe this is a formData format issue that David and I missed on a previous ticket, but I wasn't able to figure it out. I also wanted to point it out and make sure this was always an issue before my ticket, or something that happened with my changes, (i'm 60% sure it's the former because the formData format just looks off).