Commit Graph

1155 Commits

Author SHA1 Message Date
Nicolas Gallagher
4a45595b7a 0.7.0 0.7.0 2018-05-18 17:29:47 -07:00
Nicolas Gallagher
45095fd300 Documentation updates 2018-05-18 17:27:39 -07:00
Nicolas Gallagher
004c7ce478 [change] export ES modules by default
ES modules are the default package export. Commonjs modules are exported
from 'dist/cjs'. Modern bundlers like webpack can consume ES modules.
The addition of the `sideEffects:false` to the `package.json` helps
webpack tree-shaking modules.
2018-05-18 17:27:36 -07:00
Nicolas Gallagher
96c3f09fac [fix] Firefox UI for numeric TextInput
Fix #900
2018-05-18 13:40:15 -07:00
Nicolas Gallagher
edc99e79eb [change] ResponderEventPlugin filters browser emulated mouse events
Browsers dispatch mouse events after touch events:
https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Supporting_both_TouchEvent_and_MouseEvent

There have been several attempts to avoid this behaviour affecting the
ResponderEvent system. The previous approach of cancelling the event in
the `onResponderRelease` event handler can end up cancelling other
events that are expected, e.g., `focus`.

Instead, this patch changes the `ResponderEventPlugin.extractEvents`
function to filter the mouse events that occur a short time after a
touch event. (It's assumed that people will not be clicking a mouse
within a few hundred ms of performing a touch.) This allows the
ResponderEvent system to function as expected and leaves other callbacks
to fire as they would be expected to in React DOM, i.e., both
`onTouchStart` and `onMouseDown` will be called following a touch start.

Fix #835
Fix #888
Fix #932
Close #938
Ref #802
2018-05-18 13:39:25 -07:00
Nicolas Gallagher
e8f2c98786 [add] mark focusable DOM nodes with 'data-focusable'
Focus-based UIs can use out-of-tree focus algorithms to manage focus
using remote control devices. This patch marks DOM nodes that React
Native considers "focusable".

Close #827
2018-05-18 11:56:56 -07:00
Nicolas Gallagher
dcdf1468f9 [fix] onLayout timing without ResizeObserver
onLayout is called after the component is mounted to the DOM. This makes
both the fallback and ResizeObserver code path behave the same as React
Native.

Fix #911
Fix #941
Close #939
2018-05-18 11:44:30 -07:00
Nicolas Gallagher
ee5e80064f [add] support for CSP policy requiring 'nonce' on <style>
CSP policy may prevent writing to `<style>` unless a `nonce` attribute
is set. This change makes that possible by moving the modality-related
styles into the main style sheet, and allowing additional props to be
provided to the `<style>` element when rendering on the server. For
example:

```
const { element, getStyleElement } = AppRegistry.getApplication('App');
const html = renderToString(element);
const css = renderToStaticMarkup(getStyleElement({ nonce }));
```
2018-05-18 11:44:24 -07:00
Philipp Spiess
3e4d8d6b2f Upgrade React and all transitive dependencies
Close #942
2018-05-16 15:01:19 -07:00
Nicolas Gallagher
d3a8270d55 Add a development sandbox to storybook 2018-05-09 10:38:34 -07:00
Nicolas Gallagher
18933724d6 Remove @providesModule from all modules
Ref: d5e9e55fa3
2018-05-08 10:28:25 -07:00
Nicolas Gallagher
e7f84a9228 Add GitHub issue templates
Close #931
2018-05-08 10:11:27 -07:00
Scott Kyle
8b1e6f816f [change] remove NetInfo.isConnected.getConnectionInfo()
React Native doesn't have `NetInfo.isConnected.getConnectionInfo()`.
This was incorrectly added to the API while updating the main `NetInfo`
API.

Close #937
2018-05-08 10:01:41 -07:00
Scott Kyle
02b6f3ff3c [fix] findNodeHandle import in VirtualizedList
Close #936
2018-05-08 09:53:50 -07:00
odalay
6f52007cc8 Fix CheckboxScreen link on website
Close #926
2018-05-08 09:53:16 -07:00
Nicolas Gallagher
1e59e53e66 Update jest 2018-05-08 09:49:02 -07:00
Nicolas Gallagher
f6a65210ca Update formatter and linter 2018-05-08 09:24:08 -07:00
Nicolas Gallagher
2e9071eb0e Update benchmarks dependencies 2018-05-08 09:15:51 -07:00
Nicolas Gallagher
8f25fcc05b Update storybook dependencies 2018-05-07 15:00:22 -07:00
Nicolas Gallagher
1e8577fc9e [fix] setting flex styles as inline styles
Reverts #648 as browsers are inconsistent in how they handle
'flex-basis', so this hack isn't effective. And React has no support for
using '!important' in inline styles.

Fix #798
2018-04-30 11:51:18 -07:00
Nicolas Gallagher
c51f567d19 Simplify tests for several exported modules 2018-04-24 15:54:40 -07:00
Nicolas Gallagher
bce5957991 0.6.1 0.6.1 2018-04-21 12:16:05 -07:00
Nicolas Gallagher
34d8409d43 Update yarn.lock 2018-04-21 12:15:18 -07:00
Sébastien Lorber
8442f13e96 Add Gatsby integration to README
Close #868
2018-04-21 12:12:50 -07:00
Nicolas Gallagher
c6e2b584af [fix] AppRegistry.getApplication shouldn't throw if missing options
Fix #899
2018-04-21 12:05:42 -07:00
Philipp Spiess
38affa9bae Fix Game2048 on desktop browsers
The React Native example only listens for touch events but on web we can
listen to mouse events to improve support.

