-
Notifications
You must be signed in to change notification settings - Fork 24.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
[Touchable] Expose the touch-retention offset as a prop #713
Conversation
9fcf9b2
to
eec81b2
Compare
1fc167f
to
a11587c
Compare
12b1d5a
to
d5d18eb
Compare
I've been using this for nav bar buttons and it's pretty helpful to approximate UIKit's behavior. Any takers? |
1af9a81
to
d0e794a
Compare
cc @vjeux and @ericvicenti since this is most useful for nav bar buttons |
d0e794a
to
a322ec2
Compare
a322ec2
to
c494ec9
Compare
@facebook-github-bot import |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/330079883868498/int_phab to review. |
c494ec9
to
78a5332
Compare
78a5332
to
72c2517
Compare
ac4470a
to
1509a10
Compare
Rebased and renamed this to press retention offset, which distinguishes between touches and button presses. I've been using this for awhile since it's useful in real apps. |
1509a10
to
9142b81
Compare
9142b81
to
dcdf174
Compare
dcdf174
to
f9138d3
Compare
@ide updated the pull request. |
The press-retention offset defines a rect around a touchable component in which the press is retained. Easiest way to see this is to touch a button in a real navigation bar and slide your finger out of the range and back in. This diff exposes the offset as a prop (I thought pressRetentionOffset was a more informative name than pressRectOffset).
f9138d3
to
9dab4c8
Compare
@vjeux could you take a look at this next week? We use this in ExNavigator buttons and it's been working fine for months. Flow is happy with it too. So it's mostly a matter of naming and the API. |
Sounds good to me. @facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/330079883868498/int_phab to review. |
Summary: The touch-retention offset defines a rect around a touchable component in which the touch is retained. Easiest way to see this is to touch a button in a real navigation bar and slide your finger out of the range and back in. This diff exposes the offset as a prop (I thought touchRetentionOffset was a more informative name than pressRectOffset) Fixes facebook#198 Closes facebook#713 Reviewed By: svcscm Differential Revision: D2115370 Pulled By: shayne fb-gh-sync-id: c3f57940dfa3806f9c88df03a01d4d65bb58cf32
Summary: The touch-retention offset defines a rect around a touchable component in which the touch is retained. Easiest way to see this is to touch a button in a real navigation bar and slide your finger out of the range and back in. This diff exposes the offset as a prop (I thought touchRetentionOffset was a more informative name than pressRectOffset) Fixes facebook#198 Closes facebook#713 Reviewed By: svcscm Differential Revision: D2115370 Pulled By: shayne fb-gh-sync-id: c3f57940dfa3806f9c88df03a01d4d65bb58cf32
expose this property to make Text having same property as Touchable as facebook#713 solve Text in Text rect offset issue in facebook#11462
* Added instrutions to add platform-tools to Path. This allows windows to find adb.exe, a file required for react-native run-android to work properly. * removed wrong block class
* Add nullability checks (facebook#704) * Update RCTCxxBridge.mm * add nullability checks * 63 tooltips * Add Tooltip support (facebook#701) Co-authored-by: chiuam <67026167+chiuam@users.noreply.github.com>
The touch-retention offset defines a rect around a touchable component in which the touch is retained. Easiest way to see this is to touch a button in a real navigation bar and slide your finger out of the range and back in. This diff exposes the offset as a prop (I thought touchRetentionOffset was a more informative name than pressRectOffset)
Fixes #198