Commit Graph
1811 Commits
Author SHA1 Message Date
Jeff Morrison 64afa545dd Merge pull request #1094 from jeffmo/jsx_whitespace_codemod_fixup
Pull in syranides jsx whitespace codemod transform fixes
2014-02-15 11:51:54 -08:00
JeffMo f66f8f0310 Pull in syranides jsx whitespace codemod transform fixes 2014-02-15 11:20:32 -08:00
Jason Bonta 9ba014fbf1 Merge pull request #1081 from spicyj/textcontent
Avoid innerText for better newline behavior
2014-02-15 02:22:54 -06:00
Cheng LouandPaul O’Shannessy d71736b3ed include mixin keys whose values are falsy
the previous behavior is to skip mixin keys whose values are `undefined`, `null`, `''` and (this is a bug) 0. Now, every key is included.
2014-02-14 16:53:34 -08:00
Pete Hunt 529c971db3 Merge pull request #1088 from petehunt/fixtests
Fix CSSTransitionGroup tests
2014-02-14 13:10:38 -08:00
petehunt b65f5a4d30 fix tests 2014-02-14 12:55:03 -08:00
Cheng LouandPaul O’Shannessy 123ed1f442 Fix IE8 bug during unitless CSS props creation
IE8 goes into an infinite loop if we add props to the obj we're iterating through.
2014-02-14 12:41:44 -08:00
Ben Alpert 31bc18d39e Add simple docs on statics to reference section
Fixes #1056.
2014-02-14 11:54:58 -08:00
Cheng Lou f4798ebee1 [Docs] Add Object.keys to list of shims 2014-02-14 09:52:04 -08:00
Ben Alpert 67c5d76321 Add missing commas in propTypes docs 2014-02-13 23:19:41 -08:00
Pete Hunt a8af11b46d Merge pull request #1086 from spicyj/new-proptypes
Add docs for new prop types
2014-02-13 23:03:42 -08:00
Ben Alpert 30646c9c1e Add docs for new prop types 2014-02-13 22:59:48 -08:00
Ben Alpert 8c3ac3203d Merge pull request #940 from chenglou/tips-val
[docs] Document newly added unitless css props in tips
2014-02-13 22:40:51 -08:00
Cheng Lou 559933655a [Docs] Document newly added unitless css props in tips 2014-02-13 22:39:30 -08:00
Ben Alpert 0a9eaab61f [docs] Add properties that were in 0.8 too
This time I actually generated it from the DefaultDOMPropertyConfig file.
2014-02-13 22:02:06 -08:00
Paul O’Shannessy cebc49e5e6 Merge pull request #1022 from spicyj/multichild-throw
Refactor ReactMultiChild to not throw errors too
2014-02-13 21:51:52 -08:00
Ben Alpert f8349f9614 Add formNoValidate and noValidate too 2014-02-13 21:50:17 -08:00
Ben Alpert 80cbdea144 [docs] Update supported attributes list
Fixes #1008.
2014-02-13 21:47:49 -08:00
Ben Alpert 1991e46f1a [docs] Capitalize all nav titles for consistency 2014-02-13 21:41:09 -08:00
Ben Alpert b98f1adf1a Avoid innerText for better newline behavior
Fixes #1080.
2014-02-13 21:31:32 -08:00
Paul O’Shannessy 05ee61d763 Merge pull request #1084 from spicyj/jsx-wh
Various fixes to whitespace transformer
2014-02-13 21:10:49 -08:00
Ben Alpert cc010e3287 Support transforming multiple files at once 2014-02-13 19:15:59 -08:00
Ben Alpert 49ddf905b1 Use graceful-fs to avoid EMFILE errors 2014-02-13 19:15:59 -08:00
Ben Alpert ecfd0c1473 Run over *.jsx as well 2014-02-13 19:15:59 -08:00
Ben Alpert 4a76b52751 Resolve paths relative to pwd, not npm install dir 2014-02-13 19:15:59 -08:00
Ben Alpert 940c86964d Rename run to run.js to avoid not-found errors 2014-02-13 19:15:39 -08:00
Ben Alpert ac1c90e864 Tweak whitespace README to show other change 2014-02-13 19:01:04 -08:00
Jason BontaandPaul O’Shannessy 47645854f9 un-revert textContent, support multi-line strings in modern browsers
reverts 23ab30ff87 because the issue it fixed doesn't seem to be a problem
anymore. textContent should be better for more things anyway, as the
original 309a88bcf6 indicates. It should be faster because innerText
requires layout.

This also allows us to use strings with newlines in our rendered output
and have confidence that they will render the same on subsequent
re-renders. This is especially useful for es6-style backtick multi-line
strings. This will be more consistent as textContent is supported almost
everwhere so we won't have differing behavior between webkit and
firefox.

see https://github.com/facebook/react/issues/1080
2014-02-13 18:21:35 -08:00
Josh DuckandPaul O’Shannessy acbba1ae67 Updates to perf
ReactDefaultPerf:

* Show times as float instead of string. This means they're sortable.
* Add count columns to all types and average to exclusive time.
* Include mountComponent where updateComponent time is measured.
* Increment count on _renderValidatedComponent instead of update.

ReactDefaultPerfAnalysis:

