Commit Graph

29 Commits

Author SHA1 Message Date
Wayne Cheng f536a0c268 Adding flow strict local to remaining possible files in xplat/JS
Summary:
ag -L --ignore __snapshots__ 'flow strict|noflow|generated|The controller you requested could not be found.' | ag '\.js$' | xargs ag -l 'flow' | sort > ~/temp
  cat ~/temp | xargs ag -L 'flow strict' | xargs sed -i '' 's/flow$/flow strict-local/'
  until flow check; do flow check --json | jq -r '.errors[].message[0].path' | sort | uniq | xargs hg revert; done

allow_many_files
The controller you requested could not be found.
The controller you requested could not be found.

Reviewed By: TheSavior

Differential Revision: D9004573

fbshipit-source-id: 936bd5741706b781be06bf08b6ad805a69407dfd
2018-08-09 08:54:44 -07:00
Spencer Ahrens 5b6ff01764 Remove ScrollView.propTypes
Summary:
We're unifying on flow types, and propTypes require non-trivial resources to initialize in aggregate.

Some open source code might depend on extracting ScrollView.propTypes which will now fail. To fix, simplly remove these dependencies and use flow or typescript for verifying correct prop usage instead.

Reviewed By: TheSavior

Differential Revision: D8726371

fbshipit-source-id: 19e9540794db97a9e356615b544759a0753fd68c
2018-07-05 15:18:04 -07:00
Eli White 4b1ecb6204 Flowtype ListView
Reviewed By: yungsters

Differential Revision: D7985836

fbshipit-source-id: 6e0944a8d2fb85aabc34dfd3125a07b208749f21
2018-05-14 00:24:44 -07:00
Eli White af6e2eb02d Removing unnecessary FlowFixMe
Reviewed By: yungsters

Differential Revision: D7985749

fbshipit-source-id: ba7e152749c5a5cac134b51e0229dc11870bb3e0
2018-05-14 00:24:44 -07:00
Eli White 91c4b0357a Remove unused suppressions
Reviewed By: yungsters

Differential Revision: D7982027

fbshipit-source-id: 00e538dc678275495e097d9cd14a0a2643ebaefd
2018-05-12 10:35:27 -07:00
Eli White f19ee28e7d Adding $FlowFixMe to invalid prop accesses
Reviewed By: yungsters

Differential Revision: D7977387

fbshipit-source-id: 442e7445be62f78bdf166a2b97ef031e39877355
2018-05-12 10:35:27 -07:00
Eli White 8f5ebe5952 Convert react-native-github/Libraries to let/const
Reviewed By: sahrens

Differential Revision: D7956042

fbshipit-source-id: 221851aa311f3cdd6326497352b366048db0a1bb
2018-05-10 16:16:35 -07:00
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
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
Brian Vaughn 6f007e8957 Ran rename-unsafe-lifecycles codemod on xplat/js
Reviewed By: trueadm

Differential Revision: D6889214

fbshipit-source-id: e815cda4b09f3650ae3b0b9a44ae6f5fcb48fe25
2018-02-08 10:58:31 -08:00
Caleb Meredith eb0d6470e5 Flow 0.59 xplat/js deploy
Reviewed By: avikchaudhuri

Differential Revision: D6300238

fbshipit-source-id: a6839fa2a9bbc50c3832a3f5b1cac2a6d2bd96b7
2017-11-10 21:15:48 -08:00
Avik Chaudhuri a48da14800 @allow-large-files Flow 0.58 upgrade for xplat/js
Reviewed By: yungsters

Differential Revision: D6219339

fbshipit-source-id: f003111500ef5971b9a95f26d43cee6644c16abe
2017-11-02 10:51:14 -07:00
Christopher Chedeau 70c6700be8 Codemod to 1.7.0
Differential Revision: D5763302

fbshipit-source-id: a91ca1786c7ac8eb9aa3dd43555a7a223dc6f9cf
2017-09-26 23:45:48 -07:00
Naman Goel 11963d824d Fix Flow errors in ListViewData source.
Differential Revision: D5839414

fbshipit-source-id: 7a0c7b3d27be728c74e08d3a8209deb3ca68dd63
2017-09-19 16:57:41 -07:00
Marshall Roch 91b6b4efb9 @allow-large-files Flow v0.54.0
Reviewed By: leebyron

Differential Revision: D5773490

fbshipit-source-id: 2c54bb6326f23edbe9a969f3010f79da8189923e
2017-09-06 03:33:43 -07:00
Caleb Meredith 63f990121a Fix React Native open source
Reviewed By: hramos, TheSavior

Differential Revision: D5728356

fbshipit-source-id: fb751d67c16ba9273de93d9b6d5acd65b1555dca
2017-08-29 15:01:05 -07:00
Caleb Meredith 90eaeb019b Upgrade fbsource/xplat/js to Flow v0.53.0
Reviewed By: avikchaudhuri

Differential Revision:
D5648819
Ninja: T20988071

fbshipit-source-id: 66e5b6747c79ae66b6eb69d40ede5e982c26174f
2017-08-17 18:45:01 -07:00
Caleb Meredith 30d9c3d279 Add suppressions for Flow v0.53.0 before React changes
Reviewed By: avikchaudhuri

Differential Revision: D5648801

