-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[TS migration] Migrate 'SettingsSecurityCloseAccount' page to TypeScript #34718
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
[TS migration] Migrate 'SettingsSecurityCloseAccount' page to TypeScript #34718
Conversation
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.
LGTM!
@alitoshmatov Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewing it tonight. |
@alitoshmatov kind bump 🙂 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb Chromeclosing-mweb.moviOS: NativeiOS: mWeb Safariclosing-safari.mp4MacOS: Chrome / Safariclosing-web.movMacOS: Desktopclosing-desktop.mov |
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.
LGTM!
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25186 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Hi, I will review and merge this |
const requiredFields = ['phoneOrEmail']; | ||
const userEmailOrPhone = props.formatPhoneNumber(props.session.email); | ||
const userEmailOrPhone = formatPhoneNumber(session?.email ?? ''); |
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.
Why wouldn't we have an email here?
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.
Since session
goes from Onyx it has null
in the typing. Email is also option field in the session, so to prevent TS error we need to add default value, but I can try to update formatPhoneNumber
typing instead, let me try
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.
@flodnv Done, what do you think?
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.
As a noob, I want to try to understand more about this. I wanted to spin up a discussion in #expensify-open-source in Slack and tag you but I failed to find you on Slack, what is your handle?
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.
@flodnv You can find me as Viktoryia Kliushun
, I've also pinged you in Slack so you should see me there
@fabioh8010 @blazejkustra It would be great to here your thoughts on this one since we have doubts
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.
@flodnv In this component session
is a Onyx prop supplied by withOnyx
and therefore can be null
as any other Onyx value, so we can either default the value to ''
or change formatPhoneNumber
to accept and handle undefined values too. Looks like @VickyStash already changed formatPhoneNumber
to support it and I think it's the best approach, wdyt?
@@ -82,59 +78,59 @@ function CloseAccountPage(props) { | |||
return errors; | |||
}; | |||
|
|||
const userEmailOrPhone = props.formatPhoneNumber(props.session.email); | |||
const userEmailOrPhone = formatPhoneNumber(session?.email ?? ''); |
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.
same question
@flodnv kind bump 🙂 |
# Conflicts: # src/types/onyx/Form.ts
# Conflicts: # src/types/onyx/Form.ts # src/types/onyx/index.ts
# Conflicts: # src/pages/settings/Security/CloseAccountPage.tsx # src/types/onyx/index.ts
@flodnv hey, kind bump 🙂 |
Sorry for the delay, the last few days have been very busy for me and I've been working part time. Looking at this now. |
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.
Thank you
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.36-5 🚀
|
Details
[TS migration] Migrate 'SettingsSecurityCloseAccount' page to TypeScript
Fixed Issues
$ #25186
PROPOSAL: N/A
Tests
Close Account
Account closed successfully
should be shownOffline tests
N/A
QA Steps
Close Account
Account closed successfully
should be shownPR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios1.mp4
iOS: mWeb Safari
ios_web1.mp4
MacOS: Chrome / Safari
web1.mp4
MacOS: Desktop
desktop1.mp4