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.
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
|
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 |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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