Nicolas Gallagher
cecacbc3ac
Add eslint-plugin-flowtype
2020-06-26 14:51:49 -07:00
Nicolas Gallagher
ff6109ec1c
Update README and docs
2020-06-26 14:51:49 -07:00
Nicolas Gallagher
aa647567ad
[change] Remove hitSlop
...
Rely on the native behavior of browsers to provide hitslop for touch on
interactive elements.
Fix 1609
2020-06-26 14:51:48 -07:00
Nicolas Gallagher
e9933b107a
Adjust keyboard onClick shim
2020-06-26 14:51:48 -07:00
Nicolas Gallagher
4b4163f630
[add] AccessibilityInfo API update
...
Close #1574
2020-06-26 14:51:47 -07:00
Nicolas Gallagher
ac945761e6
[fix] Add getNativeScrollRef to FlatList
...
Fix #1560
Close #1563
2020-06-26 14:51:47 -07:00
Nicolas Gallagher
7ab3cf0d42
[change] Remove scrollWithoutAnimationTo from ScrollView
...
Remove this API which was previously deprecated.
2020-06-26 14:51:47 -07:00
Nicolas Gallagher
37ff6b4888
Reorganize usePressEvents and PressResponder
2020-06-26 14:51:46 -07:00
Nicolas Gallagher
cf7d5e9b07
[fix] forwarding of refs and props
...
Fixes a performance regression in prop forwarding by reintroducing prop filtering.
Fixes ref forwarding to host components, mutating the host node to add imperative APIs.
2020-06-26 14:51:45 -07:00
Nicolas Gallagher
0ffbf66b1a
[change] Remove TabBarIOS and TimePickerAndroid exports
...
These modules have been removed from React Native
2020-06-26 14:51:45 -07:00
Nicolas Gallagher
a7da67cd09
Reorganize internal modules
2020-06-26 14:51:45 -07:00
Nicolas Gallagher
603adc46ab
Alternative PanResponder API
2020-06-26 14:51:44 -07:00
Nicolas Gallagher
88f5dedffd
[change] Add Pressable and replace Touchables
...
Port and rewrite "Pressability" from React Native as "PressResponder". This
integrates a press target with the responder system on web. It avoids
performing layout measurement during gestures by eschewing React Native's
iOS-like UX in favor of expected Web UX: a press target will look pressed until
the pointer is released, even if the pointer has moved outside the bounding
rect of the target.
The PressResponder is used to reimplement the existing Touchables. It's
expected that they will eventually be removed in favor of Pressable.
Fix #1583
Fix #1564
Fix #1534
Fix #1419
Fix #1219
Fix #1166
2020-06-26 14:51:43 -07:00
Nicolas Gallagher
7e724b279d
Remove enzyme
2020-06-26 14:51:42 -07:00
Nicolas Gallagher
204c432f66
[change] Text and View onClick handling
...
Makes `onClick` part of the stable props API. In the future this will be used
to implement `onPress` in the Touchables/Pressables. Special handling of click
for keyboards is performed in `createElement`. At the moment, `Text` still
includes the `onPress` prop, which will only be called if `onClick` is not also
being used. In the future `Text` (in React Native) should remove the Touchable
props from its API.
2020-06-26 14:51:41 -07:00
Nicolas Gallagher
66751502a3
[change] Replace the ResponderEventPlugin
...
Replaces the ResponderEventPlugin with useResponderEvents hook.
Also removes the event "normalization" of mouse, touch, and click events.
These events are not part of the responder system and will no longer be
modified from what ReactDOM dispatches.
Fix #1589
Fix #1568
Fix #1571
Fix #829
Fix #693
2020-06-26 14:51:40 -07:00
Nicolas Gallagher
4146b16a68
Add PanResponder examples to docs
2020-06-05 11:53:48 -07:00
Nicolas Gallagher
fe013b30dc
Add dom-event-testing-libary as a private package
...
This is copied from facebook/react with various fixes applied (which I'll push
upstream at a later date). Necessary for testing the Responder Event System
rewrite.
2020-06-05 11:53:47 -07:00
Nicolas Gallagher
fa6e269832
Add missing imports to docs mdx files
2020-06-02 10:57:38 -07:00
Nicolas Gallagher
ee1cb490d6
Fix optional value flow types
2020-06-02 10:57:37 -07:00
Nicolas Gallagher
f4e8b6b194
[change] modernize Image
...
Rewrite Image to use function components and hooks.
Fix #1322
2020-06-02 10:57:36 -07:00
Nicolas Gallagher
7e616f6d46
Fix props table for docs
...
Stop using the built-in Props table from Storybook (which wasn't working.)
2020-06-02 10:57:36 -07:00
Nicolas Gallagher
8952eccf86
[change] Explicitly forward props and introduce unstable_{ariaSet,dataSet}
...
Rather than filtering props, they are explicitly forwarded in each component.
This makes it easier to see exactly which props are being forwarded to host
components by each React Native component. Two new props - `unstable_ariaSet`
and `unstable_dataSet` - are introduced to avoid iterating over props to find
`aria` and `data` props.
The `accessibilityValue` prop is also implemented.
2020-06-02 10:57:35 -07:00
Nicolas Gallagher
654f65e3e0
[change] modernize TextInput
...
Rewrite TextInput to use function components and hooks.
Rewrite the unit tests to replace enzyme with testing-library.
Fix #1339
2020-06-02 10:55:51 -07:00
Nicolas Gallagher
d94a14dc8c
[change] RefreshControl, StatusBar, YellowBox as function components
2020-06-02 10:55:50 -07:00
Nicolas Gallagher
8d37fde5ee
[change] modernize Picker
...
Rewrite Picker to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:50 -07:00
Nicolas Gallagher
fdf53df301
[change] modernize CheckBox
...
Rewrite CheckBox to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:49 -07:00
Nicolas Gallagher
999c2ad122
[change] modernize ActivityIndicator
...
Rewrite ActivityIndicator to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:49 -07:00
Nicolas Gallagher
35236a3cc2
[change] modernize Text
...
Rewrite Text to use function components and hooks.
2020-06-02 10:55:48 -07:00
Nicolas Gallagher
2724ca0293
Add eslint-plugin-react-hooks
2020-06-02 10:55:48 -07:00
Nicolas Gallagher
fc443c5abd
[change] modernize View
...
Rewrite View to use function components and hooks.
The 'usePlatformMethods' hook also fixes a bug in the class-based
implementation of 'setNativeProps' which was unable to correctly merge its
styles with those provided via the component API. In the future,
'setNativeProps' will be removed from React Native anyway.
See (3) in #1136 for more context.
2020-06-02 10:55:47 -07:00
Nicolas Gallagher
7d440c74f4
[change] modernize Switch
...
Rewrite Switch to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:47 -07:00
Nicolas Gallagher
ebc3882661
[change] modernize ScrollViewBase
...
Rewrite ScrollViewBase to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:46 -07:00
Nicolas Gallagher
b28d2a8214
[fix] SafeAreaView types
2020-06-02 10:55:46 -07:00
Nicolas Gallagher
94ecc46ece
[change] modernize ProgressBar
...
Rewrite ProgressBar to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:45 -07:00
Nicolas Gallagher
5b40b9d6aa
[change] modernize ImageBackground
...
Rewrite ImageBackground to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:45 -07:00
Nicolas Gallagher
840a2e91d4
[change] modernize Button
...
Rewrite Button to use function components.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:44 -07:00
Nicolas Gallagher
96d8649197
[change] modernize AppRegistry
...
Rewrite AppRegistry to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:44 -07:00
Nicolas Gallagher
a2cccaf528
[change] Add usePlatformMethods to implement instance methods
...
A hook equivalent for implementing "native methods" on refs to elements backed
by function components.
2020-06-02 10:55:43 -07:00
Nicolas Gallagher
51ac083d56
[change] Add useElementLayout hook to implement onLayout callback
...
A hook equivalent for implementing onLayout in function components. Removes
the fallback to using window resize events. A ResizeObserver polyfill is now
requires to use the `onLayout` prop.
2020-06-02 10:55:43 -07:00
Nicolas Gallagher
9dbe17fa6a
0.12.3
2020-06-02 10:51:45 -07:00
Nicolas Gallagher
f4a481bb4f
[fix] Allow 'lang' attribute to be forwarded to DOM nodes
2020-06-02 10:38:35 -07:00
Nicolas Gallagher
5287044f40
0.12.2
2020-02-24 14:08:31 -08:00
Nicolas Gallagher
c8b73fa4e4
0.12.1
2020-02-06 13:39:50 -08:00
Nicolas Gallagher
3d53273fe7
Update internal paths to docs
2020-02-06 13:38:38 -08:00
Nicolas Gallagher
5b7f584f19
[fix] View filtering of accessibility props
2020-02-06 11:27:31 -08:00
Nicolas Gallagher
88c664fa0f
Update dependencies for 'benchmarks' package
2020-01-30 17:11:13 -08:00
Nicolas Gallagher
dff62b3af6
Update jest dependencies
2020-01-30 17:01:07 -08:00
Nicolas Gallagher
032279e5f7
Update dependencies for 'docs' package
2020-01-30 16:54:01 -08:00
Nicolas Gallagher
d30d65b29d
Update babel dependencies
2020-01-30 16:45:07 -08:00
Nicolas Gallagher
dee418bb93
0.12.0
2020-01-24 14:24:35 -08:00
Nicolas Gallagher
16c0109df6
Replace invariant with console.error in View
...
Jest dumps the invariant error to the console when unit tests run, which is
both annoying and more likely to cause unwanted error to go unnoticed. We're
also moving away from using 'invariant' in React. This patch replaces the
invariant with a call to 'console.error', which won't crash an app that is
using raw text nodes as View children, but it's better than nothing.
2019-12-21 16:58:14 +00:00
Nicolas Gallagher
287251a06a
[change] Remove 'placeholderTextColor' from 'createElement' props
...
TextInput converts the 'placeholderTextColor' prop to a style.
2019-12-21 16:57:11 +00:00
Nicolas Gallagher
e670e8135b
[fix] TextInput forwards placeholderTextColor
...
Fix a bug introduced by 924e891f58
Ref #1512
2019-12-20 23:30:37 +00:00
Nicolas Gallagher
e22f0bebb3
[fix] ScrollView disabling of scroll
...
Make sure 'scrollEnabled={false}' works on desktop browsers and no longer
relies on using 'e.preventDefault()'.
Fix #1491
2019-12-20 19:30:09 +00:00
Nicolas Gallagher
fc033a3161
[add] TextInput disabled prop
...
Add support for disabling TextInput elements
Fix #1036
2019-12-20 19:18:01 +00:00
Nicolas Gallagher
e0412acb94
[add] Allow style scrollbarWidth 'thin' value
...
Close #1499
2019-12-19 16:59:06 +00:00
Nicolas Gallagher
b10711bddd
[fix] TextInput autoComplete behavior
...
Fix 'autoComplete' behavior now that Chrome has fixed broken behavior for 'off'.
Add fallback support for React Native's 'autoCompleteType' prop.
Close #1404
2019-12-18 22:31:45 +00:00
Nicolas Gallagher
aa8593ba97
[change] Switch prop 'trackColor' support
...
Remove support for legacy React Native props and add support for the
'trackColor' object. Retains support for the web-only equivalents as I think
this API is preferable to the one in React Native, both in terms of flexibility
and performance (no inline objects).
Fix #1382
2019-12-18 16:22:54 +00:00
Nicolas Gallagher
3c9cc66264
Update storybook dependencies
2019-12-18 14:52:03 +00:00
Nicolas Gallagher
1ad1693039
[change] Remove PropTypes exports and internal use
...
Removes the following deprecated exports: `ColorPropType`,
`EdgeInsetsPropType`, `PointPropType`, `TextPropTypes`, and `ViewPropTypes`.
Remove all use of `prop-types` in the implementations of components. Flow types
are used instead, so there will no longer be runtime warnings related to props.
NOTE: Removes support for `className` prop.
Fix #1383
Close #1477
Close #1474
Close #1489
2019-12-18 12:40:31 +00:00
Nicolas Gallagher
924e891f58
Update babel-plugin-tester
2019-11-15 14:21:16 -08:00
Nicolas Gallagher
f43ce41f0d
Update README
2019-11-13 11:30:31 -08:00
Nicolas Gallagher
afb8d3b7fb
[change] Configure hydration using AppRegistry.runApplication()
...
Client-side hydration of server-rendered HTML now requires that `hydrate` is explicitly set in the `appParams` passed to `AppRegistry.runApplication()`.
Fix #1374
2019-11-12 16:54:51 -08:00
Nicolas Gallagher
e4ed0fd3c8
[fix] ScrollResponder componentWillMount -> UNSAFE_componentWillMount
2019-11-12 15:36:10 -08:00
Nicolas Gallagher
297cda7901
Rewrite interactive documentation
...
Consolidate all docs within the latest storybook
Ref #1172
2019-11-12 15:19:48 -08:00
Nicolas Gallagher
8cf00a5c5a
Update inline-style-prefixer and misc deps
2019-11-12 14:42:58 -08:00
Nicolas Gallagher
3fd90b9252
Update flow to 0.109
...
Add $FlowFixMe to vendor code that produces flow errors
2019-11-12 14:42:57 -08:00
Nicolas Gallagher
9e7c37128e
Update 'benchmarks' dependencies
2019-11-12 14:42:54 -08:00
Nicolas Gallagher
41e6dca1e3
Update linter and formatter tools
2019-10-08 13:06:20 -07:00
Nicolas Gallagher
02a3640f95
Update test tools
2019-10-08 13:06:17 -07:00
Nicolas Gallagher
290a2a76ce
Update babel build tools
2019-10-08 13:04:10 -07:00
Nicolas Gallagher
1b3c31ff6a
Run prettier across codebase
...
Close #1444
2019-10-07 14:26:24 -07:00
Nicolas Gallagher
d4b9f35d33
[change] createElement -> unstable_createElement
...
Rename the 'createElement' export to reflect its unstable status.
Fix #1385
2019-10-07 14:20:49 -07:00
Nicolas Gallagher
3ac0b96498
[change] Update Touchable components
...
Reference RN 0.60 implementations with web-specific fixes
Ref #1172
Fix #1105
2019-10-07 14:01:05 -07:00
Nicolas Gallagher
33f1c3566c
[add] forwardedRef prop to View and Text
...
Ref #1172
2019-10-04 11:37:26 -07:00
Nicolas Gallagher
d57fb6eb01
[change] accessibilityRelationship and accessibilityState props
...
Adds the accessibilityState and accessibilityRelationship object props that map
to ARIA props.
Removes the accessibilityStates array prop that is not compatible with web
accessibility services.
Ref #1172
2019-10-04 11:37:26 -07:00
Nicolas Gallagher
ae94551ac5
[change] Remove accessibilityTraits and accessibilityComponentType props
...
These props are deprecated in React Native and replaced by accessibilityRole
Ref #1352
2019-10-04 11:37:25 -07:00
Nicolas Gallagher
1af0218d26
Remove unused 'shadowSpread' prop type
...
Close #1357
2019-10-04 11:37:25 -07:00
Nicolas Gallagher
d554d83727
[change] Text uses createContext
...
Replaces the legacy 'contextTypes' API.
Removes 'enzyme' from related tests. Back to recording DOM snapshots.
Close #1248
Ref #1172
2019-10-04 11:37:25 -07:00
Nicolas Gallagher
25dd43e960
[change] Update vendor code
...
* FlatList
* SectionList
* VirtualizedList
* VirtualizedSectionList
2019-10-04 11:37:22 -07:00
Nicolas Gallagher
c4a2a6d4a3
Update to flow-bin@0.98
2019-10-04 11:07:09 -07:00
Nicolas Gallagher
ad674e4b4f
[add] Platform.isTesting
2019-10-04 11:07:09 -07:00
Nicolas Gallagher
304e8a83ab
[change] Update Animated
...
react-native@v0.60 .0-rc.3
Fix #1378
Fix #1325
Close #1306
2019-10-04 11:07:09 -07:00
Nicolas Gallagher
ac71506610
[change] Remove WebView
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:09 -07:00
Nicolas Gallagher
847870e4b3
[change] Remove ViewPagerAndroid
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:09 -07:00
Nicolas Gallagher
845c2726b2
[change] Remove VibrationIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:09 -07:00
Nicolas Gallagher
9d76d58891
[change] Remove ToolbarAndroid
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:09 -07:00
Nicolas Gallagher
f54c957199
[change] Remove SwipeableListView
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:09 -07:00
Nicolas Gallagher
425102c16e
[change] Remove StatusBarIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
0c350d2678
[change] Remove SnapshotViewIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
eaa24ae91d
[change] Remove Slider
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
24801cb5da
[change] Remove SegmentedControlIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
41e4f05eb0
[change] Remove PushNotificationIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
72ede16c9c
[change] Remove ProgressBarAndroid and ProgressViewIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
7ec9b075a1
[change] Remove PickerIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
89bc074327
[change] Remove NetInfo
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
add0e0cb7e
[change] Remove NavigatorIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
8900cea576
[change] Remove MaskedViewIOS
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00
Nicolas Gallagher
6c682bbb92
[change] Remove ListView
...
Ref #1352
Ref https://github.com/facebook/react-native/issues/23313
2019-10-04 11:07:08 -07:00