-
Notifications
You must be signed in to change notification settings - Fork 986
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
"Remove current photo" is shown for new account and profile info is duplicated in header after any change #9234
Comments
@rachelhamlin issue doesn't block user from anything, but it is common action for a majority of users. |
🙌 |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 80.0 DAI (80.0 USD @ $1.0/DAI) attached to it.
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work has been started. These users each claimed they can complete the work by 2 weeks, 6 days from now. 1) acolytec3 has been approved to start work. Identify source of bug, likely not updating a subscription or db field correctly when setting the profile picture, and code appropriate fix Learn more on the Gitcoin Issue Details page. |
@churik @yenda @flexsurfer @errorists Not sure who to direct this question to but in looking at the underlying code, is it safe to assume that if a user ever adds an image as their profile picture, it will always be jpeg and if it's the system generated identicon, it will always be png? It looks like the update-picture event assumes any user-provided picture will be jpeg. I'm hoping this is the case as it should make a fix relatively straight-forward in terms of adjusting the display rules for the above bug can be guided by inferring whether to display the "Remove photo" option based on whether the photo-path is jpeg or png. |
To me it’s not as clear, I have pictures in my gallery that aren’t JPG and I can choose to use any one of them as my profile pic. Unless we save these locally as jpegs, chances are you’d end up using PNGs for avatar pictures too. |
@errorists That's what I wondered too but when I set an image with a PNG extension as my profile pic, re-frisk is still showing the photo-path value as a base64/jpeg. I think that regardless of the actual format, it's being saved as a bas64/jpeg representation by |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 80.0 DAI (80.0 USD @ $1.0/DAI) has been submitted by: @StatusSceptre please take a look at the submitted work:
|
I have worked in these areas and have few notes I'd like to share I too have used profile pic being saved as base64/jpeg to determine whether or not to render border around profile pic. So that approach also works. Still, fwiw, In the past, it worked as intended, with a little bit different implementation (and so this bug is a regression). The logic used to be, to compare in (defn- header [{:keys [public-key photo-path] :as account}]
[profile.components/profile-header
{:contact account
:allow-icon-change? true
:include-remove-action? (not= (identicon/identicon public-key) photo-path)}]) |
@bitsikka I like that approach. Solves the issue more exactly than mine does. That said, it feels like execution time might be slightly longer if you're generating an identicon every time you render the page versus just looking at the first part of the string. I dunno if it's enough to make a difference in page load so will leave it to the reviewers on whether to change. Thanks for the suggestion! |
👍 good point about perf.. Edit: confirmed! |
@bitsikka @acolytec3 I think checking if the photo-path is the same as the identicon is the most robust solution. Also there is no point doing that check more than once. You can do it at login, and store some value in app-db like personalized-picture? that you set to true if the two are different. |
@yenda |
@yenda I'll update my PR along those lines. |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done The funding of 80.0 DAI (80.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @acolytec3.
|
Bug Report
Problem
Expected behavior
If you scrolling and switching between profile and other tabs.
Actual behavior
Reproduction
Additional Information
The text was updated successfully, but these errors were encountered: