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

Profile Backend and Frontend #86

Merged
merged 22 commits into from
Apr 12, 2024
Merged

Profile Backend and Frontend #86

merged 22 commits into from
Apr 12, 2024

Conversation

aaronchan32
Copy link
Member

@aaronchan32 aaronchan32 commented Apr 10, 2024

Tracking Info

Resolves #59

Changes

  • Finished combining profile backend with frontend
  • Added binary image upload support to MongoDB using multer. Based on Philip's implementation for ALUM
  • Used busboy instead of multer (written on top of busboy) to handle parsing image data due to a cloud function bug with multer
  • Set max image size to 2MB. Accepts jpg, png, webp.
  • Added backend routes to edit name, email, and password
  • Added name, email, profilePicture id, and last password changed date for piaUser in user context

Testing

  • All features can be tested on the profile page
  • Create a new user so the piaUser user context is populated with new fields
  • Tested uploading new image and editing image
  • Tested image constraints: Example Large Image . Example Unsupported File Type (GIF)
  • Tested editing name
  • Tested editing email (will redirect user to login page)
  • Tested editing password

Additional Notes

  • We may want to require email verification when users update their email
  • We should consider providing user feedback when operations are executed successfully. Currently, the modal will close on success and otherwise display an error message
  • Some of the errors are not being handled consistently. It might be because of how our error middleware is handling it
  • We should consider letting users know that they will be redirected to the login page after updating email

@aaronchan32 aaronchan32 self-assigned this Apr 10, 2024
Copy link

github-actions bot commented Apr 10, 2024

Visit the preview URL for this PR (updated for commit ffd22f1):

https://pia-dev-60cea--pr86-feature-mraysu-profi-xzkbwhbq.web.app

(expires Fri, 19 Apr 2024 06:46:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: b780ee12a240535f7ca0729d49968573a1f3e284

Copy link
Member

@adhi0331 adhi0331 left a comment

Choose a reason for hiding this comment

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

Minor bug

frontend/src/api/users.ts Outdated Show resolved Hide resolved
Copy link
Member

@adhi0331 adhi0331 left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@adhi0331 adhi0331 merged commit e501632 into main Apr 12, 2024
4 checks passed
@adhi0331 adhi0331 deleted the feature/mraysu/profile_page_ui branch April 12, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants