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

[iOS] Admin Dashboard - User Profiles #1328

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

Conversation

JPKribs
Copy link
Member

@JPKribs JPKribs commented Nov 26, 2024

Summary

Allows for editing/deleting a user image. This is just repurposing the existing UserProfileImagePicker to be callable from both current userSession or another user. Also allows for editing a user's account name.

This edits the layout of the ServerUserDetailView to be more in line with the UserProfileView

Screenshots

Updated View Updated View Screenshot
Update Username Updated View Screenshot
Image Options Username Editor Screenshot

@JPKribs
Copy link
Member Author

JPKribs commented Nov 26, 2024

This is currently 'ready' but the notification to update the image on update isn't firing 100% of the time. So sometimes, when I change a user image it just never changes even though it's been updated on the server. Happens about 50% of the time so I think I have an issue on my end to work out.

@LePips
Copy link
Member

LePips commented Nov 26, 2024

I've played around with this and I don't think that the issue is due to the notification being sent but a caching issue. If I edit the profile image for a different user then nothing will be properly updated for that user, even on the user sign in view. If I exit the admin user and then sign into the user I edited, then all of the images will appear properly.

@JPKribs
Copy link
Member Author

JPKribs commented Nov 26, 2024

Interesting. What is being done on the local user level to clear the cache on pfp update? I tried to mirror/reuse what I could but I could have missed something. Plus, I need to clean up this PR a bit it's a little hectic...

@JPKribs JPKribs changed the title [iOS] Admin Dashboard - Profile Editing [iOS] Admin Dashboard - User Profiles Nov 27, 2024
@JPKribs
Copy link
Member Author

JPKribs commented Nov 27, 2024

Daw, I merged it wrong...

This branch is broken but I needed to redo this anyway. I'm going to wipe and try again here off of Main later this week.

@JPKribs JPKribs changed the title [iOS] Admin Dashboard - User Profiles [WIP] [iOS] Admin Dashboard - User Profiles Dec 11, 2024
@JPKribs JPKribs closed this Dec 12, 2024
@JPKribs JPKribs force-pushed the adminDashboardProfile branch from 28121a0 to d001a96 Compare December 12, 2024 21:50
…set image / other stuff like delete & username.
@JPKribs JPKribs reopened this Dec 12, 2024
@JPKribs JPKribs marked this pull request as ready for review December 14, 2024 07:44
@JPKribs
Copy link
Member Author

JPKribs commented Dec 14, 2024

This should be good but I'm back to having the same issue as before where I'm unable to get images to refresh appropriately throughout. Going from no image -> image works appropriately but image -> new image doesn't always refresh. Is that image caching or did I screw up the notifications?

There is also a weird one where if you change your username from Server Users -> Server User Details it doesn't update for the settings. The reason for this is I'm not sure how to update the userSession.user.name.

Last item, I am using the UserID as the payload for didChangeUserProfile. If I change that to UserDto, that would be a bigger payload but it would also mean I can refresh the user once at update then use that across multiple ViewModels because I think right now there is a chance that like 2 refreshes for the same data can occur?

🎉 This should be the final Admin Dashboard PR until we update to 10.10 🎉

@JPKribs JPKribs changed the title [WIP] [iOS] Admin Dashboard - User Profiles [iOS] Admin Dashboard - User Profiles Dec 14, 2024
Copy link
Member

@LePips LePips left a comment

Choose a reason for hiding this comment

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

As some clarification, the current UserProfileHeroImage should be UserProfileImage. The Hero attribute should be used for the views that have the profile image as the large image, which then can use UserProfileImage.

@JPKribs
Copy link
Member Author

JPKribs commented Dec 19, 2024

Ah! I probably should have googled that first haha... I've updated this to reflect what the names should be!

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.

2 participants