-
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 BasePreRenderer to PressableWithoutFeedback #19083
Migrate BasePreRenderer to PressableWithoutFeedback #19083
Conversation
c74cde8
to
58db714
Compare
@aimane-chnaif @techievivek One of you needs to 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] |
@robertKozik please pull main. And complete checklist. |
@aimane-chnaif done 🎸 I've also requested translation to review: https://expensify.slack.com/archives/C01GTK53T8Q/p1684962212463129 |
I noticed slight difference in cursor behavior while mouse is outside text area: Before fix: (pointer) before.movAfter fix: (I-beam) after.movI think new behavior is better but it's worthy of investigating where this diff comes from to avoid regressions in any other parts. |
The beam cursor is set automatically when accessibilityRole of the pressable is |
oh right, I see cursor is overridden here:
|
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
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!
@techievivek all yours!
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.
✋ 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/techievivek in version: 1.3.20-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.20-5 🚀
|
Details
This PR migrates
BasePreRenderer
fromTouchableWithoutFeedback
(soon to be deprecated inreact-native-web
) to newPressableWithoutFeedback
. As this component doesn't provide theonPress
function I had to change the propTypes ofBaseGenericPressable
. Now onPress function is not required and inside theonPressHandler
we are checking if onPress function is present. Accessibility label forBasePreRenderer
is set to: "prestyled text" and localised. Behaviour of BasePreRenderer shoudn't be changed by this migrationFixed Issues
$ #17007
PROPOSAL: #17007
Tests
a. verify that text is styled properly
b. On Web/Desktop, verify that you see the I-bream cursor and not the pointer cursor
c. On mWeb/Native, verify that long-press the message will show the context menu
Offline tests
Same as Test Steps
QA Steps
Same as Test 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
NEW.Desktop.-.web.mov
Mobile Web - Chrome
NEW.Android.-.chrome.mov
Mobile Web - Safari
NEW.iOS.-.safari.mov
Desktop
NEW.Desktop.-.native.mov
iOS
NEW.iOS.-.native.mov
Android
NEW.Android.-.native.mov