Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

ide
Copy link
Contributor

@ide ide commented Apr 7, 2015

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 7, 2015
@ide ide force-pushed the touch-retention-offset branch 4 times, most recently from 9fcf9b2 to eec81b2 Compare April 15, 2015 20:59
@ide ide force-pushed the touch-retention-offset branch 2 times, most recently from 1fc167f to a11587c Compare April 28, 2015 01:24
@ide ide force-pushed the touch-retention-offset branch 2 times, most recently from 12b1d5a to d5d18eb Compare May 1, 2015 07:52
@ide
Copy link
Contributor Author

ide commented May 1, 2015

I've been using this for nav bar buttons and it's pretty helpful to approximate UIKit's behavior. Any takers?

@ide ide force-pushed the touch-retention-offset branch 2 times, most recently from 1af9a81 to d0e794a Compare May 8, 2015 21:51
@ide
Copy link
Contributor Author

ide commented May 13, 2015

cc @vjeux and @ericvicenti since this is most useful for nav bar buttons

@shayne shayne assigned shayne and unassigned vjeux Jun 1, 2015
@shayne
Copy link
Contributor

shayne commented Jun 1, 2015

@facebook-github-bot import

@facebook-github-bot
Copy link
Contributor

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.

@shayne shayne assigned vjeux and unassigned shayne Jun 1, 2015
@ide ide force-pushed the touch-retention-offset branch 3 times, most recently from ac4470a to 1509a10 Compare July 28, 2015 05:34
@ide
Copy link
Contributor Author

ide commented Jul 28, 2015

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.

@vjeux vjeux removed their assignment Oct 16, 2015
@facebook-github-bot
Copy link
Contributor

@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).
@ide
Copy link
Contributor Author

ide commented Nov 13, 2015

@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.

@ide ide added the JavaScript label Nov 13, 2015
@vjeux
Copy link
Contributor

vjeux commented Nov 16, 2015

Sounds good to me.

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

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.

@ide ide closed this in f331d2a Nov 16, 2015
sunnylqm pushed a commit to sunnylqm/react-native that referenced this pull request Dec 2, 2015
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
Crash-- pushed a commit to Crash--/react-native that referenced this pull request Dec 24, 2015
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
evollu pushed a commit to evollu/react-native that referenced this pull request Dec 15, 2016
expose this property to make Text having same property as Touchable as  facebook#713
solve Text in Text rect offset issue in facebook#11462
ayushjainrksh referenced this pull request in MLH-Fellowship/react-native Jul 2, 2020
* 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
mganandraj pushed a commit to mganandraj/react-native that referenced this pull request Feb 10, 2021
* 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>
@ide ide deleted the touch-retention-offset branch March 9, 2024 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. JavaScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Touchable] Customizing "press rect offset" of touchable components
4 participants