Commit Graph

1780 Commits

Author SHA1 Message Date
Ben Alpert ac349cfbe5 Fix PropTypes.{oneOf, oneOfType} validation
Follow-up to #3963. (Returning an Error wasn't useful; it just caused a later error when actually using it because type checkers need to be functions.)
2015-05-27 15:58:16 -07:00
Ben Alpert f44bf7e67a Merge pull request #3966 from spicyj/no-worker-test
Remove web worker test
2015-05-27 10:53:53 -07:00
Ben Alpert 12ea09a03c Remove web worker test 2015-05-27 10:52:32 -07:00
Alan Souza 5d55bbc1b7 Adding validation for array in ReactPropTypes. 2015-05-26 15:54:31 -07:00
Stefan Dombrowski 3092454940 Add capture to supported attributes 2015-05-24 21:20:40 +02:00
Jim 7108c8a624 Fixed failing unit tests in browsers that don't support WebComponents 2015-05-22 13:27:52 -07:00
Ben Alpert 08b55e1c4f Dedupe warnings in validateDOMNesting
Fixes #3921.
2015-05-22 01:14:40 -07:00
Paul O’Shannessy f1cfd29e7e Merge pull request #3912 from laskos/shallow-context-pass
Add shallow context pass test
2015-05-20 15:11:31 -07:00
Sławomir Laskowski 2c83627ca8 Add shallow context pass test 2015-05-21 00:08:31 +02:00
Ben Alpert e5f935636d Merge pull request #3917 from spicyj/option-context
Pass context to DOM wrappers, use it in <option>
2015-05-20 15:02:53 -07:00
Paul O’Shannessy b687a22953 0.14.0-alpha2 2015-05-20 13:37:42 -07:00
Ben Alpert 2fafe3eb76 Pass context to DOM wrappers, use it in <option> 2015-05-20 12:30:51 -07:00
Ben Alpert a43b6fec45 Remove unused variable 2015-05-19 16:23:10 -07:00
Ben Alpert 69e6ab5083 Add test for DOM node as this.props.children 2015-05-18 23:11:07 -07:00
Ben Alpert 39402fe75d Revert "Add key warning to nested collections"
This heuristic isn't great because it relies on inspecting deep children which aren't guaranteed to be React elements. In particular, this was causing stack overflows in a component we had that used a *DOM node* as children, like `<DOMContainer>{node}</DOMContainer>`.

This reverts commits:
0a3aa8493a
64c9d9d762
0c58f4f6b1
8cf226e442
086636747f
2015-05-18 23:11:07 -07:00
Paul O’Shannessy 490d8835fc Merge pull request #3737 from Morhaus/nested-proptypes-warnings
Better warnings for nested propTypes
2015-05-16 12:09:29 -07:00
Sebastian Markbage 0b063f8a09 Reorganize Src Files for Isomorphic React Package
The new folder structure is organized around major packages that are expected to ship separately in some form.

`/isomorphic`

I moved classic/modern and children utils into a directory called "isomorphic" with the main export being ReactIsomorphic. This will eventually become the "react" package.

This includes all the dependencies that you might need to create a component without dependencies on the renderer/reconciler.

The rest moves into decoupled renderers.

`/renderers/dom/client` - This is the main renderer for DOM.

`/renderers/dom/server` - This is the server-side renderer for HTML strings.

`/addons` and `/test` - Same as before for now.

You're not supposed to take on a dependency inside another package.

Shared code is organized into a "shared" directory which is intended to support all the packages in that subdirectory. Meaning that once we swap to CommonJS modules, the only time you should use `..` is to target `../shared/` or `../../shared`.

E.g. `/shared/` is common utils that are used by everything.

`/renderers/shared/` is code that is shared by all renderers, such as the main reconciliation algorithm.

Shared code will likely be copied into each package rather than referenced. This allow us to have separate state and allow inlining and deadcode elimination.
2015-05-15 18:35:22 -07:00
Paul O’Shannessy bea5a57750 Merge pull request #3746 from chrisgrovers/patch-1
Fixed Formatting.
2015-05-15 18:09:44 -07:00
wali-s aeb45360ed Get HTML5 minlength working.
Adding minLength=X to an input element would not work, whereas maxLength=X would work.

