-
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
Add Push-to-Page support for IOUConfirmationList #16919
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.
The styling looks good so far. Will run through the full tests once complete.
(not sure why I pulled this branch for review given that it's WIP, but I'm here now anyway)
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.
There was a recent change to the design where also the description will be push to page for consistency https://expensify.slack.com/archives/C02HWMSMZEC/p1680719627779599
@thesahindia @MonilBhavsar One of you needs to 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] |
…IOUConfirmationList
This is ready for 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.
@yuwenmemon Great job! The main thing here is to update the What's it for?
to Description to align with the doc
src/pages/iou/IOUDescriptionPage.js
Outdated
<View style={styles.mb4}> | ||
<TextInput | ||
inputID="iouComment" | ||
name="ioucomment" |
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.
Is this lowercase on purpose?
name="ioucomment" | |
name="iouComment" |
src/pages/iou/IOUDescriptionPage.js
Outdated
return ( | ||
<ScreenWrapper includeSafeAreaPaddingBottom={false}> | ||
<HeaderWithCloseButton | ||
title={this.props.translate('iOUConfirmationList.whatsItFor')} |
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 should be Description
title={this.props.translate('iOUConfirmationList.whatsItFor')} | |
title={this.props.translate('IOUConfirmationList.description')} |
src/libs/actions/IOU.js
Outdated
@@ -636,6 +636,15 @@ function setIOUSelectedCurrency(selectedCurrencyCode) { | |||
Onyx.merge(ONYXKEYS.IOU, {selectedCurrencyCode}); | |||
} | |||
|
|||
/** | |||
* Sets IOU'S 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.
* Sets IOU'S comment | |
* Sets IOU's 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.
Can we change this comment to Sets Money Request description
instead?
<MenuItemWithTopDescription | ||
shouldShowRightIcon | ||
title={this.props.iou.comment} | ||
description={this.props.translate('iOUConfirmationList.whatsItFor')} |
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.
Lets update the key if its indeed with the typo and small i
at start. We need to use Description
here.
description={this.props.translate('iOUConfirmationList.whatsItFor')} | |
description={this.props.translate('IOUConfirmationList.description')} |
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 suggested that we rename these keys to moneyRequestConfirmationList
in this 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.
+1 to changing it to Description
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.
Sounds good. What do you guys think about using "What's it for" in the hint for the text input?
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.
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 I think we can keep that in there, good point
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.
Sounds good!
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.
+1
I am wondering here @luacmartins @Julesssss the Amount edit is now navigating to a different step in the IOU creation flow so it oes not have its route same as other push-to-page edits in forms. I feel like its inconsistent, but I am not fully sure either if we should create a new edit mount page same as for the description field. It makes sense we should do it, any reason why not? |
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.
Looking good. Left a few comments, let's keep up the momentum here!
<MenuItemWithTopDescription | ||
shouldShowRightIcon | ||
title={this.props.iou.comment} | ||
description={this.props.translate('iOUConfirmationList.whatsItFor')} |
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.
+1 to changing it to Description
src/pages/iou/IOUDescriptionPage.js
Outdated
}, | ||
}; | ||
|
||
class IOUDescriptionPage extends Component { |
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.
NAB should we create this as a functional component and use hooks already?
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'm not up to speed on hooks fully so I didn't go for it just for the sake of time. What do you think? Maybe a follow-up?
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.
Seems fine, but I'm still not sure why this is a class component since we don't have any state or lifecycle methods. Seems like we could refactor to a functional component without the need for hooks.
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!
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.
Great, let's ship it!
Yuwen is definitely not standing behind me, looking over my shoulder making sure it gets merged.
✋ 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/mountiny in version: 1.3.1-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.1-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.1-3 🚀
|
This PR has caused a regression in #17656 I this commit titleTextStyle is calculated with |
* @param {String} comment | ||
*/ | ||
function setMoneyRequestDescription(comment) { | ||
Onyx.merge(ONYXKEYS.IOU, {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.
we forgot to trim white spaces in the Description comment and it lead to this issue
While implementing Related Issue: #17579 |
This PR caused a regression here. We update other things but missed to include IOUCurrencySelection to flow more details on the issue/PR |
Are we adding validation to this form? I feel like we added this for a good reason... Lines 132 to 134 in bd5db76
and then did this...
😂 |
Should we add a polish item for that? @mountiny @luacmartins |
That field is not required, so I'm not sure what we'd validate. The validate callback is returning an empty object in that case. |
We can update |
Done - #20525 |
I think this PR caused this #19450 bug, or should been caught here. |
cc @luacmartins @vitHoracek
Details
Change the IOUConfirmationList form to use push to page components and spruce up the look of it a bit.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/270489
Tests / QA
Offline tests
Do the request money and split bill flows but offline. Make sure they work the same except with a pending transaction created.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Kapture.2023-04-14.at.00.11.51.mp4
Mobile Web - Chrome
Kapture.2023-04-10.at.18.29.53.mp4
Mobile Web - Safari
Kapture.2023-04-10.at.18.19.48.mp4
Desktop
Kapture.2023-04-10.at.17.53.22.mp4
iOS
Kapture.2023-04-10.at.18.32.55.mp4
Android
Kapture.2023-04-10.at.18.20.58.mp4