Commit Graph
1763 Commits
Author SHA1 Message Date
Sebastian Markbage 96cb5cc888 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 bb4da17469 Merge pull request #3746 from chrisgrovers/patch-1
Fixed Formatting.
2015-05-15 18:09:44 -07:00
wali-s 653593591c 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 82a36ad1bb 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 242773b40e Merge pull request #3719 from spicyj/vdn2
Add more context to DOM nesting warning
2015-05-14 10:33:21 -07:00
Ben Alpert bc06a1bf07 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 a13b019c2b <option> added children flatten, & warn if invalid 2015-05-14 12:44:04 +02:00
Ben Alpert 91963a978d 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 9fe8d5da85 Split message for deep numeric key warning too 2015-05-13 15:23:29 -07:00
Ben Alpert 354699c1b2 Merge pull request #3870 from spicyj/gh-3865
Clarify ReactElement prop validation message
2015-05-13 15:14:00 -07:00
Ben Alpert 7b7d235999 Clarify ReactElement prop validation message
Fixes #3865.
2015-05-13 12:37:54 -07:00
Ben Alpert dca88fe5b2 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 acc6752087 Merge pull request #3857 from spicyj/dev-rckv
Set _reactChildKeysValidated in dev mode only
2015-05-11 17:06:18 -07:00
Ben Alpert 8330ef7aa4 Set _reactChildKeysValidated in dev mode only 2015-05-11 17:02:49 -07:00
Paul O’Shannessy 384631b8b8 Merge pull request #3834 from chicoxyzzy/remove_jslint
remove jslint comments
2015-05-10 22:52:57 -07:00
Paul O’Shannessy 3e4dabba45 0.14.0-alpha1 2015-05-10 22:36:50 -07:00
Ben Alpert b31ffde14b Merge pull request #3841 from spicyj/yolo
Preserve prototype with replaceState
2015-05-08 13:16:43 -07:00
Ben Alpert 0732263818 Preserve prototype with replaceState
Fixes #3418.
2015-05-08 13:11:18 -07:00
Paul O’Shannessy ef451eb6b4 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 1896bb5b92 Followup to #3758 so we actually test things 2015-05-07 17:10:51 -07:00
chico cf19e5d045 remove jslint comments 2015-05-08 03:05:51 +03:00
Eric Eastwood 2c91882e1f Add support for unitless tabSize/tab-size 2015-05-07 13:51:15 -05:00
Paul O’Shannessy daa2296a01 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 2f8712d218 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 181f4b08d4 ReactMultiChildText-test.js fix __html typo 2015-05-07 16:06:11 +03:00
Ben Alpert bf41ace7f5 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 RampazzoandBen Alpert 0afe8f9ea3 Added support for namespace attributes 2015-05-05 16:15:25 -07:00
Tomasz Kołodziejski cb42b13348 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 ce2540c26f Merge pull request #3801 from spicyj/babel
Use Babel to build React
2015-05-04 16:14:00 -07:00
Ben Alpert b0af0cdf94 Use Babel to build React
Size comparison:

```
   raw     gz Compared to master @ 86fc53d834
     =      = 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 c9003c0f00 Better warning messages for deprecated methods 2015-05-01 13:32:31 -07:00
Ben Alpert 7bdafb324c Batch updates within top-level unmount
Analogous change to #2935.
2015-04-30 15:05:44 -07:00
James Burnett 109635cf8d check that React renders the menuitem closing tag 2015-04-29 17:32:56 -04:00
Ben Alpert b354116ce0 Add more context to DOM nesting warning
Better version of #3578.
2015-04-29 14:20:23 -07:00
Ben Alpert ddc1ad9cce Fix infinite recursion in browsers with iterators
My old code here didn't work properly -- for a string child, getIteratorFn would return an iterator that gave each character as its own string, and we'd attempt to loop over that too.

Tests now work in Chrome again.
2015-04-29 00:21:00 -07:00
Jim 9b55993a09 Merge pull request #3740 from jsfb/element-is-parent-of-render-result-test
Added unit test to verify that context treats the component doing a render() as the parent.
2015-04-27 16:11:39 -07:00
Ben Alpert 5ced0edd6a Add forgotten clipPath wrapper in getMarkupWrap 2015-04-27 15:39:39 -07:00
codesukiandBen Alpert 8ae8470a80 Added support for SVG clipPath element and clip-path attribute 2015-04-27 15:37:23 -07:00
Jim a58d308e82 Added unit test to verify that context treats the component doing a render() as the parent. 2015-04-27 14:56:25 -07:00
Ben Alpert 00c56a262c Merge pull request #3758 from spicyj/keys-keys-keys
Add key warning to nested collections
2015-04-27 14:51:30 -07:00
Ben Alpert ba42f5eebe Add key warning to nested collections
Also when reusing elements in multiple contexts -- before we were mutating each element to indicate its validity; now we mutate the array containing it (which we create, in the case of rest-arg children).

Fixes #2496. Fixes #3348.
2015-04-27 14:41:25 -07:00
Ben Alpert f069b77b09 Merge pull request #3757 from spicyj/es6
Add missing super() calls
2015-04-27 14:31:03 -07:00
Ben Alpert f09da87dc1 Add missing super() calls
Babel complains without these because it's invalid ES6.
2015-04-27 13:41:10 -07:00
Victor Koenders 439e557199 src/core/ReactChildReconciler.js::unmountChildren was missing an Object.hasOwnProperty check 2015-04-26 13:54:16 +02:00
Chris Grovers 687fc781ed Fixed Formatting. 2015-04-25 15:06:59 -07:00
Cheng Lou aa4dbf0ca5 Tweak style mutation warning, remove test comment 2015-04-24 15:04:05 -04:00
Cheng Lou af2f49ef1d Merge pull request #2027 from chenglou/warn-style-mutation
Set up `style` mutation monitoring
2015-04-24 14:51:33 -04:00
Ben Alpert 3acb1006a3 Merge pull request #3727 from spicyj/dsih
Relax dangerouslySetInnerHTML validation
2015-04-22 17:37:40 -07:00
Ben Alpert 51e4e27868 Relax dangerouslySetInnerHTML validation
Fixes #3460.
2015-04-22 16:59:50 -07:00
Jim 207f453127 Merge pull request #3640 from jsfb/render-subtree-pass-context
Provide top level method for rendering subtree (passes context)
2015-04-22 14:29:06 -07:00