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

131 members profile picture #615

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

volkramweber
Copy link
Collaborator

Short Description

Allows the user to upload and delete profile picture.

Proposed Changes

  • Adds button to select, crop and upload image as profile image
  • Adds button to delete profile image after confirming in alert dialog

Side Effects

None.

Testing

  • Navigate to profile
  • Update profile image
  • Delete profile image

Resolved Issues

Fixes: #131


@volkramweber volkramweber linked an issue Feb 20, 2025 that may be closed by this pull request
3 tasks
Copy link
Member

@steffenkleinle steffenkleinle left a comment

Choose a reason for hiding this comment

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

Amazing work, works flawlessly! Well done :)

Minor: I am not sure whether we should display the full error here as it gets quite lengthy and might be confusing. We should at least handle offline errors differently I guess (in line with how its already handled in the error screen by making this reusable

error.startsWith('ClientException') ? t.error.offlineError : error.substring(error.indexOf(':') + 1);
)

child: Stack(
alignment: Alignment.center,
children: [
CircleAvatar(
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Not sure if I'd expect something to happen if I press the circle avatar/profile icon (probably the same as when pressing Foto bearbeiten). Not sure here though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since this was not implemented in the click dummy, I did not implement it either.
Could it be misleading if the user clicks only to see their profile image?

Comment on lines +68 to +78
ProfileImageUploader(
profile: widget.profile,
onProfileUpdated: widget.onProfileUpdated,
onProcessing: _setProcessing,
),
if (widget.profile.image != null)
ProfileImageDeleter(
profile: widget.profile,
onProfileUpdated: widget.onProfileUpdated,
onProcessing: _setProcessing,
),
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Should we perhaps display those two options in a row next to each other instead of below each other to occupy less space?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could be a good idea, but implemented it like it was prepared in the figma/click dummy.

@@ -190,6 +190,17 @@
"profiles": "Mitglieder",
"label": "Mitglieder",
"noResult": "Leider gab es einen Fehler beim Laden des Profils.",
"profileImage": {
"update": "Foto bearbeiten",
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Not sure if bearbeiten is actually the right word here. If there is none set, I would expect it to be Profilbild hinzufügen and if a picture is set, perhaps Profilbild ändern? But I guess that should be checked first.

Suggested change
"update": "Foto bearbeiten",
"update": "Profilbild bearbeiten",

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I get your point. But as far there is no further specification, I would keep it like this.
The text is taken from the figma file, so I would keep it also.

@volkramweber
Copy link
Collaborator Author

Minor: I am not sure whether we should display the full error here as it gets quite lengthy and might be confusing. We should at least handle offline errors differently I guess (in line with how its already handled in the error screen by making this reusable

I changed it to:
_showError(error is ClientException ? t.error.offlineError : t.profiles.profileImage.updateError);

@@ -20,7 +20,7 @@ class NewsDetailScreen extends StatelessWidget {
final theme = Theme.of(context);
return FutureLoadingScreen<NewsModel?>(
load: () => fetchNewsById(newsId),
buildChild: (NewsModel? news) {
buildChild: (NewsModel? news, _) {
Copy link
Member

Choose a reason for hiding this comment

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

🤔 This is kinda annoying, but I also did not find a way to avoid this :/

@steffenkleinle
Copy link
Member

I guess this is also due to the click dummy/figma design but the picture deletion alert has a real iOS look which does not fit at all to the rest of the material design app imo.

@volkramweber
Copy link
Collaborator Author

volkramweber commented Mar 12, 2025

@steffenkleinle I did not find any alert like this in the figma, so I just used the default and added styles from our theme. But I am totally not sure if this is good, and if not, how to do it better.

@JuliaFreitagBGSt @leagerndt Could you please add a design for this alert? Or how should we proceed?

@steffenkleinle
Copy link
Member

@steffenkleinle I did not find any alert like this in the figma, so I just used the default and added styles from our theme. But I am totally not sure if this is good, and if not, how to do it better.

@JuliaFreitagBGSt @leagerndt Could you please add a design for this alert? Or how should we proceed?

I think you can just follow the material design guide on dialogs: https://m2.material.io/components/dialogs

@JuliaFreitagBGSt
Copy link

@volkramweber @steffenkleinle thanks for your work this far.
Please put the dev now on hold. We (@ungemeinfein @leagerndt ) need to discuss this view more thouroughly.

Could you please put this issue back into refinement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Members: Profile Picture
3 participants