-
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
feat: fix the janky request money tab swipe on web #26022
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.
added two minor comments, well done otherwise
@@ -21,10 +22,17 @@ const propTypes = { | |||
|
|||
/* Callback fired when tab is pressed */ | |||
onTabPress: PropTypes.func, | |||
|
|||
position: PropTypes.shape({ |
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.
prop description is missing 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.
Added.
|
||
/** Animated opacity value while the label is inactive state */ | ||
// eslint-disable-next-line | ||
inactiveOpacity: PropTypes.any, |
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 PropTypes.any
? couldn't be PropTypes.number
? As I see, these props are numbers 0 or 1?
Reviewer Checklist
Screenshots/VideosWeb26022-web.mp4Mobile Web - Chrome26022-web-mobile-chrome.mp4Mobile Web - Safari26022-web-mobile-safari.mp4Desktop26022-desktop.mp4iOS26022-ios.mp4Android26022-android.mp4 |
|
||
function TabIcon({icon, activeOpacity, inactiveOpacity}) { | ||
return ( | ||
<View> |
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 wrapping <View>
necessary? wouldn't be fragment (<>
) enough?
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. Without it, the layout breaks.
|
||
function TabLabel({title, activeOpacity, inactiveOpacity}) { | ||
return ( | ||
<View> |
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 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.
Same reply.
|
||
/** Animated opacity value while the label is in active state */ | ||
// eslint-disable-next-line | ||
activeOpacity: PropTypes.any, |
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 for above three props - could PropTypes be more specific 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.
Added.
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.
@burczu This change actually caused a console warning on native platforms.
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.
Reviewed and tested - I think we are good to go!
✋ 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/thienlnam in version: 1.3.60-0 🚀
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.60-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.60-3 🚀
|
Details
This PR fixes the janky behaviour of the IOU request tabs when switching between request types by swiping.
Fixed Issues
$ #25428
PROPOSAL: #25428 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
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
Screen.Recording.2023-08-27.at.6.25.53.AM.mov
Mobile Web - Chrome
Screen.Recording.2023-08-27.at.6.32.09.AM.mov
Mobile Web - Safari
Screen.Recording.2023-08-27.at.6.29.36.AM.mov
Desktop
Screen.Recording.2023-08-27.at.7.01.05.AM.mov
iOS
Screen.Recording.2023-08-27.at.6.30.06.AM.mov
Android
Screen.Recording.2023-08-27.at.12.42.35.PM.mov