-
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
Reusable function instead of repetitive statements #22649
Conversation
Screen recordings coming soon. |
@@ -1585,6 +1585,22 @@ function buildOptimisticReportPreview(chatReport, iouReport) { | |||
}; | |||
} | |||
|
|||
function updateReportPreview(iouReport, reportPreviewAction) { |
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.
Missing JSDocs
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.
Good catch! Added for both buildOptimisticReportPreview
and updateReportPreview
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 but this is still a draft
@AndrewGable 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] |
Why didn't we assign C+ to this PR? |
I thought that PullerBear assigns a C+ but it assigned an internal engineer only. I think it's because there is no issue linked in the PR description body, because this is a follow-up PR. |
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.
I can review this
message: [ | ||
{ | ||
html: message, | ||
text: message, | ||
isEdited: false, | ||
type: CONST.REPORT.MESSAGE.TYPE.COMMENT, | ||
}, | ||
], |
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 will re-write existing reportPreviewAction.message[0]
. Is it fine? Original code just replaced html
and text
inside.
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.
yes, this is fine. The original code was introduced in the previous PR where we decided to improve the code in this follow-up PR, so we are safe.
Thanks @situchan! |
I just requested |
Added |
I merged main into this branch locally. Optimistic expense request page is broken After online: (minor avatar issue in LHN, no parent navigation subtitle in report header) I confirmed that this also happens on main so not a blocker (reported on slack) |
Reviewer Checklist
Screenshots/VideosWeb
iou.request.mov
pay.iou.request.mov
expense.request.mov
pay.expense.request.movMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
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.
@AndrewGable 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] |
✋ 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 staging by https://github.com/cristipaval in version: 1.3.48-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.48-5 🚀
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 1.3.49-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.49-3 🚀
|
Follow-up PR after this GH conversation. cc @luacmartins
Fixed Issues
No issue, this is a follow-up PR
Tests
Offline tests
Included in the steps above
QA Steps
Same as tests.
PR 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)/** 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)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
Web
Money requestweb.-.request.moeny.mov
Pay money request
web.-.pay.mov
Mobile Web - Chrome
Money requestchrome.mobile.-.money.request.mov
Pay money request
chrome.mobile.-.pay.mov
Mobile Web - Safari
Money requestsafari.mobile.-.money.request.mov
Pay money request
safari.mobile.-.pay.mov
Desktop
Money requestdesktop.-.money.request.mov
Pay money request
desktop.-.pay.mov
iOS
Money requestios.native.-.money.request.mov
Pay money request
ios.native.-.pay.mov
Android
Money requestandroid.native.-.money.request.mov
Pay money request
android.native.-.pay.mov