* Return counts with all summaries.
2014-02-13 18:21:17 -08:00
Cheng LouandPaul O’Shannessy 5c953a7bdd Remove aural CSS numerial styles from CSSProperties
Those styles are not implemented in known browsers.
2014-02-13 18:21:03 -08:00
Paul O’Shannessy d1a337b9db Move jsx_whitespace_transform
Also add readme and more details to package.json so it can be published.
2014-02-13 15:58:19 -08:00
Paul O’Shannessy 1012b2ff4b Merge pull request #979 from jeffmo/jsx_whitespace_codemod_tool
jsx whitespace codemod utility
2014-02-13 15:03:11 -08:00
Pete Hunt 6573a726ba Merge pull request #1075 from spicyj/defperf
Measure root component render in ReactDefaultPerf
2014-02-13 10:49:19 -08:00
Pete Hunt a5c518f69a Merge pull request #855 from syranide/onerror
Add onError to ReactDOMImg to complement onLoad
2014-02-13 10:48:57 -08:00
Pete Hunt f02c3c07d3 Merge pull request #1067 from spicyj/sandbox-seamless
Add seamless and sandbox properties for iframe
2014-02-13 10:48:37 -08:00
Pete Hunt b04df6335a Merge pull request #1069 from spicyj/gh-1028
Assert that event listeners are real functions
2014-02-13 10:48:20 -08:00
Pete Hunt fff48c5921 Merge pull request #1076 from spicyj/button-warn
Don't warn about onChange for button inputs
2014-02-13 10:48:07 -08:00
Andreas Svensson cda1d8c779 Add onError to ReactDOMImg to complement onLoad 2014-02-13 10:43:03 +01:00
Ben Alpert 6f305505a7 Remove old whitespace doc warning
This was fixed by #480.
2014-02-13 01:37:06 -08:00
Ben Alpert cd87848b7d Don't warn about onChange for button inputs 2014-02-13 01:16:37 -08:00
Ben Alpert 55be7a71c5 Measure root component render in ReactDefaultPerf
Fixes #1074.
2014-02-13 00:59:02 -08:00
Ben Alpert f37474b75b Merge pull request #1034 from nadeeshacabral/patch-1
Fixed sample code fence highlight
2014-02-12 23:23:49 -08:00
Ben Alpert b0757c5182 Assert that event listeners are real functions
Fixes #1028.
2014-02-12 23:21:46 -08:00
Ben Alpert d0502cf3c1 Add seamless and sandbox properties for iframe
Fixes #1057.
2014-02-12 21:06:43 -08:00
Pete HuntandPaul O’Shannessy 3895353326 [perf] Refactor ReactDefaultPerf and add DOM operation tracing
Split the summary functions into a separate module, and add the ability to view a lot of all DOM operations. Removed DOM timing since it was incorrect. Will potentially replace with a
dropped frame counter in the future.
2014-02-12 16:35:24 -08:00
Jason BontaandPaul O’Shannessy 5abcce5343 add lineClamp, vendor prefixes to CSSProperty.isUnitlessNumber 2014-02-12 16:35:09 -08:00
Pete HuntandPaul O’Shannessy 75b58d2ad2 [perf] Wasted time metrics
This logs DOM ops for a given reconcile. Based on which components rendered and which ones *actually* caused DOM updates we can find
opportunities to add shouldComponentUpdate() methods.
2014-02-12 16:34:37 -08:00
Pete HuntandPaul O’Shannessy 94ef6c51fb [perf] Better inclusive measurements
Inclusive time is still not that helpful w/o looking at what actually resulted in DOM ops. However, this is better than what we have today and will serve as a building block.

I blacklisted everything but composite components -- hopefully that's OK.
2014-02-12 16:34:24 -08:00
Pete HuntandPaul O’Shannessy 439bca78ed [perf] New ReactDefaultPerf
Simplified version of https://github.com/facebook/react/pull/962. More goodies coming soon since the inclusive time isn't very helpful right now.
2014-02-12 12:30:02 -08:00
Pete HuntandPaul O’Shannessy 9ac27cb551 Rewrite ReactTransitionGroup
The key idea here is that you're always rendering `this.state.children`, not
`this.props.children`. When combined with `cloneWithProps()` this means we can
keep them in the DOM as long as we want. We add new children and reactively
update existing ones using `setState()` inside of `componentWillReceiveProps()`
so `this.state.children` always has the latest versions of components. Since we
may be keeping old components around that are no longer in
`this.props.children` we need a way to figure out where they should be inside
of the combined `this.state.children` list.  `ReactTransitionChildMapping` does
this for us.

Based on that infrastructure we can build the interface we always wanted: enter
and leave lifecycle hooks.

When a component is added to the DOM, `componentWillEnter(callback)` gets
called. Call the callback when you're done animating and `componentDidEnter()`
will be called.

When a component is about to be removed from the DOM,
`componentWillLeave(callback)` gets called. Call the callback when you're done
animating and `componentDidLeave()` will be called and the component will
*actually* be removed from the DOM. It won't be removed until you call the
callback.

These also handle "concurrent" changes. If you "stack" enter/leaves of a single
component before the animation has completed, it will block out all of those
animations until the current animation completes, and then finally it will
animate 0 or 1 times to get itself into the desired current state. This is what
differentiates `componentWillEnter()` from `componentDidMount()`.

The next step would be to build `componentDidReorder()`.

I've built `ReactCSSTransitionGroup` which is identical to the old
`ReactTransitionGroup` and codemodded the callsites.
2014-02-12 12:29:58 -08:00