-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Migrate SwipableView to functional component #23928
Migrate SwipableView to functional component #23928
Conversation
@abdulrahuman5196 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] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
adding the screenshots shortly |
@abdulrahuman5196 screenshots are added! |
@abdulrahuman5196 please let me know if any change is required. |
@abdulrahuman5196 please respond here |
Hi, @ojasjadhav2 Will review this. |
@abdulrahuman5196 thank you for replying, let's try to make it within the priority bonus period! |
@ojasjadhav2 Time bonus is not applicable for functional component migration issues. |
@abdulrahuman5196 i think that is updated lately. |
@ojasjadhav2 Melvin just posted wrongly there. Here is the slack thread on the same - https://expensify.slack.com/archives/C01GTK53T8Q/p1685728627868429?thread_ts=1685727883.004839&cid=C01GTK53T8Q AFAIK migration PRs don't have speed bonus. |
@abdulrahuman5196 can you please review it today |
const minimumPixelDistance = CONST.COMPOSER_MAX_HEIGHT; | ||
this.oldY = 0; | ||
this.panResponder = PanResponder.create({ | ||
function SwipeableView({children, onSwipeDown}) { |
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 should just get param props
instead of spreading the params directly. It will be consistent with all other places in our codebase and it would be easy to understand from where the value came from when using
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.
done
And for these cases kindly attach videos on the author's checklist since it is related to swipe/pan behaviour. |
@abdulrahuman5196 added the requested change. will be adding screen recordings shortly. you can continue with your review. |
@abdulrahuman5196 added the videos, Please review now. |
@abdulrahuman5196 please review |
SwipableView is not used for scrolling the report. Can you test the same and update the videos and update the test steps as well? |
@ojasjadhav2 bump |
@abdulrahuman5196 sorry, it was weekend so i didn't work. will update tomorrow. |
@ojasjadhav2 sure no issues. Sorry forgot I pinged before weekend. |
@abdulrahuman5196 Do i just need to add IOS native screenshot? because that's the only place this is being used |
@abdulrahuman5196 added IOS native screen recording. do i need to add anything else? |
added android native screen recording too |
@abdulrahuman5196 please review |
@abdulrahuman5196 please check, it is very late already. |
Sorry will review this out in couple of hours |
Reviewer Checklist
Screenshots/VideosWebN/A Mobile Web - ChromeN/A Mobile Web - SafariN/A DesktopN/A iOSScreen.Recording.2023-08-18.at.10.29.45.PM.mp4Androidaz_recorder_20230818_225642.mp4 |
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @MonilBhavsar
🎀 👀 🎀
C+ Reviewed
@MonilBhavsar Kindly run the checklist before approving, since for first time contributors it is not running |
✋ 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/MonilBhavsar in version: 1.3.56-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
Details
Migrated SwipableView. > index.native.js to a functional component
Fixed Issues
$ #16203
PROPOSAL: #16203 (comment)
Tests
Offline tests
same as online 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 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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Screen.Recording.2023-08-13.at.10.44.30.PM.mov
Android
SVID_20230813_225011_1.mp4