-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[CP Staging] Fix company website field is blank on confirmation page if it is not modified #48731
[CP Staging] Fix company website field is blank on confirmation page if it is not modified #48731
Conversation
@hungvu193 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] |
@@ -58,6 +59,10 @@ function WebsiteBusiness({reimbursementAccount, user, session, onNext, isEditing | |||
shouldSaveDraft: isEditing, | |||
}); | |||
|
|||
useEffect(() => { | |||
BankAccounts.addBusinessWebsiteForDraft(defaultCompanyWebsite); | |||
}, [defaultCompanyWebsite]); |
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.
@NikkiWines hey sorry, I forgot to add back this logic in #48520 which I mentioned in the plan 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.
Ah from here? I had forgotten as well, thanks for catching 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.
Oops, I forgot to put the link. Yes, that's the one.
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.
👍
@@ -58,6 +59,10 @@ function WebsiteBusiness({reimbursementAccount, user, session, onNext, isEditing | |||
shouldSaveDraft: isEditing, | |||
}); | |||
|
|||
useEffect(() => { | |||
BankAccounts.addBusinessWebsiteForDraft(defaultCompanyWebsite); | |||
}, [defaultCompanyWebsite]); |
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.
Ah from here? I had forgotten as well, thanks for catching it.
I assume that original C+ will handle this one @NikkiWines |
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.
@hungvu193 is testing this as its a last blocker holding the deploy
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-09-09.at.17.31.31.movAndroid: mWeb Chromemchrome.moviOS: NativeScreen.Recording.2024-09-09.at.17.28.18.moviOS: mWeb SafarimSafari.movMacOS: Chrome / Safariweb.chrome.movMacOS: DesktopDesktop.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!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…sn't-saved-to-draft [CP Staging] Fix company website field is blank on confirmation page if it is not modified (cherry picked from commit 41707cb) (CP triggered by mountiny)
useEffect(() => { | ||
BankAccounts.addBusinessWebsiteForDraft(defaultCompanyWebsite); | ||
}, [defaultCompanyWebsite]); |
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.
This useEffect
addition caused #49129, we used to save https://
in onyx draft and submit it to BE
which would give us invalid website error on every 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.
Details
When the company website is auto-filled and we don't modify it, it won't be shown in the confirmation page.
Fixed Issues
$ #48674
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop