-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Display message to user when account is closed #11665
Conversation
1d98d15
to
61297c5
Compare
61297c5
to
2a1b0f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -41,6 +42,11 @@ const propTypes = { | |||
isLoading: PropTypes.bool, | |||
}), | |||
|
|||
closeAccount: PropTypes.shape({ | |||
/** Success message to display when necessary */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is a bit clearer
/** Success message to display when necessary */ | |
/** Message to display when user successfully closed their account */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 😞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we'll take the discussion to Slack. But once that is resolved I'll be happy to retest on iOS/Android/mWeb. Unfortunately someone else will need to verify web, due to my current issue.
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 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is 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 Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
have been tested & I retested again)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is 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