-
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
Extract gesture logic from MultiGestureCanvas
to hooks and improve code
#33756
Extract gesture logic from MultiGestureCanvas
to hooks and improve code
#33756
Conversation
MultiGestureCanvas
: Extract gesture logic to hooksMultiGestureCanvas
to 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.
performance tests are failing
not sure why it failed. now it's working |
MultiGestureCanvas
to hooksMultiGestureCanvas
to hooks and improve code
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 am a fan of cleaning this up! It could be much better with improved code comments. I probably don't understand 80% of the code that is here and why it's necessary or what it does. Could you take a full pass on this code and do the following:
- Make sure comments are consistently formatted (start with a capital letter, use consistent line length limits, use proper grammar)
- Make sure comments describe WHY the logic is there
- Code that isn't self-explanatory gets a comment
@pecanoro addressed all your comments! Lmk if there is anything else :) |
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.
Thank you for all the comments, it made the code much easier for whoever has no experience with it or is new to the codebase! ❤️
@chrispader please merge main. Hopefully it will fix perf-tests. |
@chrispader Can you merge with main? I think we updated node and tests are failing due to that. |
done! @pecanoro |
JFYI @pecanoro @aimane-chnaif @s77rt If possible, it would be great to merge this today, because i'm gonna be 100% OOO from 31/01/2024 - 17/03/2024. I'm available all day for any comments on this PR! |
Additionally, there is one more PR that i have been working on which is waiting for this one to be merged first. Going to update it and merge |
@pecanoro all checks have passed! |
Awesome! Merging since Tim is OOO. I did my best with the review, it's a big PR so hopefully I didn't miss anything important. |
✋ 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/pecanoro in version: 1.4.33-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.33-5 🚀
|
@pecanoro @aimane-chnaif
Details
This PR extracts gesture code to separate hooks for more readability and easier error-tracking. (
usePinchGesture
,useTapGestures
,usePanGesture
)It also improves some variable names and general code patterns.
This PR also adds TS types for many of the components used within the attachment gallery. Original TS migration PR: #33081
Fixed Issues
$
PROPOSAL:
Tests
Offline tests
None needed.
QA Steps
Same as in Tests, though there should be no change in functionality.
Especially check for (console) errors on all platforms...
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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
Android: Native
Screen_Recording_20240122_115117_New.Expensify.Dev.mp4
Android: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-01-22.at.11.50.00.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-01-22.at.11.57.39.mov
MacOS: Desktop
Added iOS Native, Android Native and web screen recordings. Web platforms are technically not affected by these changes...