App icon indicating copy to clipboard operation
App copied to clipboard

Display Name - The name updates on the second device only after refresh

Open kavimuru opened this issue 2 years ago • 5 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue found when executing #12142

Action Performed:

  1. Navigate to http://localhost:8080/settings/profile/display-name in two devices (or a normal browser & an incognito browser)
  2. Go offline on one device, update your name, click "Save"
  3. Verify your display name updates everywhere in that device
  4. Go back online

Expected Result:

The name should be updates on the second device

Actual Result:

The name updates on the second device only after refresh

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS - blocked
  • Android - Blocked
  • Desktop App - BLocked
  • Mobile Web

Version Number: 1.2.25-0 Reproducible in staging?: y Reproducible in production?: y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/200883242-f2bf5729-1b9b-4ec6-accf-95fbc3259be6.mp4

Expensify/Expensify Issue URL: Issue reported by: Applause internal team Slack conversation:

View all open jobs on GitHub

kavimuru avatar Nov 09 '22 16:11 kavimuru

Triggered auto assignment to @stephanieelliott (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Nov 09 '22 16:11 melvin-bot[bot]

Current assignee @francoisl is eligible for the Engineering assigner, not assigning anyone new.

melvin-bot[bot] avatar Nov 10 '22 14:11 melvin-bot[bot]

Hey @francoisl, any insight on whether this can be handled externally or internally? Seeing as it is related to page refreshing I'm wondering if this might be a server side change.

stephanieelliott avatar Nov 10 '22 14:11 stephanieelliott

Yes but as we're trying to focus on WAQ, I'm looking into this one.

I can reproduce the issue even while online, I think I see what's causing it so I'll submit a fix.

francoisl avatar Nov 12 '22 01:11 francoisl

Hm the solution I had in mind is not going to work.

I was thinking of updating the defaultValue to value in the two TextInputs of the component here, but then you can't edit the value of the input at all. cc @Beamanator in case you have any idea for how to solve this, I see you wrote this new component. I also tried to use state for the values of the inputs, e.g.:

value={this.state.firstName}
onChangeText={firstName => this.setState({firstName})}

but then it broke updating the value in the UI when it updates in Onyx

francoisl avatar Nov 12 '22 02:11 francoisl

Cool, thanks Franc! I'm going to move this to Internal for now, but feel free to add the External label if we want to seek proposals at any point!

stephanieelliott avatar Nov 14 '22 18:11 stephanieelliott

Yes, you really have to open the Display Name page on two devices first.

Here's how I did it:

  1. Open http://localhost:8080/settings/profile/display-name in two sessions/browsers/etc
  2. Edit your name in one of them, save

https://user-images.githubusercontent.com/2229301/201780322-2b8a031e-4a7b-426c-ae9d-a80bd372cb50.mov

francoisl avatar Nov 14 '22 22:11 francoisl

Confirmed this is happening, been discussing with @francoisl & @aldo-expensify since we've all been looking into similar things

Beamanator avatar Nov 14 '22 22:11 Beamanator

Issue not reproducible during KI retests. (First week)

mvtglobally avatar Nov 16 '22 02:11 mvtglobally

Hm interesting, I can still reproduce on the latest main. Anyway, made some progress yesterday trying to use state to manage the value of the inputs, but I was still having a hard time with the value of the input resetting itself when you want to edit it. Will keep playing around today!

francoisl avatar Nov 16 '22 18:11 francoisl

@francoisl not sure if I'm missing something, but I believe a decision has not been made on if we want to solve this for forms or :donothing: https://github.com/Expensify/App/issues/12243#issuecomment-1315749821

I think it makes sense to make a slack discussion on it, but I think that has not happened yet.

If this doesn't have relation with what you are doing here, please ignore :P

aldo-expensify avatar Nov 16 '22 18:11 aldo-expensify

Ah @aldo-expensify beat me to it. I just came here from the #whatsnext update. I think if we solve this, we should be solving for it everywhere. I don't think we should move forward with a solution that solves it in just one place.

JmillsExpensify avatar Nov 16 '22 18:11 JmillsExpensify

Ah yes ok thanks, I took this to Slack here!

francoisl avatar Nov 16 '22 19:11 francoisl

Closing this one out following the discussion in Slack!

stephanieelliott avatar Nov 17 '22 18:11 stephanieelliott