Display message to user when account is closed#11665
Conversation
1d98d15 to
61297c5
Compare
61297c5 to
2a1b0f7
Compare
Beamanator
left a comment
There was a problem hiding this comment.
So far looking great! A few comments, and also it looks like we don't clear the success message in this flow but maybe should:
- Log in with account, close it
- Verify you're back on the login page, and you see the close success message
- Enter another account's email address, click "Continue"
- Don't sign in, then click "Go back"
- You now still see the "close account success message", but I don't think you should
| {!this.props.isSmallScreenWidth | ||
| && <OfflineIndicator containerStyles={[styles.mt2]} />} |
There was a problem hiding this comment.
While this is definitely useful, I wonder if we can generalize it for all drawer pages / modal pages since it looks like this doesn't exist in many of those pages (like the profile page)
There was a problem hiding this comment.
What exactly do you mean by that Alex? Just want to make sure I understand as a non-engineer 😄
There was a problem hiding this comment.
Yeah good question, so my train of thought is:
- If we're adding the Offline Indicator to the "Close Account" page, why wasn't it there before?
- Then I checked if the Offline Indicator is present on other form pages (example: the Profile Page) and I don't see the offline indicator there
- It seems weird to me to show the user they're offline in the Close Account page w/out also showing they're offline in the Profile page, so I'm basically asking here if we want to show the Offline Indicator on all pages, or only on pages with forms, or something else
One other idea I had is: In web / desktop full screen mode, it may not be necessary to show the Offline Indicator twice (you can see that it's already showing in the chat report page) so maybe we only show the Offline Indicator on sub-pages on small screens (including mobile devices)?
There was a problem hiding this comment.
It seems weird to me to show the user they're offline in the Close Account page w/out also showing they're offline in the Profile page, so I'm basically asking here if we want to show the Offline Indicator on all pages, or only on pages with forms, or something else
Maybe I misunderstood. But aren't these different offline patterns? We let users modify their profiles offline, but we shouldn't let users delete accounts while offline.
There was a problem hiding this comment.
Hmm true true, but doesn't it feel a bit weird seeing an offline status in some pages and not in all?
There was a problem hiding this comment.
IMO, the message You appear to be offline is good to know everywhere or nowhere, not "at the bottom of some page but not all".
I don't think we should care about a consistent offline behavior on a feature that lets users stop being our customer
I'm a bit confused how this would let users stop being our customer, do you mean if users see You appear to be offline they'll assume the form they're seeing won't be submittable, so they'll think our app doesn't work offline even though some pages will and some won't?
There was a problem hiding this comment.
OH. Whoops.
I was mistaken and thought this was regarding disabling the Close Account button while offline... not the indicator. Ignore me
There was a problem hiding this comment.
Agree, it is the case of mobile but not for web.
May be worth a discussion in channel, why it was only implemented for mobile and not web and then we can implement it.
There was a problem hiding this comment.
Aahhhh ok that makes more sense @Julesssss 😅
May be worth a discussion in channel, why it was only implemented for mobile and not web and then we can implement it.
Ooh that's a good idea 👍
There was a problem hiding this comment.
Shall we leave that discussion for now? I think we could merge this today and revisit.
why it was only implemented for mobile and not web and then we can implement it.
As for this, I think it works now because the page is shown as a RightDockedModal, right?
src/pages/signin/LoginForm.js
Outdated
| }), | ||
|
|
||
| closeAccount: PropTypes.shape({ | ||
| /** Success message to display when necessary */ |
There was a problem hiding this comment.
Maybe this is a bit clearer
| /** Success message to display when necessary */ | |
| /** Message to display when user successfully closed their account */ |
|
Style-wise the error/succes dot-indicator messages look good to me. |
|
This is ready for a re review. Updated testing and QA steps and added screen recording of the edge case @Beamanator pointed out. Thanks for pointing it out and helping with it! |
@Julesssss hope this was not consistent and something flakey with network? |
|
Hey @MonilBhavsar, actually yeah. I'm pretty sure now that this is an unrelated issue on my side. But for that reason, I'm unable to verify the tests 😞 |
|
I unassigned myself because I won't be able to review it by tomorrow. If this continues for next week, I will jump in again 😄 |
|
Off hold |
|
Honestly I'm having lotsss of trouble with my VM today so I think it's up to you @Julesssss 😅 |
Julesssss
left a comment
There was a problem hiding this comment.
Tested successfully on all platforms ✅
|
PR Reviewer Checklist
|
|
Thank you @Julesssss for testing and reviewing! |
|
Sorry all, was battling VM issues the last few days, but I think I'm back and ready to review! |
|
@Beamanator looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
I'm 99.9% sure I saw all tests were passing before merging 🤔 |
|
🚀 Deployed to staging by @Beamanator in version: 1.2.18-0 🚀
|
|
🚀 Deployed to staging by @Beamanator in version: 1.2.18-0 🚀
|
|
🚀 Deployed to production by @chiragsalian in version: 1.2.18-10 🚀
|
|
Heads up @MonilBhavsar @Beamanator @Julesssss ! This PR caused a bug here: #13506 Not a big deal, though. I think is more a change in approach than a bug. |
|
Yeahhhh I agree it's more of a change in approach - I think I argued that it was better to keep the closed account message for longer, but no big arguments / opinions either way :D 👍 |






Details
Fixed Issues
$ #10224
Tests
Offline mode
PR Review Checklist
PR Author Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)QA Steps
Offline mode
Screenshots
Web
Screen.Recording.2022-10-12.at.10.01.36.PM.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android
cc @Expensify/design