This change gets minLength=X working.
2015-05-15 15:47:15 -07:00
Ben Alpert 7112a35037 Merge pull request #3847 from bloodyowl/option-flatten-children
<option> added children flatten, & warn if invalid
2015-05-14 10:36:27 -07:00
Ben Alpert 69fc206f96 Merge pull request #3719 from spicyj/vdn2
Add more context to DOM nesting warning
2015-05-14 10:33:21 -07:00
Ben Alpert 5c7b4a043f Merge pull request #3651 from spicyj/tac-noi
Don't thread index through traverseAllChildren
2015-05-14 10:32:49 -07:00
Matthias Le Brun 4a012b0741 <option> added children flatten, & warn if invalid 2015-05-14 12:44:04 +02:00
Morhaus 12a43d4eee Better warnings for nested propTypes
`arrayOf`, `shape` and `objectOf` warnings now display the full path of
the invalid key.
2015-05-14 11:33:07 +02:00
Ben Alpert 05b98ac70c Merge pull request #3872 from spicyj/nested-num
Split message for deep numeric key warning too
2015-05-13 15:32:13 -07:00
Ben Alpert 0a3aa8493a Split message for deep numeric key warning too 2015-05-13 15:23:29 -07:00
Ben Alpert 51843ec710 Merge pull request #3870 from spicyj/gh-3865
Clarify ReactElement prop validation message
2015-05-13 15:14:00 -07:00
Ben Alpert bed4de3eca Clarify ReactElement prop validation message
Fixes #3865.
2015-05-13 12:37:54 -07:00
Ben Alpert 64c9d9d762 Split out warning message for nested key warning
Also make sure to mark child array as validated in cloneElement as well.
2015-05-12 16:33:04 -07:00
Ben Alpert f0bdadf85b Merge pull request #3857 from spicyj/dev-rckv
Set _reactChildKeysValidated in dev mode only
2015-05-11 17:06:18 -07:00
Ben Alpert 0c58f4f6b1 Set _reactChildKeysValidated in dev mode only 2015-05-11 17:02:49 -07:00
Paul O’Shannessy 1549bae2ab Merge pull request #3834 from chicoxyzzy/remove_jslint
remove jslint comments
2015-05-10 22:52:57 -07:00
Paul O’Shannessy 7839e07231 0.14.0-alpha1 2015-05-10 22:36:50 -07:00
Ben Alpert 4ba67670f9 Merge pull request #3841 from spicyj/yolo
Preserve prototype with replaceState
2015-05-08 13:16:43 -07:00
Ben Alpert d7de12fbd8 Preserve prototype with replaceState
Fixes #3418.
2015-05-08 13:11:18 -07:00
Paul O’Shannessy e135a4dbc3 Follow-up to follow-up to #3718
Cleaned up a few more ununsed things.
2015-05-07 17:29:31 -07:00
Paul O’Shannessy 5da94d6eb0 Followup to #3758 so we actually test things 2015-05-07 17:10:51 -07:00
chico 553dd90528 remove jslint comments 2015-05-08 03:05:51 +03:00
Eric Eastwood 60e1f5a103 Add support for unitless tabSize/tab-size 2015-05-07 13:51:15 -05:00
Paul O’Shannessy 72ad0c11c3 Merge pull request #3829 from murashki/ReactMultiChildText-test.js-__html-typo
ReactMultiChildText-test.js fix __html typo
2015-05-07 10:34:08 -07:00
David Goldberg 759a393ce5 Formatting of line 19 ReactNativeComponent.js
Corrected formatting error on line 19 of ReactNativeComponent.js by adding a period in order to be consistent with the other comments in the file.
2015-05-07 10:09:00 -07:00
Yakov Dalinchuk 9b798400fd ReactMultiChildText-test.js fix __html typo 2015-05-07 16:06:11 +03:00
Ben Alpert 5f32953ac7 Follow-ups for #3718
- Rename NamespaceProperties to DOMAttributeNamespaces
- Make tests pass in jest
- Remove unnecessary xmlns attributes
2015-05-05 16:46:49 -07:00
Federico Rampazzo a88b655ccd Added support for namespace attributes 2015-05-05 16:15:25 -07:00
Tomasz Kołodziejski 5ef0b416df IsMounted should always return a boolean.
Fixes #3814. isMounted used to return undefined if internalInstance
was undefined after component was unmounted.
2015-05-05 11:43:09 +02:00
Ben Alpert a110c76558 Merge pull request #3801 from spicyj/babel
Use Babel to build React
2015-05-04 16:14:00 -07:00
Ben Alpert 93a782b40b Use Babel to build React
Size comparison:

```
   raw     gz Compared to master @ 6ed98ec0c8
     =      = build/JSXTransformer.js
-15736  -3247 build/react-with-addons.js
  +287     +7 build/react-with-addons.min.js
-14412  -2887 build/react.js
  +274    +15 build/react.min.js
```

Differences mostly look to be various bits of whitespace that Babel ends up removing during its transforms (https://gist.github.com/spicyj/21ef31f4d95fb7a58daf). In minified files, mostly additions of `"use strict";`.
2015-05-04 14:14:09 -07:00
Ben Alpert e06d3e0ab9 Better warning messages for deprecated methods 2015-05-01 13:32:31 -07:00
Ben Alpert 36f3a2aaff Batch updates within top-level unmount
Analogous change to #2935.
2015-04-30 15:05:44 -07:00
James Burnett d42bf671d2 check that React renders the menuitem closing tag 2015-04-29 17:32:56 -04:00