-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[User Settings] Allow users to modify avatar photo #2131
Conversation
Here is the upload icon you need: upload.svg.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me, but I cannot seem to get the actual upload functionality to work. When I attempt to upload, I end up seeing the following in my logs:
2021-03-29T21:55:53.273159+00:00 expensidev php-fpm: cLiamR /api.php scott@expensify.com !https://expensify.cash/! ?user? [info] [push] Push_Service - Push_Service sending event ~~ channel: '[0: 'public-debugserverid5e068a4783949']' eventName: 'debug' eventData: '{"level":"warn","message":"UserAPI - Empty string provided as image when uploading avatar."}'
I'm seeing this same behavior on both the platforms I tested: Web & iOS.
@deetergp are you to date on master on web? We merged a Web-Expensify change for this functionality. Just tested myself on web and it's working well 👍 gonna leave a full review as well. |
@NikkiWines That was it, @NikkiWines, thanks! Was able to verify that it works on Web, iOS, & Desktop, but could not get it to work on Mobile Web, where it failed to open a picker: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments, this is looking great! I find CreateMenu much more intuitive now that we're not maintaining that list inside of it.
One thing on the design, I personally quite like having the create menu follow the style we have currently for web/desktop (i.e. sliding out from the bottom left) but @michelle-thompson do you want it to pop up below the Edit Photo
button like we have it in the mockups?
Also was able to reproduce the issue @deetergp experienced with mWeb not opening a picker. |
I see your point about all other menu appearing in the bottom left, but let's position the menu underneath |
@NikkiWines @michelle-thompson the popover location seemed to be an existing bug - #2090 I was waiting on that issue to be solved to see how to set it up here as well |
mWeb file attachment seems to be broken on current master as well |
I agree with @michelle-thompson, we should launch this menu in relation to the button that is tapped. In terms of animating the popover, I had a comment in a different PR that Rory addressed in terms of making the popover appear to animate downwards from the button location. Maybe this is helpful: #1878 (comment) |
Since both the attachment picker mWeb issue and the popover issue exist on production at the moment I don't think we should block this PR on those being resolved (especially since I don't think either issue has a PR out yet). I can make a follow-up issue to move the popover location to underneath the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment, otherwise looking great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great and code looks good to me. A comment on one thing I've noticed.
Uploading a photo - or removing a photo - updates some of the avatars (profile page, sidebar) but doesn't immediately update the avatars in the chats.
-
On mobile: It's pretty delayed, even when navigated to-and-away from reports. Not sure how much of this is due to it being tested on a sim.
Screen.Recording.2021-03-31.at.12.05.40.PM.mov
-
On web/desktop: You can get the photo to update by navigating away and back to a report
Screen.Recording.2021-03-31.at.11.36.50.AM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok looks like the delayed avatar issue is related to an existing issue: https://github.com/Expensify/Expensify/issues/155256 - so let's not hold on that.
I think we should merge this and I'll create a separate issue to move the CreateMenu
location to underneath the Edit Photo
button once the underlying issue for that has been resolved.
How does that sound to you all?
PropTypes.oneOf(Object.values(CONST.MENU_ITEM_KEYS)), | ||
menuItems: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
icon: PropTypes.func.isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: Just curious why this prop type is func
. Isn't it a PNG?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Got here from https://expensify.slack.com/archives/C01GTK53T8Q/p1617743567403300 |
@mallenexpensify Opened a pr here to fix that - #2254 |
Details
Fixed Issues
Fixes #2053
Tests
QA Steps
same as above
Tested On
Video Walkthrough
Screen.Recording.2021-03-28.at.3.52.42.PM.mov
Screenshots
Web
Mobile Web
Desktop
iOS
Android