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

[bug] flag rendering doesn't update upon location change #3985

Open
L4ZZA opened this issue Nov 5, 2024 · 4 comments
Open

[bug] flag rendering doesn't update upon location change #3985

L4ZZA opened this issue Nov 5, 2024 · 4 comments

Comments

@L4ZZA
Copy link

L4ZZA commented Nov 5, 2024

Describe the bug
Not all the flags are updated according to the location settings. It seems like the first one you choose upon account creation is left cached on the user object on the comments and on the profile details page.

To Reproduce

  1. Create an account with any country selected as a Location (i.e. UK)
  2. Upon creation completed, go to your profile and change the location to any other country.
  3. In the preview it will show the correct one.
  4. Click on the preview button
  5. see that the flag on your profile page hasn't changed.
  6. go to any of your previous comments
  7. see that the flag hasn't changed there either

Expected behaviour
all the rendered flags should match the current/latest "Location" setting

Screenshots
image

image

Additional context
Could it be related to this? #3131

@davehakkens
Copy link
Contributor

thanks for posting!

@ebradbury
Copy link
Contributor

Hi @L4ZZA, I took a look at this bug and I think it's at least partially a UX issue. The preview is being displayed in real time when you select a location. You don't have to click the link to see the preview, the link is the preview. It's confusing because the app uses a Username component to show the preview and that component always renders as a link to your profile. So when you click you are taken to your profile which has your old location (since you haven't saved the form yet). I hope that makes sense.

I wasn't able to test whether your flag/location on comments gets updated but I did see that research modules were. I'm not exactly sure what the right behavior is here... keep the location what it was when you commented or update it to your current location.

Anyone have input?

@mariojsnunes
Copy link
Contributor

Any UI issue could be fixed now.
But there probably is a data sync issue (too), which is gonna get fixed eventually by #4064

@ebradbury
Copy link
Contributor

@mariojsnunes I think the issue is that the Username component always renders as a link to the profile. Should we make a new component that doesn't link for the sake of this preview feature?

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

No branches or pull requests

4 participants