Skip to content

Public profile page, and some ProfileView refactoring

Chris Oelmueller requested to merge refactor/profile-view into master

Closes #688 (closed) I think, although that was not the goal. also closes #873 (closed)

What does this MR do?

Public profile page

the QR codes on a foodsharing badge link to user profiles, which does not usually help stores determine if the person is "allowed" to fetch.

the new public profile section appears when you navigate to a profile page while logged out. it shows colorful + large indicators that are easy to understand (can / cannot pick up - only "red" for deverified users) even from afar

also there's a login button that sets the correct redirection ref, and a motivating signup button that perhaps helps people join :)

the user information that is shared on the public profile page consists of:

  • first letter of first name
  • first letter of last name the screenshots still show this, it was removed!
  • name of home region

and it's presented there alongside the passport ID to prevent using the verification of others.

ProfileView: Refactor (permissions, pickup table, translator, etc)

  • introduce separate permissions for viewing sidebar info sections
  • convert a few translations to translator, translate some German text
  • list of next pickups is now implemented in bootstrap => many layout and button fixes
  • "orga" button to cancel all pickups now has confirmation popup
  • replace a few ternary expressions with more explicit case handling => mostly to show structural similarities between info sections
  • slightly flattened the profile view handling (related to public page)

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

it shouldn't break stuff.

Links to related issues

The product team (workgroup 2296) had a forum discussion about QR code on fs badges.

How to test

  1. Open own profile after signing into some pickups (rebuilt pickup list in profile)
  2. Open user profiles while logged in (should still work the same as before, see all expected data and not see all unexpected data)
  3. Open user profiles while not logged in (this is the new feature: verified users are active, unverified - like local user "One" are considered red)
  4. Open user profiles while not logged in, log in with the brown button (should redirect to the profile page you browsed before, see #688 (closed))
  5. Play around elsewhere on the page to check if the profile/permission refactoring had other consequences

Screenshots (if applicable)

image
image
image

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Chris Oelmueller

Merge request reports