Skip to content

fix: Refresh current user in edit profile#8267

Merged
sbalaji1192 merged 2 commits intoappsmithorg:releasefrom
ong-yy:fix/refresh-user-profile
Oct 15, 2021
Merged

fix: Refresh current user in edit profile#8267
sbalaji1192 merged 2 commits intoappsmithorg:releasefrom
ong-yy:fix/refresh-user-profile

Conversation

@ong-yy
Copy link
Contributor

@ong-yy ong-yy commented Oct 6, 2021

Description

This PR is to fix issue #7217 which user name is not reflected in other instances. This is because in the edit profile page, the user state is not updated. So, I change it so that whenever we enter edit profile, it will update with the latest current user state.

Fixes #7217

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I repeat the same steps as recorded in the issue and I am not sure how to write Cypress/Jest for this. If tests is needed, please guide me on this.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@welcome
Copy link

welcome bot commented Oct 6, 2021

Thanks for opening this pull request! 🤗 Please register for Appsmith Hacktoberfest swag here if you haven't already https://bit.ly/appsmith-hacktoberfest-registration

@rishabhrathod01 rishabhrathod01 self-requested a review October 11, 2021 07:53
@sbalaji1192
Copy link
Contributor

@Ian-Yy Your fix doesn't solve the issue. Have you tested this changes locally?

@sbalaji1192 sbalaji1192 self-requested a review October 11, 2021 08:08
@ong-yy
Copy link
Contributor Author

ong-yy commented Oct 11, 2021

Hi @sbalaji1192 . Yes. I've tested this locally and it's working with both display picture and display name. My steps is

  1. Open the app in 2 separate tab/windows
  2. In the first tab, go to edit profile screen
  3. Change display name
  4. Then click back to home or applications
  5. In the second tab, the display name is still showing the old name
  6. Go to edit profile screen and new name should be reflected

Please let me know if there's anything wrong with my steps or fixes. Thanks.

P.S.: Edited because just found out display picture has nothing to do with this and there's another endpoint /photo for that

@sbalaji1192
Copy link
Contributor

sbalaji1192 commented Oct 12, 2021

@Ian-Yy Please try with a normal tab and an incognito tab. This issue is only reproducible, when the two tabs don't share a session between them.

Copy link
Contributor

@sbalaji1192 sbalaji1192 left a comment

Choose a reason for hiding this comment

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

LGTM

@sbalaji1192
Copy link
Contributor

@sharat87 Could you please also approve?

@sbalaji1192
Copy link
Contributor

/ok-to-test sha=0001eed

@sbalaji1192 sbalaji1192 merged commit 870dadd into appsmithorg:release Oct 15, 2021
@sbalaji1192 sbalaji1192 added the hacktoberfest All issues that can be solved by the community during Hacktoberfest label Oct 15, 2021
@ong-yy ong-yy deleted the fix/refresh-user-profile branch October 15, 2021 05:39
@coderabbitai coderabbitai bot mentioned this pull request Jan 30, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest All issues that can be solved by the community during Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Profile name change requires relogin to reflect name change

3 participants