Changing Profile Picture
Current Functionality: The profile picture is automatically set based on the profile picture of the first social login that a user links to their account. Users currently do not have the option to change or delete their profile picture.
Feature: Enable users to change or remove their profile picture.
Proposed Implementation:
1. Profile Picture Array: Create an array of profile pictures as users link various social networks. This array will also include the user's Gravatar as an option. The array needs to include the identifier for the social network that the picture has come from.
2. Change Profile Picture Option: Provide users with an option in their account view to change their profile picture. They can pick any of the pictures from the array.
3. Removing Profile Pictures: If a user unlinks a social account that was the source of a profile picture, the corresponding picture will be removed from the available options.
Out of Scope:
- Uploading an image is not included in this scope.
Hi @YasharF, I would like to work on this issue. Can you please assign it to me?
I typically don't do issue assignment to avoid orphaned issues/PRs. With that aside, before any PR, I would like to know more about the design/implementation plan first because changes need to keep in mind simplicity where possible and ease of maintenance.
This issue is also partially blocked on https://github.com/sahat/hackathon-starter/issues/1279
Hi @YasharF 👋,
Here's a proposed implementation plan:
- Store Profile Picture Options
When a user links a new social account, extract the profile picture URL and store it in a profilePictures array in the user model, along with its source (e.g., google, github, gravatar).
- Display Options in Settings
On the user account settings page, show all profile pictures from the array as selectable options.
Mark the current active one.
- Allow Changing Picture
When a user selects a new one, set it as currentProfilePicture.
- Handle Unlinking
When a user unlinks a social account, remove the matching picture from the profilePictures array.
If that picture was the current one, fallback to another available one (e.g., Gravatar).
- Note
Image uploading is out of scope as per the issue.
Let me know if this direction works. Happy to start working with this approach.
@sejalkailashyadav would you be able to work on this and have a PR in the next couple of weeks? It is Hacktoberfest, so it would be good to get this out of the way. Also, feel free to submit a draft PR as you are working on it. I am going to be doing more thru review of this since it is going to require changes to the Db schema and so on.
Hi @YasharF i can work on the proposed implementation by @sejalkailashyadav . can you assign me this issue?
@YasharF,
I am very interested in working on the Changing Profile Picture feature for Hacktoberfest. I was originally asked about this.
I just need a day to set up my development environment and review the codebase to confirm the scope of the Db changes.
I will post a follow-up comment after 2-3 days with a firm commitment and estimated timeline. Please assign this issue to me and not to anyone else yet.
Sounds good. Let me know if you have any questions.
@YasharF is this issue still being worked on by @sejalkailashyadav if not can i take up on this issue? this is for hacktoberfest and i am thinking to coauthor if there are some major error which can't be resolved by @sejalkailashyadav too . Let me know if i can contribute to this issue in any way
@Mingodew09 thanks for the offer. I need a more experienced dev working on this because it is a major feature that requires making schema changes. If she has an issues I will work with her on it, or will pick this up during the next major refactor for v10 or v11.
Hi, I am interested in helping with this!
@agrikatheprogrammer thank you for the offer. Currently the Issues with the Help Wanted are the ones that are up for grabs: https://github.com/sahat/hackathon-starter/issues?q=state%3Aopen%20label%3A%22help%20wanted%22