Close #909
2018-04-21 11:56:14 -07:00
Nicolas Gallagher
f9ebdb6327 Documentation layout fixes 2018-04-21 11:50:39 -07:00
Nicolas Gallagher
83a8758f68 0.6.0 0.6.0 2018-04-15 15:56:10 -07:00
MoOx
e022d166dd Update Phenomic integration link to official example 2018-04-15 15:26:24 -07:00
Nicolas Gallagher
1a225bc449 [fix] Text onPress event propagation
The press event should not propagate.

Fix #897
2018-04-15 15:23:32 -07:00
Nicolas Gallagher
cf2612663b [fix] createElement uses provided function component
If the component provided to 'createElement' is not a string alias for a
DOM component, it will no longer attempt to replace that component with
a DOM component inferred from the 'accessibility{Component,Role,Traits}'
prop.

Fix #895
2018-04-15 15:03:34 -07:00
Nicolas Gallagher
1aec803086 [fix] Picker.Item support for 'color' prop
Not well supported by browsers.

Fix #810
2018-04-08 11:43:20 -07:00
Nicolas Gallagher
2050730b77 [fix] consistency of nativeEvent.location{X,Y} between touch and mouse
Calculate `location{X,Y}` in the same way for both touch and mouse
events. Also defer the call to `getBoundingClientRect` to avoid
unnecessary DOM queries when the data is not used.
2018-04-08 11:05:12 -07:00
Nicolas Gallagher
a67bf0f490 [change] synchronous layout measurement 2018-04-08 10:38:31 -07:00
Nicolas Gallagher
4529a4ac0a Update benchmarks dependencies 2018-04-07 17:20:01 -07:00
Giuseppe Gurgone
5a04d07a35 [change] call 'onLayout' when elements are resized
Uses ResizeObserver to monitor layout changes. Falls back to
window.onresize (with initial firing).

Fix #60
Close #848
2018-04-07 17:03:17 -07:00
Nicolas Gallagher
9427eea293 [add] VirtualizedList support
Make changes needed to run VirtualizedList using React Native for Web.

Close #659
2018-04-07 10:25:15 -07:00
Nicolas Gallagher
b9803e1e07 Add snapshot of VirtualizedList from React Native
Exact source code of the module and its dependencies, for the given SHA.
2018-04-07 10:25:15 -07:00
slorber
7a3a9a5c3f [add] AppRegistry support for React render callback
Close #858

Co-authored-by: Nicolas Gallagher <nicolasgallagher@gmail.com>
2018-04-07 10:15:17 -07:00
Nicolas Gallagher
4c59343fd3 [fix] SafeAreaView inset padding for Safari
See https://webkit.org/blog/7929/designing-websites-for-iphone-x/

Fix #859
2018-04-02 14:32:15 -07:00
Nicolas Gallagher
ce89b7e3ec [change] move 'react-art' to peerDependencies 2018-04-02 14:31:26 -07:00
Nicolas Gallagher
23fa663a6e [fix] Text font styling
Don't use 'font' shorthand internally to reset font styles, as the
framework's internal styles may be injected after application styles,
causing 'font' to override 'font-*' properties.

Fix #881
2018-04-02 11:37:59 -07:00
Nicolas Gallagher
b96dd668d3 [add] AppRegistry provider methods
Adds support for the following methods in React Native:
- setComponentProviderInstrumentationHook
- setWrapperComponentProvider
2018-04-01 10:29:27 -07:00
Nicolas Gallagher
a9cacb2ef5 [change] AppRegistry container is not absolutely positioned
Aligned with latest layout of AppContainer in React Native.

Fix #871
2018-04-01 09:47:02 -07:00
Nicolas Gallagher
c122814591 0.5.4 0.5.4 2018-04-01 09:34:51 -07:00
Bruno Lemos
efe18f1b7e [fix] Linking.openURL on Firefox
Fix #883
Close #884
2018-04-01 09:25:16 -07:00
Nicolas Gallagher
e1b576e427 [add] StyleSheet support for 'System' in font stack
Allow 'System' to be used in a font-family stack, e.g., "Noto, System".

Update the 'System' font stack to include "system-ui", which is the
latest keyword for system fonts.
2018-03-31 14:57:29 -07:00
Nicolas Gallagher
5d77d6e30f [fix] TextInput focus management
Defer to the browser's native handling of 'blur' and 'focus'; directly
update the internal state of TextInputState. Fixes an issue with
preserving focus when the tab is backgrounded.

Also ensure the TextInputState is correctly set when a component mounts.
When 'autoFocus' is true, 'onFocus' can be called before the internal
ref is set.

Fix #880
2018-03-31 14:01:19 -07:00
Jesús Darío
8fb9a88ee6 Add webpack-cli to getting started guide 2018-03-29 15:49:43 -07:00
Kyle Goggin
a7cda988ef [fix] ignore 'tvParallaxProperties' prop
Close #867
2018-03-29 15:47:39 -07:00