fbshipit-source-id: c4eb1bee198a177b69b6e9414111ce957b4d27ff
2017-08-17 05:18:33 -07:00
Garrett McCullough 8117fa16c9 Improve the documentation for ListView and ListViewDataSource
Summary:
What existing problem does the pull request solve?
My motivation was to improve the documentation for ListView and ListViewDataSource because I always have trouble remembering how they work and the documentation was lacking an example for `cloneWithRowsAndSections`

My PR does the following:
* add a note about how headers and footers are rendered on a horizontal ListView
* fix a typo in an example
* clarify that the sectionIdentities should match the keys or array indexes of the data source
* add an example of cloneWithRowsAndSections
* add notes on the return values of `getRowCount` and `getRowAndSectionCount`

n/a; documentation only

![screenshot of ListViewDataSource changes](https://cloud.githubusercontent.com/assets/580060/25768881/d339544a-31c1-11e7-88a1-5e60bc008500.png)
Closes https://github.com/facebook/react-native/pull/13811

Differential Revision: D5473192

Pulled By: hramos

fbshipit-source-id: f31fc6edfdeb8dff75d39bbcceda06fd839df934
2017-07-21 14:31:17 -07:00
Seth Fitzsimmons 9afb71fde8 Replace React.createClass with create-react-class
Summary:
This replaces all uses of `React.createClass` with `createReactClass` from the `create-react-class` package, attempting to match use of `var` and `const` according to local style.

Fixes #14620
Refs #14712
Closes https://github.com/facebook/react-native/pull/14729

Differential Revision: D5321810

Pulled By: hramos

fbshipit-source-id: ae7b40640b2773fd89c3fb727ec87f688bebf585
2017-07-07 14:36:01 -07:00
Spencer Ahrens 2c9e113f8e Add ListView deprecation message to docs
Summary:
Could have sworn we put this in a while ago...
Closes https://github.com/facebook/react-native/pull/14870

Differential Revision: D5376747

Pulled By: sahrens

fbshipit-source-id: d2bf3efea205defa48d6cd7f853739f17eb39ece
2017-07-06 11:51:32 -07:00
Christopher Chedeau c848c3820b Codemod prettier to 1.5.2
Differential Revision: D5339725

fbshipit-source-id: 631338436a7d69b0ab0721507bdab4ae4e207065
2017-06-28 12:50:30 -07:00
Spencer Ahrens 0a3e6e0e76 prettier
Reviewed By: fkgozali

Differential Revision: D5210279

fbshipit-source-id: 4b376a09b4bcfb42a2dc48b9903849d58929b7db
2017-06-12 22:45:49 -07:00
John O'Leary 62b20ce582 Scrollview updatedChildFrames data controlled by prop
Summary: Optimize ScrollView by adding flag "DEPRECATED_sendUpdatedChildFrames" to gate whether updatedChildFrames data is computed and propagated on scroll events.  The frame data is used in ListView by the onChangeVisibleRows prop.  When this prop is not defined, unnecessary computation in ScrollView should not be performed.

Reviewed By: sahrens

Differential Revision: D5174898

fbshipit-source-id: e3eaed8760b76becf14dfeb00122bdebdaeae4ef
2017-06-08 12:03:02 -07:00
Jean Regisser 5114b61b5e Add support for flashScrollIndicators on iOS
Summary:
Flashing scroll indicators is a standard behavior on iOS to show the user there's more content.

Launch RNTester on iOS, go to the ScrollView section, tap the "Flash scroll indicators" button.
You'll see this:

![Flash scroll indicators](https://cloud.githubusercontent.com/assets/57791/26250919/ebea607a-3cab-11e7-96c6-27579cc809ab.gif)

I've exposed the method `flashScrollIndicators` on all scrolling components that were already exposing a `scrollToXXX` method so it's usable from those components using a ref.

Let me know what you think.
Closes https://github.com/facebook/react-native/pull/14058

Differential Revision: D5103239

Pulled By: shergin

fbshipit-source-id: caad8474fbe475065418d771b17e4ea9766ffcdc
2017-06-06 13:06:48 -07:00
Tomasz Szajna a3249650d6 Fixed ListViewMock unique key error when many sections
Summary:
When ListViews has multiple sections, then rowIDs are required to be unique per section.
However the ListViewMock required rowIDs to be unique per whole list.
This change fixes the limitation of ListViewMock.
Closes https://github.com/facebook/react-native/pull/13642

Differential Revision: D5189675

Pulled By: shergin

fbshipit-source-id: 8a4fb68feb74af3307407d6d70f3f6642f50452a
2017-06-05 22:37:45 -07:00
Brian Vaughn 6564edce5e Ran PropTypes -> prop-types codemod against Libraries/FBReactKit/js/react-native-github
Reviewed By: acdlite

Differential Revision: D4876709

fbshipit-source-id: 3a5e92bfc74287b7a9054546c438580bed0147af
2017-04-12 16:15:15 -07:00
Naman Goel b7d873b1a0 Flow type improvements to accept co-variant types
Differential Revision: D4848918

fbshipit-source-id: b8d4628431c57c8fda12fc7e2e38e5b2dab9b1ad
2017-04-11 12:25:39 -07:00
Eric Vicenti ff4468ad1b Re-License Lists with standard React Native License
Reviewed By: sahrens

Differential Revision: D4771084

fbshipit-source-id: 9878a813b7dacb6ec1215fee469b946df0752de9
2017-03-24 14:31:19 -07:00