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

Allow users to manage their profile photo [PlanID: 2023.3/27/1.5] #483

Closed
4 of 5 tasks
darh opened this issue Nov 11, 2022 · 11 comments · Fixed by #887
Closed
4 of 5 tasks

Allow users to manage their profile photo [PlanID: 2023.3/27/1.5] #483

darh opened this issue Nov 11, 2022 · 11 comments · Fixed by #887
Assignees
Labels
backend Backend server changes (GO) frontend Frontend code changes (Javascript, Typescript, Vue.js)

Comments

@darh
Copy link
Contributor

darh commented Nov 11, 2022

Administrators can enable (default) or disable if users can set their own profile photo in the auth/profile pages. The profile photo is either an uploaded photo or custom initials (1-3 ASCII characters) with a custom background and text colour. Administrators can also upload and set the initials with colours for any user via the admin panel.

The profile photo is then used on the top navigation on the right side.


  • for image - we accept JPEG and PNG formats, max size (propose)MB, resize to (propose)x(propose)px dimensions.
  • admin can enable/disable photo upload (enabled by default)
  • admin can enable/disable "the initials" feature (enabled by default)
  • create a special endpoint to serve profile photos for users, accepts user-id and dimensions (resized on-demand)
  • in-browser resizing and cropping is a bonus.
@darh darh added the TBD To be defined label Nov 11, 2022
@darh darh added this to the 2023.3.0-dev.3 milestone Nov 11, 2022
@darh darh added the frontend Frontend code changes (Javascript, Typescript, Vue.js) label Nov 14, 2022
@KinyaElGrande
Copy link
Contributor

Moving this issue to the backlog and focus on #682.

@katrinDY
Copy link
Contributor

For today: address FE and BE comments and re-submit for a review.

@katrinDY
Copy link
Contributor

For today: ping Jože to review FE code

@KinyaElGrande
Copy link
Contributor

KinyaElGrande commented Feb 28, 2023

Additional functionality has been added to the avatarInitials image generation when creating a new user:

  1. If the user's first name is available, the initials will be the first two letters of the name (e.g., John => JO).
  2. If the user's full name is available, the initials will be the first character of the first and last names (e.g., John Doe => JD).
  3. If the user has three or more names, the first three characters of the first, second, and third names are taken to form the initials (e.g., John Doe Test => JDT, John Doe User Test => JDU).
  4. If the user's handle exists and their name doesn't, the initials will be the first letter of the handle (e.g., john => J). If the handle contains delimiters such as ., _, or -, the handle name is split using those delimiters, and the first letter from the first and second parts is used as the initials (e.g., john.doe => JD, john-doe.me => JD, john_doe.me-you => JD).
  5. If both the name and handle don't exist, the initials will be the first letter of the email (e.g., john.doe@tld.dev => J). If the email name contains delimiters before the @ symbol, the email name is split using those delimiters, and the first letter from the first and second parts is used as the initials (e.g., john.doe@tld.dev => JD, john-doe.me@tld.dev => JD, john_doe.me-you@tld.dev => JD).

@katrinDY
Copy link
Contributor

katrinDY commented Mar 6, 2023

BE and FE changes are required. Will need a day and a half to add them

@katrinDY
Copy link
Contributor

katrinDY commented Mar 7, 2023

For today: add FE changes discussed with Jože and submit a PR in 3 hours

@KinyaElGrande
Copy link
Contributor

For today: Finalize on the changes discussed with Jože, address Peter's comments, and Move the issue to QC before EOD.

@katrinDY
Copy link
Contributor

katrinDY commented Mar 9, 2023

For today: add BE tests and submit for review. Jože to take care of the remaining FE changes on admin

@katrinDY
Copy link
Contributor

For today: apply fix discussed with Peter and submit BE for review in 1h

@Fajfa Fajfa modified the milestones: 2023.3.0-dev.4, 2023.3.0-dev.5 Mar 10, 2023
@katrinDY
Copy link
Contributor

For today: sync with Tomaž reg. issue and discuss with Jože what will be done afterwards

@Bojan-Svirkov
Copy link
Contributor

Added CL entry:

{
      "what": [
        "support for managing and generating user's profile picture."
      ],
      "why": [
        "to provide users with greater flexibility and customization options for their profile avatars, while also allowing admins to manage avatars on behalf of users."
      ],
      "refs": [
        "https://github.com/cortezaproject/corteza/pull/887/commits/e24b391e5b1dc539855122534a4394a6868c4afd"
      ]
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend server changes (GO) frontend Frontend code changes (Javascript, Typescript, Vue.js)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants