Commit Graph

7283 Commits

Author SHA1 Message Date
Brian Vaughn 4e19d810df Updated package.json for react-addons-create-fragment 2017-03-31 10:53:04 -07:00
Brian Vaughn f803f77561 Added devDeps for react-addons-create-fragment to make testing easier 2017-03-31 10:46:46 -07:00
Brian Vaughn 2804fa9dfe Make sure all package.json have valid "files" array, including UMD build 2017-03-31 10:40:57 -07:00
Brian Vaughn 67a8db3650 Removed 'peerDependencies' block from package.json for add-ons we think will continue to work for the forseeable future 2017-03-30 08:37:42 -07:00
Nathan Hunzaker fe4a5b4004 Fix Chrome number input backspace and invalid input issue (#7359)
* Only re-assign defaultValue if it is different

* Do not set value if it is the same

* Properly cover defaultValue

* Use coercion to be smart about value assignment

* Add explanation of loose type checks in value assignment.

* Add test coverage for setAttribute update.

* Only apply loose value check to text inputs

* Fix case where empty switches to zero

* Handle zero case in controlled input

* Correct mistake with default value assignment after rebase

* Do not assign bad input to number input

* Only trigger number input value attribute updates on blur

* Remove reference to LinkedValueUtils

* Record new fiber tests

* Add tests for blurred number input behavior

* Replace onBlur wrapper with rule in ChangeEventPlugin

* Sift down to only number inputs

* Re-record fiber tests

* Add test case for updating attribute on uncontrolled inputs. Make related correction

* Handle uncontrolled inputs, integrate fiber

* Reorder boolean to mitigate DOM checks

* Only assign value if it is different

* Add number input browser test fixtures

During the course of the number input fix, we uncovered many edge
cases. This commit adds browser test fixtures for each of those instances.

* Address edge case preventing number precision lower than 1 place

0.0 coerces to 0, however they are not the same value when doing
string comparision. This prevented controlled number inputs from
inputing the characters `0.00`.

Also adds test cases.

* Accommodate lack of IE9 number input support

IE9 does not support number inputs. Number inputs in IE9 fallback to
traditional text inputs. This means that accessing `input.value` will
report the raw text, rather than parsing a numeric value.

This commit makes the ReactDOMInput wrapper check to see if the `type`
prop has been configured to `"number"`. In those cases, it will
perform a comparison based upon `parseFloat` instead of the raw input
value.

* Remove footnotes about IE exponent issues

With the recent IE9 fix, IE properly inserts `e` when it produces an
invalid number.

* Address exception in IE9/10 ChangeEventPlugin blur event

On blur, inputs have their values assigned. This is so that number
inputs do not conduct unexpected behavior in
Chrome/Safari. Unfortunately, there are cases where the target
instance might be undefined in IE9/10, raising an exception.

* Migrate over ReactDOMInput.js number input fixes to Fiber

Also re-record tests

* Update number fixtures to use latest components

* Add number input test case for dashes and negative numbers

* Replace trailing dash test case with replace with dash

Also run prettier
2017-03-28 11:35:23 -07:00
Jirat Ki ef38390666 Add component stack to invalid element type warning (#8495)
* Show Source Error Addemden if __source available

* Add Parent Stack on invalid element type

* refactor to use normalizeCodeLocInfo

* Remove ( ) from addendum
2017-03-28 11:16:04 -07:00
Gaëtan Renaudeau 17434d7263 Fix test renderer unmount (#8512)
* [react-test-renderer] unmount the inner instances

Fixes https://github.com/facebook/react/issues/8459

* add a test for https://github.com/facebook/react/issues/8459

* add new test in tests-passing.txt
2017-03-28 11:05:25 -07:00
Maksim Shastsel ac53db35e7 Delete @nosideeffect annotation (#8882) 2017-03-28 11:02:38 -07:00
António Nuno Monteiro 9d21b524ff Change the order between function declaration and object assignment (#8895)
This fixes #8894
2017-03-28 11:02:11 -07:00
Jon Bretman e33eab40a6 Bump fbjs to 0.8.9 (#8910) 2017-03-28 11:00:38 -07:00
Brian Vaughn a27e5d374a Merge branch '15.5-dev' of github.com:facebook/react into 15.5-dev 2017-03-27 22:58:12 -07:00
Brian Vaughn 096fe67010 Added react-addons-css-transition-group and react-addons-transition-group 2017-03-27 22:57:36 -07:00
Brian Vaughn fe451dd59d Renamed LICENSE.txt => LICENSE 2017-03-27 22:57:22 -07:00
Andrew Clark be63a4fa01 Merge branch '15.5-dev' of https://github.com/facebook/react into 15.5-dev 2017-03-27 16:23:49 -07:00
Andrew Clark 322076a8c2 Future-proof react-create-class
- Backport change to enqueueReplaceState. Use new API instead of
enqueueCallback, which is gone in 16.
- Implement isMounted using lifecycles, so we have the option of
removing this later.
2017-03-27 16:23:45 -07:00
Brian Vaughn d56011ad61 Added react-linked-input package 2017-03-27 14:23:22 -07:00
Brian Vaughn b922d0b808 Added react-addons-update addon 2017-03-27 13:26:47 -07:00
Brian Vaughn 76bf3137e0 Added react-addons-linked-state-mixin with UMD builds and tests 2017-03-27 13:04:10 -07:00
Brian Vaughn 21366a9fe4 Bumped addon versions to alpha0 2017-03-24 15:28:34 -07:00
Andrew Clark 52f880f405 react-addons-pure-render-mixin@15.5.0-alpha.0 2017-03-24 15:17:40 -07:00
Andrew Clark e535d58feb Fix imports in CJS entry 2017-03-24 15:16:49 -07:00
Brian Vaughn 83dc547327 Merge branch '15.5-dev' of github.com:facebook/react into 15.5-dev 2017-03-24 14:18:18 -07:00
Brian Vaughn 5117dc2766 Updated shallowCompare add-on package to not reference internals 2017-03-24 14:17:52 -07:00
Andrew Clark d9a4fa4f51 Replace createClass with external react-create-class dependency
Warns when using React.createClass for the first time.

Usages of createClass in tests have been converted to plain JavaScript
classes. Tests that rely on replaceState or isMounted use
updater.enqueueReplaceState and updater.isMounted.
2017-03-21 14:57:50 -07:00
Andrew Clark 60a795575f Create react-create-class package
Extract createClass into a separate package so we can deprecate it in
version 16.
2017-03-21 14:28:09 -07:00
Andrew Clark 8a06cd7a78 Fix version number and remove peerDependencies 2017-03-17 17:28:01 -07:00
Brian Vaughn c6118eb209 Added react-addons-create-fragment package 2017-03-17 16:51:36 -07:00
William Cunningham 50afe2ef5a Move getNextDebugID() to React package.
The module, and its internal state, was duplicated in several packages,
leading to duplicate ids when multiple renderers were used.
2017-03-17 15:35:20 -07:00
Adam 91b1cde5d6 Remove ref usage in main markdown example (#9160)
from [elsewhere in the docs](https://facebook.github.io/react/docs/refs-and-the-dom.html):

> Avoid using refs for anything that can be done declaratively.
(cherry picked from commit bf5abdf14f)
2017-03-12 15:45:59 +00:00
Dan Abramov baddb6bf42 Remove PR check from GH Pages build hook for stable branch (#9144) 2017-03-10 01:19:33 +00:00
Dan Abramov 39ff5c4895 Reorder sections in alphabetical order (#9143)
* Reorder sections in alphabetical order

* Reorder here too

(cherry picked from commit 7fa311bcd9)
2017-03-09 20:47:20 +00:00
Dima Beznos c1ba5b2ddc Added Brunch build tool to the docs (#9074)
* Added Brunch build tool to the docs

* Improved grammar

* product build -> production build

(cherry picked from commit 0bedd0697a)
2017-03-09 20:44:06 +00:00
Sunny Ripert b2aa4d143f Fix spacing in documentation (#9070)
Replace non-breaking space by space.
(cherry picked from commit 179240ca30)
2017-03-09 20:44:06 +00:00
Vesa Laakso 0777ef9c2f Update Lifting State Up not to mix up DOM value with component state (#9032)
* Update Lifting State Up not to mix up DOM value with component state

A few weeks ago when teaching my friend, she got stuck on
`this.state.value` vs. `event.target.value`. As the documentation
talked a lot about "values", and the term value could mean three
different things (values in general, the "value" prop / DOM value of
the <input> component and the value in state/props), it was not weird
that she got a bit confused.

* Rename Lifting State Up onChange props to onTemperatureChange

This is in-line with how the temperature is provided as a prop named `temperature`

* Fix one value prop not being renamed to temperature

* Update codepen examples in Lifting state up documentation

* Update devtools state change to reflect docs change

(cherry picked from commit a190cfce29)
2017-03-09 20:44:06 +00:00
Bryan Braun 64ab3a383e Replace the header_links plugin with client-side generated anchors. (#4165)
* Replace the header_links plugin with client-side generated anchors.

Fixes facebook/react#4124

* Move anchor-link code into a separate script

Also adds a couple comments, for context.

(cherry picked from commit 7a878d27e3)
2017-03-09 20:44:06 +00:00
Fokke Zandbergen c7d14df920 Square renders button, not div (#9084)
(cherry picked from commit 8eb7068364)
2017-03-09 20:44:06 +00:00
Bernard Lin 1edc84a38c Updated Chain React (#9067)
Changed conference date from "Summer 2017" to given date on website
(cherry picked from commit fe46def5e2)
2017-03-09 20:44:05 +00:00
Dai Nguyen c04ced9c7e Update tutorial.md (#9051)
(cherry picked from commit d724aed404)
2017-03-09 20:44:05 +00:00
Stephie d6842d3140 Fixed typo: "Calcutor" to "Calculator" (#9047)
(cherry picked from commit 5cc2a4fe3e)
2017-03-09 20:44:05 +00:00
Dan Abramov c53314a3da Add more details to the doc 2017-02-19 12:08:18 +00:00
Dan Abramov 8cfc95f2d3 Doc consistency tweaks 2017-02-19 11:59:01 +00:00
Roman Matusevich 67420d1d08 Remove extra article from documentation (#9028)
(cherry picked from commit d28264e689)
2017-02-19 11:12:08 +00:00
DanZeuss 6256f3e8b0 Improved for a better understanding (#8970)
* Improved for a better understanding

that code shouldn't name this parameter onchange. It is so confusing for a starter of ReactJs like me. It looks like that the onChange is an common event from props.

* Update the lifting state up paragraph

I tried to write something to explain to starter programmers in react, how we lift the state up calling a method defined by the ancestor and called by the children that will affect the children element.

* Rewrite Lifting State Up

(cherry picked from commit fc362bf095)
2017-02-19 11:12:08 +00:00
Dan Abramov 1d786cd992 Revert "update react perf docs (#8060) and (#6174)" (#8997) 2017-02-13 23:45:32 +00:00
Dan Abramov 1d4b165476 Update Thinking in React embed to match the link (#8996)
(cherry picked from commit 2464cd2d53)
2017-02-13 23:30:52 +00:00
Jiminikiz b3fd863141 Fixing grammatical error ... (#8987)
... in the Create React App section.
(cherry picked from commit 7958c1d77d)
2017-02-13 23:30:52 +00:00
Prayag Verma 34b6e1f80c Fix a typo in design principles doc (#8985)
unambigious → unambiguous
(cherry picked from commit c60f852cdb)
2017-02-13 23:30:52 +00:00
Moacir Rosa 9e5ad597cb Only fix a small wrong key in example (#8976)
Only fix a small wrong key in example
(cherry picked from commit de673bca8d)
2017-02-13 23:30:52 +00:00
Dhyey Thakore b53a582daa update react perf docs (#8060) and (#6174) (#8236)
* update react perf docs issue 8060 and 6174

* Grammar

Small stuff

(cherry picked from commit 994a0c8b0c)
2017-02-13 23:30:52 +00:00
Andrew Clark 2a644ae7ae Merge pull request #8927 from mitenka/patch-5
Update higher-order-components.md
(cherry picked from commit b49611e643)
2017-02-13 23:30:51 +00:00