{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1255","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1255/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1255/events","html_url":"https://github.com/facebook/react-native/pull/1255","id":75775310,"number":1255,"title":"[Touchable] Add custom delay props to Touchable components","user":{"login":"jmstout","id":817658,"avatar_url":"https://avatars.githubusercontent.com/u/817658?v=3","gravatar_id":"","url":"https://api.github.com/users/jmstout","html_url":"https://github.com/jmstout","followers_url":"https://api.github.com/users/jmstout/followers","following_url":"https://api.github.com/users/jmstout/following{/other_user}","gists_url":"https://api.github.com/users/jmstout/gists{/gist_id}","starred_url":"https://api.github.com/users/jmstout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmstout/subscriptions","organizations_url":"https://api.github.com/users/jmstout/orgs","repos_url":"https://api.github.com/users/jmstout/repos","events_url":"https://api.github.com/users/jmstout/events{/privacy}","received_events_url":"https://api.github.com/users/jmstout/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20accepted","name":"GH Review: accepted","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"sahrens","id":1509831,"avatar_url":"https://avatars.githubusercontent.com/u/1509831?v=3","gravatar_id":"","url":"https://api.github.com/users/sahrens","html_url":"https://github.com/sahrens","followers_url":"https://api.github.com/users/sahrens/followers","following_url":"https://api.github.com/users/sahrens/following{/other_user}","gists_url":"https://api.github.com/users/sahrens/gists{/gist_id}","starred_url":"https://api.github.com/users/sahrens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahrens/subscriptions","organizations_url":"https://api.github.com/users/sahrens/orgs","repos_url":"https://api.github.com/users/sahrens/repos","events_url":"https://api.github.com/users/sahrens/events{/privacy}","received_events_url":"https://api.github.com/users/sahrens/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2015-05-12T23:19:54Z","updated_at":"2015-06-03T01:15:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/1255","html_url":"https://github.com/facebook/react-native/pull/1255","diff_url":"https://github.com/facebook/react-native/pull/1255.diff","patch_url":"https://github.com/facebook/react-native/pull/1255.patch"},"body":"This PR adds quite a bit of functionality to the Touchable components, allowing the ms delays of each of the handlers (`onPressIn, onPressOut, onPress, onLongPress`) to be configured.\r\n\r\nIt adds the following props to `TouchableWithoutFeedback, TouchableOpacity, and TouchableHighlight`:\r\n```javascript\r\n/**\r\n * Delay in ms, from the release of the touch, before onPress is called.\r\n */\r\ndelayOnPress: React.PropTypes.number,\r\n/**\r\n * Delay in ms, from the start of the touch, before onPressIn is called.\r\n */\r\ndelayOnPressIn: React.PropTypes.number,\r\n/**\r\n * Delay in ms, from the release of the touch, before onPressOut is called.\r\n */\r\ndelayOnPressOut: React.PropTypes.number,\r\n/**\r\n * Delay in ms, from onPressIn, before onLongPress is called.\r\n */\r\ndelayOnLongPress: React.PropTypes.number,\r\n```\r\n\r\n\r\n`TouchableHighlight` also gets an additional set of props:\r\n```javascript\r\n/**\r\n * Delay in ms, from the start of the touch, before the highlight is shown.\r\n */\r\ndelayHighlightShow: React.PropTypes.number,\r\n/**\r\n * Delay in ms, from the start of the highlight, before it is hidden.\r\n */\r\ndelayHighlightHide: React.PropTypes.number,\r\n```\r\n\r\nUsing these decouples the component's highlight from the press events, which could be useful in certain scenarios.\r\n\r\nI had to add a bit of complexity to the components, especially `TouchableHighlight`, but I think the benefit of having this customizability is definitely there.\r\n\r\nLet me know what you think. I'm happy to make changes as you all see fit.\r\n\r\nResolves #1078 and #134."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/108149526","html_url":"https://github.com/facebook/react-native/pull/1255#issuecomment-108149526","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1255","id":108149526,"user":{"login":"vjeux","id":197597,"avatar_url":"https://avatars.githubusercontent.com/u/197597?v=3","gravatar_id":"","url":"https://api.github.com/users/vjeux","html_url":"https://github.com/vjeux","followers_url":"https://api.github.com/users/vjeux/followers","following_url":"https://api.github.com/users/vjeux/following{/other_user}","gists_url":"https://api.github.com/users/vjeux/gists{/gist_id}","starred_url":"https://api.github.com/users/vjeux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjeux/subscriptions","organizations_url":"https://api.github.com/users/vjeux/orgs","repos_url":"https://api.github.com/users/vjeux/repos","events_url":"https://api.github.com/users/vjeux/events{/privacy}","received_events_url":"https://api.github.com/users/vjeux/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T01:15:36Z","updated_at":"2015-06-03T01:15:36Z","body":"I'd really love to hear about the use case you are trying to solve. The way we usually design APIs is we start from a use case and we brainstorm APIs that could solve the problem. It seems like you proposed one solution but we don't know your thought process that led to that solution.\r\n\r\nFrom our perspective, the solution is adding a lot of complexity to the code and interface and it's unclear what problem it is solving. Can you enlighten us? :) Thanks!"}}