Skip to content

Use new upload API for profile pictures

Alex requested to merge replace-profile-picture-upload into master

Probably closes #83 (closed) and #1034 (closed). Also part of #45 (closed), #261 (closed), #928 (closed), ...

What does this MR do?

Uses the upload API, which was introduced in !818 (merged), for profile pictures:

  • new REST endpoint PATCH /user/photo that sets a previously uploaded image as the user's profile photo
  • new vue component in the profile settings for uploading a photo (see screenshot below)
  • Replaces all instances where the photo is included (e.g. dashboard, forum, ...) with the new API's URL. This is backwards compatible for all previously uploaded photos.

How confident are you it won't break things if deployed?

Quite sure. The upload API is already in use for food-share-points and should be working. I'm not perfectly sure about the way I included profile pictures.

How to test

Steps a reviewer can take to verify that this MR does what it says it does e.g.

uploading:

  1. Checkout branch locally
  2. Login as foodsaver
  3. Go to account -> settings
  4. Upload a new profile picture

then test if that picture appears:

  1. in a forum or wall post
  2. after signing into a pickup slot in a store
  3. in chat windows
  4. next to any kind of dashboard entry

Screenshots (if applicable)

picture_upload

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • use "state:" labels to track this MR's state until it was beta tested
  • added an entry to CHANGELOG.md
  • add a short text that can be used in the release notes (refactoring)
  • Once your MR has been merged, you are responsible to create a testing issue in Beta Testing Repo:
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...). how this change can be tested.
    • Be aware, that also non technical people should understand.
Edited by Alex

Merge request reports