-
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
Update the IOU "Cancel" button #8877
Update the IOU "Cancel" button #8877
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, but I'll let @Santhosh-Sellavel test and review 👍
Just waiting for this thread here to conclude. |
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 are looking for another approach as discussed! https://expensify.slack.com/archives/C01GTK53T8Q/p1652390743738389?thread_ts=1651695607.990559&cid=C01GTK53T8Q
@@ -143,7 +143,6 @@ class ResendValidationForm extends React.Component { | |||
text={this.props.translate('resendValidationForm.resendLink')} | |||
isLoading={this.props.account.loading} | |||
onPress={this.validateAndSubmitForm} | |||
style={styles.resendLinkButton} |
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.
removed the minWidth given here as we don't need this one now.
Just after pressing the "resend link" button we are showing "Link has been re-sent" but it's kinda weird that the resend link button keeps loading for a while. What you think @roryabraham Screen.Recording.2022-05-19.at.12.27.59.AM.mov |
bump @Santhosh-Sellavel, the review is still pending. |
I will get this soon, @thesahindia can you resolve the conflicts! |
Done! |
@thesahindia BeforeScreen.Recording.2022-06-01.at.1.25.56.AM.movNowScreen.Recording.2022-06-01.at.1.23.50.AM.movcc: @roryabraham |
src/components/Button.js
Outdated
@@ -273,6 +270,12 @@ class Button extends Component { | |||
]} | |||
> | |||
{this.renderContent()} | |||
{this.props.isLoading && ( | |||
<ActivityIndicator |
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 indented 4 more spaces.
Sorry, meant to hit |
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.
Approved by mistake
Agree, we should switch the |
We can add a new prop for passing a different color and and we can keep |
but it would affect other buttons |
This bit makes feel more over engineered solution but there isn't any other way. Okay for me 👍 Cc: @roryabraham |
Ah, good point @thesahindia. Rather than adding another prop, can we just do something like: <ActivityIndicator color={(this.props.success || this.props.danger) ? themeColors.textReversed : themeColors.text} /> ? |
Oh yeah I didn't think about this, this is better 👍🏼 |
#### PR Reviewer Checklist
|
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.
Looks good, and tests well for me!
@roryabraham all you! |
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.
Thanks, 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. |
🚀 Deployed to staging by @roryabraham in version: 1.1.70-2 🚀
|
2 similar comments
🚀 Deployed to staging by @roryabraham in version: 1.1.70-2 🚀
|
🚀 Deployed to staging by @roryabraham in version: 1.1.70-2 🚀
|
🚀 Deployed to production by @yuwenmemon in version: 1.1.71-2 🚀
|
Details
Changed the way we show ActivityIndicator inside button. If isLoading is true the text for button will be rendered behind the ActivityIndicator so that button width doesn't change when it's in loading state.
Size of iou cancel/decline button changes while loading, this PR fixes that.
Fixed Issues
$ #8715
Tests | QA Steps
Go to a chat and request money from account b
Now login to account b
Check the iou request
Verify the button width doesn't change
Follow the same steps above but with language set to spanish
Sign out
Enter email or phone that doesn't belong to an existing account
Press "Continue"
Tap on resend link button
Verify the button width doesn't change
Do the same again but with language set to spanish
PR Review Checklist
Contributor (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 */
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)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** 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)Screenshots
Web
Screen.Recording.2022-05-18.at.11.35.22.PM.mov
Mobile Web
Screen.Recording.2022-05-18.at.11.37.53.PM.mov
Desktop
Screen.Recording.2022-05-18.at.11.56.23.PM.mov
iOS
Screen.Recording.2022-05-18.at.11.36.12.PM.mov
Android
Screen.Recording.2022-05-18.at.11.45.32.PM.mov