Commit Graph

14 Commits

Author SHA1 Message Date
Rubén Norte d5e9e55fa3 Remove @providesModule from all modules
Summary:
This PR removes the need for having the `providesModule` tags in all the modules in the repository.

It configures Flow, Jest and Metro to get the module names from the filenames (`Libraries/Animated/src/nodes/AnimatedInterpolation.js` => `AnimatedInterpolation`)

* Checked the Flow configuration by running flow on the project root (no errors):

```
yarn flow
```

* Checked the Jest configuration by running the tests with a clean cache:

```
yarn jest --clearCache && yarn test
```

* Checked the Metro configuration by starting the server with a clean cache and requesting some bundles:

```
yarn run start --reset-cache
curl 'localhost:8081/IntegrationTests/AccessibilityManagerTest.bundle?platform=android'
curl 'localhost:8081/Libraries/Alert/Alert.bundle?platform=ios'
```

[INTERNAL] [FEATURE] [All] - Removed providesModule from all modules and configured tools.
Closes https://github.com/facebook/react-native/pull/18995

Reviewed By: mjesun

Differential Revision: D7729509

Pulled By: rubennorte

fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
2018-04-25 07:37:10 -07:00
Sam Mueller 554243eb56 Fix TouchHistoryMath import
Summary:
The reference needed to be updated after the file was moved in this commit:
06085d3836

Otherwise, results in the packager failing with the following error:
> Unable to resolve module TouchHistoryMath from /node_modules/react-native/Libraries/Interaction/PanResponder.js: Module TouchHistoryMath does not exist in the Haste module map
Closes https://github.com/facebook/react-native/pull/18732

Differential Revision: D7547181

Pulled By: sebmarkbage

fbshipit-source-id: 78028c2f46faa2ce130a1a0c25fcaca47d2516a8
2018-04-07 21:09:24 -07:00
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Eric Vicenti 4a80dceac7 Re-license and rename UIExplorer integration test app as RNTester
Reviewed By: yungsters

Differential Revision: D4950085

fbshipit-source-id: 44574b5d0ef0d2ad5dfc714309b18dc69cbad9ff
2017-05-08 11:31:19 -07:00
Andrew Ingram dfaa03e1cb Fixes "guesture" typo in PanResponser docs
Summary:
Simple typo fix in docs.
Closes https://github.com/facebook/react-native/pull/13247

Differential Revision: D4819135

Pulled By: ericvicenti

fbshipit-source-id: 64bc597133a31276fdff8f1ef2ee061f2a9bb17d
2017-04-03 09:15:29 -07:00
Ben Kalman fb4f71f4ac Add missing backtick in PanResponder.js docs
Summary: Closes https://github.com/facebook/react-native/pull/11274

Differential Revision: D4268360

fbshipit-source-id: 8d92300830e4568de14350a539c11b8773c425c0
2016-12-02 15:13:34 -08:00
David Aurelio 3683beb88a RN: Update React (2/2)
Reviewed By: kentaromiura

Differential Revision: D4026114

fbshipit-source-id: 67808af91454d95941fea01eef58a4d9086f46e1
2016-11-04 05:43:44 -07:00
Seph Soliman d1f8add4d0 Documentation fix: dx vs. x0
Summary:
> What existing problem does the pull request solve?

Purely a documentation/example error. Was misled/wasted time debugging because of this issue.

Description:
`dx`/`dy` are zero in onPanResponderGrant, not `x0`/`y0`. `x0`/`y0` will be the coordinates relative to the granted element, which are rarely zero.
Closes https://github.com/facebook/react-native/pull/9984

Differential Revision: D4001603

Pulled By: hramos

fbshipit-source-id: 32580795f62394585ccfb8f9a2ae65b0b72add69
2016-10-11 08:13:39 -07:00
Hedger Wang 4843a90c1c PanResponder should not hold stale handle for interaction.
Summary:
For now, `PanResponder.create()` return a new object which may hold a handle
for interaction. The handle is created when the gesture starts, and it's cleared
when the gesture finishes.

However, the handle may become stale cause the owner (view) is removed or
re-rendered before the gesture finishes, which leaves InteractionManager
with handles that can never be removed.

In some cases, this blocks the app that waits for InteractionManager to
be idle and having leaky handles prevents InteractionManager from being idle
again.

The fix is to move the handle from the instance to the static variable, and
we'd clear it whenever a gesture finishes.

Reviewed By: sahrens

Differential Revision: D3550699

fbshipit-source-id: 412e9046a6cd9be34b3a7d572258008016a29f41
2016-07-15 11:58:31 -07:00
Antti Moilanen c06a1360a9 Fix broken link to PanResponderExample.js
Summary:
In recent change in 2f73ca8 all javascript files under UIExplorer were moved to js subfolders but PanResponderExample link wasn't updated accordingly.
Closes https://github.com/facebook/react-native/pull/8725

Differential Revision: D3554851

fbshipit-source-id: 798b9a76ecb667512a23a405d0fee0691a9debce
2016-07-13 00:58:17 -07:00
David Aurelio bd60d828c5 Remove `node_modules/react` from the list of discoverable haste modules
Summary: This removes `node_modules/react` from the list of directories that are used for haste module resolutions. Modules required from React are now imported with `require('react/lib/…')`.

Reviewed By: astreet

Differential Revision: D3509863

fbshipit-source-id: 32cd34e2b8496f0a6676dbe6bb1eacc18124c01e
2016-07-05 06:44:33 -07:00
Spencer Ahrens b5d9bf0fb2 merge InteractionManager stuff back into PanResponder
Reviewed By: bestander

Differential Revision: D3224519

fb-gh-sync-id: d041214b68fedfdd6b01aa2b710b02381c29dcfa
fbshipit-source-id: d041214b68fedfdd6b01aa2b710b02381c29dcfa
2016-04-26 13:19:22 -07:00
Spencer Ahrens 667d278119 Only grab InteractionManager handle in PanResponder, not all touches
Summary:
Previously, `InteractionManager` was baked in at the lowest level to all touches via `ResponderEventPlugin`,
which meant that any time a finger was touching the screen, `InteractionManager` would be locked. This included while
doing 100% native scrolls, and thus would block progress from Relay, Incremental, or anything else scheduling events
through `InteractionManager`.

This diff switches to only bake it into `PanResponder` (and it remains hooked into `Animated` as before) which are the
main two cases where we need 60fps JS execution and want to queue up slower tasks.

This is done with a reusable higher-order-responder `InteractionManager.createResponderClass`.

Depends on FYI https://github.com/facebook/react/pull/6587, https://github.com/facebook/react/pull/6584

Reviewed By: sebmarkbage

Differential Revision: D3210951

fb-gh-sync-id: 682d21ac5cff704673b63d5942a903a3d8912835
fbshipit-source-id: 682d21ac5cff704673b63d5942a903a3d8912835
2016-04-26 00:23:30 -07:00
Sebastian Markbage 8e43b24a36 Update React to alpha.3
Summary:
Sync new React fixes.

Includes...

https://github.com/facebook/react/pull/6584
https://github.com/facebook/react/pull/6587
https://github.com/facebook/react/pull/6588
https://github.com/facebook/react/pull/6590

Since this require PanResponder to be restored I also included D3210771 here.

Reviewed By: spicyj

Differential Revision: D3221285

fb-gh-sync-id: cbb6b1dd0fd0443d246957ceb94b6a424c09c24e
fbshipit-source-id: cbb6b1dd0fd0443d246957ceb94b6a424c09c24e
2016-04-25 20:38:26 -07:00