Commit Graph

157 Commits

Author SHA1 Message Date
Nicolas Gallagher
8756c20ade Minor changes and fixes to docs 2017-08-09 09:44:36 -07:00
Nicolas Gallagher
cc077e9019 [fix] allow Dimensions.set to be called on the server
Fix #566
2017-07-31 16:31:42 -07:00
Nicolas Gallagher
1225b00cdb Fix publishing of documentation 2017-07-30 20:25:26 -07:00
Nicolas Gallagher
08ee7c83bb Minor starting documentation improvement 2017-07-30 18:45:08 -07:00
Nicolas Gallagher
5fad78dcad [fix] remove unsupported TextInput props
For compatibility with React Native, do not pass on unsupported
TextInput props to avoid ReactDOM warnings.

Close #571
2017-07-29 17:30:31 -07:00
Nicolas Gallagher
5e3a946f8b Upgrade docs to use @storybook/react 2017-07-28 15:29:39 -07:00
Nicolas Gallagher
4e3d8dbb02 [change] support CSS custom properties
Update 'setValueForStyles' and style validation to support defining and
using custom properties.

Fix #516
2017-07-28 15:29:07 -07:00
Nicolas Gallagher
9e863d5402 Install docs dependencies separately 2017-07-22 10:47:40 -07:00
Nicolas Gallagher
e93a2eb478 Minor edits to View docs 2017-07-13 17:26:32 -07:00
Nicolas Gallagher
faec2b4a83 [fix] ScrollView to use 'touch-action' to disable scroll
The recommendation from the Chrome team is to use 'touch-action' to
disable scrolling (via touch modality) when passive event listeners are
in use.

Close #563
2017-07-13 17:10:38 -07:00
Nicolas Gallagher
3677f0dd57 Use more components to build docs 2017-07-11 20:18:52 -07:00
Nicolas Gallagher
6f3e29f630 [change] better Touchable support for keyboards
Problem:

Although 'Touchable' supports basic keyboard usage, it doesn't support
delays or interaction via the Space key.

Solution:

Extend the 'Touchable' mixin to better support keyboard interactions.
All touchable callbacks and delays are now supported when interacted
with via a keyboard's Enter and Space keys (as would be expected of
native 'button' elements). However, events are not normalized to mimic
touch events.

Minor upstream changes to the Touchables in React Native are also
included.
2017-07-10 12:57:16 -07:00
Nicolas Gallagher
f6ad9c3afb Update prettier and linter 2017-07-09 16:22:17 -07:00
Nicolas Gallagher
ad3dee0204 [change] a11y and layout: button role and DOM props
Problems:

HTML's native <button> tag doesn't support flex styling in all browsers,
causing layout bugs. And buttons or links created by "createDOMElement"
(without an accessibility role) do not have the correct props.

Solution:

The "button" role is rendered to a "div[role=button]" that is focusable
and responds to the same keyboard events as a native button. A native
button can still be rendered using "createDOMElement".

Make "createDOMProps" aware of the component context to ensure style
resets and other props are correctly applied when an accessibility role
is not defined.

Additionally:

This patch also adds a new "label" role to support accessible forms.
It maps to a native label element.

Close #241
2017-07-09 16:14:40 -07:00
Nicolas Gallagher
1a0a40d9be Minor improvements to docs text formatting 2017-07-08 20:24:49 -07:00
Vu Le
0bf6e893c6 [add] Dimensions event listeners
Close #511
2017-07-08 20:04:39 -07:00
Nicolas Gallagher
8f4bed8cb9 Display example apps in storybook 2017-07-03 12:32:16 -07:00
Nicolas Gallagher
fb999b5467 UIExplorer: list Components before APIs 2017-06-29 16:15:51 -07:00
Nicolas Gallagher
d4b1fde9cf Rewrite interactive documentation
Ref #491
2017-06-29 11:33:25 -07:00
Nicolas Gallagher
99348eaedb [fix] StyleSheet: server-side rendering of styles
Problem:

The content of style sheets was being set as a child of 'style', which
causes React to escape the content. This meant that the pointer-events
selectors were broken (">" became "&gt;") and pointer-events were
disabled for the entire server-rendered document.

Solution:

Use 'dangerouslySetInnerHTML' to avoid the CSS text being escaped.

Fix #546
2017-06-24 10:23:14 -07:00
Nicolas Gallagher
e9101abefe [change] TextInput 'onKeyPress' includes modifier keys
Include modifier keys in the 'nativeEvent'. This allows keyboard
shortcuts such as "Shift+Enter" to be implemented for submiting text
input content when the modality is keyboard + mouse rather than touch.
2017-06-23 14:48:34 -07:00
Kenneth Lynne
85b2afc313 [fix] TextInput 'onKeyPress' return values
Match the current React Native API for 'onKeyPress'.

Fix #518
Close #537
2017-06-22 18:00:54 -07:00
Nicolas Gallagher
4cfcdef264 [fix] AppRegistry container layout
Absolute fill positioning provides better default layout for full-screen
apps.

Fix #528
2017-06-20 10:17:55 -07:00
Nicolas Gallagher
d1d570268a Add note about React Dev Tools to Style guide 2017-06-18 14:36:39 -07:00
Nicolas Gallagher
deb0a85440 [change] AppRegistry.getApplication returns React elements
This changes the return value of 'getApplication' so that the
application element and stylesheets are all available as React elements.
Also changes StyleSheet's 'renderToString' to 'getStyleSheets'.

Fix #504
2017-06-14 10:41:20 -07:00
Nicolas Gallagher
47ba46780c [add] 'View' support for 'backgroundBlendMode' CSS
Fix #476
2017-06-13 14:22:52 -07:00
Nicolas Gallagher
d13f78622b [fix] pointerEvents CSS
Fix #513
2017-06-11 14:42:01 -07:00
Nicolas Gallagher
b1b70a420d [fix] Image support for inline SVG data
SVG data may contain characters that need escaping when applied as a CSS
background image.

Fix #512
2017-06-10 14:44:50 -07:00
Nicolas Gallagher
43d297bf59 [change] use ES2015 modules
Ref #102
2017-06-10 13:51:53 -07:00
Nicolas Gallagher
7f256c6423 Update documentation examples 2017-06-09 14:55:08 -07:00
Nicolas Gallagher
05069253a1 Add Calculator example app 2017-06-09 14:51:32 -07:00
Nicolas Gallagher
f10ac058b6 Add UIExplorer component for docs 2017-06-09 14:51:12 -07:00
Nicolas Gallagher
6aa2ac1f70 Remove ListView docs 2017-06-09 14:50:03 -07:00
Nicolas Gallagher
79e6dbaab5 Move 'NativeMethods' docs to direct manipulation guide 2017-06-09 14:49:15 -07:00
Nicolas Gallagher
fc86c876e0 Update formatter and linter 2017-06-09 12:59:39 -07:00
Fabrizio Moscon
33d1cdf193 Fix webpack documentation link 2017-06-09 10:28:30 -07:00
Maxime Thirouin
483a76cb5c Fix incorrect links in View documentation 2017-06-09 15:21:10 +02:00
Karan Thakkar
d57fb6407a Fix link to getting started in AppRegistry doc
Fixes #498
2017-06-01 10:50:38 +05:30
Nicolas Gallagher
bcdeda5dab [fix] Flow type checking and annotations
Fixes dozens of Flow errors; adds type annotations; marks more files for
Flow type checking. Fixes a bug in 'AppState'.

15 Flow errors remaining. Several React Native files are still not type
checked (e.g., PanResponder, Touchables)

Ref #465
2017-05-27 10:44:33 -07:00
Nicolas Gallagher
a388ef3e26 Rename 'examples' to 'docs/storybook'
Also changes several npm script names
2017-05-25 22:22:20 -07:00
Nicolas Gallagher
a84ecefa5d Rename 'performance' to 'benchmarks' 2017-05-25 21:44:01 -07:00
vaukalak
118b64a932 Add docs on platform-specific components 2017-05-22 11:22:02 -07:00
Nicolas Gallagher
124de7562d Add 'advanced use' and 'style' docs
Fix #450
2017-05-06 16:06:20 +01:00
周中原
79a6a5a486 Fix presentation of props in 'Button' docs 2017-05-05 10:30:10 -07:00
Nathan Broadbent
ba24a882be Link to another starter kit example 2017-04-26 15:11:16 -07:00
Nathan Leung
ae9a9cde5f Fix example webpack config in documentation 2017-04-24 13:21:46 -07:00
Nicolas Gallagher
227971d22c [add] support for CSS grid properties (experimental)
Allow people to experiment with using CSS grid in react-native. (No
support for shorthand properties.)
2017-04-22 10:34:43 -07:00
Nicolas Gallagher
4822cf4620 [add] support for 'clip' and 'textIndent' styles 2017-04-22 10:06:27 -07:00
Nathan Broadbent
91e4528eac Allow filter property in CSS 2017-04-22 22:56:07 +07:00
Nicolas Gallagher
6e71e1e058 [fix] attempt to avoid need for 'Array.from' polyfill
Fix #409
2017-04-20 18:04:09 -07:00