Commit Graph
8402 Commits
Author SHA1 Message Date
Andrey MarchenkoandDan Abramov d9915db43b Deleting a specific style name float for ie8 (#9311)
* Deleting a specific style name float for ie8

* Remove unnecessary condition
2017-03-31 23:31:52 +01:00
Ben Alpert 6fd539ec66 Fix build
oops i broke it
2017-03-31 16:20:28 +01:00
Ben AlpertandGitHub e9c995974d Port out bug fixes to ReactARTFiber (#9309)
D4616127 D4629747 D4631778
2017-03-31 16:13:01 +01:00
Nathan HunzakerandDan Abramov 27c844905f Remove scroll capture support warning (#9303)
I removed the scroll capture feature check for IE8, however I missed
the associated warning.
2017-03-31 11:36:08 +01:00
Nathan HunzakerandDan Abramov bd2802523c Remove viewport metrics, other pageX/pageY behaviors (#9290)
* Remove viewport metrics

event.pageX and event.pageY are in every browser React supports.

* Rerecord tests
2017-03-31 02:20:57 +01:00
Andrey MarchenkoandBrandon Dail 5ad1c76386 Deleted a specific code for ie8 - document.selection (#9298) 2017-03-30 19:00:12 -05:00
Brian VaughnandGitHub 76c5c6deb5 Disabling a no-unreachable lint error (#9300) 2017-03-30 16:40:45 -07:00
Brian VaughnandGitHub 4f69474e03 Added explicit null return to completeUnitOfWork() to resolve Flow error (#9299) 2017-03-30 15:45:13 -07:00
Brian VaughnandGitHub 224487a0e2 Show more meanignful stack trace for ReactNative errors (#9291)
* Show more meanignful stack trace for ReactNative errors

Clicking on the stack should jump to where the error actually occurred rather than to where it's logged in a redbox component.

* Made showDialog() return type stricter. Added mock and Flow types for ExceptionManager

* Prettier

* Handle null/string thrown errors

* Removed unused reference to emptyFunction
2017-03-30 15:15:33 -07:00
Nathan HunzakerandSebastian Markbåge b8857d4f27 Remove captured focus feature check (#9285)
IE8 was the only browser that did not support captured focus. We no
longer have that constraint.
2017-03-30 13:47:14 -07:00
Brian VaughnandGitHub 004c937cb0 Move takeSnapshot from UIManager to ReactNative renderer(s) (#9292)
* Move takeSnapshot from UIManager to ReactNative renderer(s)

* Prettier
2017-03-30 13:10:15 -07:00
Brandon DailandGitHub 8d6d3e8c05 Update JSFiddle for issue template (#9289) 2017-03-30 11:43:16 -05:00
Brandon DailandDan Abramov 686010037d Remove IE8-specific setInnerHTML behavior (#9288)
Since IE8 is not supported anymore, lets save those bytes!
2017-03-30 17:24:58 +01:00
Nathan HunzakerandBrandon Dail dbeb37fe69 Add DOM fixture for unmasking passwords (#9269)
IE11 and Edge have a password unmask field that React prevents the
display of for controlled inputs. This commit adds DOM fixture
coverage for this test case.
2017-03-30 10:16:36 -05:00
Damian NicholsonandDan Abramov 0c70fb8b18 Added semicolons to addons imports examples. (#9287) 2017-03-30 15:55:27 +01:00
Ben AlpertandGitHub e57ad7f51e Allow returning null as host context (#9278)
If your renderer doesn't use host context, you might prefer to return null. This used to give an error:

> Invariant Violation: Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.

I use a sentinel value instead now.

The code in ReactFiberHostContext is a little complicated now. We could probably also just remove the invariants.
2017-03-30 13:18:39 +01:00
Nathan HunzakerandDan Abramov 4c292facc9 Remove captured scroll feature check (#9283)
* Remove captured scroll feature check

IE8 was the only browser that did not support captured scroll. We no
longer have that constraint.

* Remove WINDOW_HANDLE const
2017-03-30 11:01:29 +01:00
Brandon DailandGitHub 9a93be0b33 Remove IE8-specific ChangeEventPlugin logic (#9281) 2017-03-29 17:37:56 -05:00
Brandon DailandGitHub da91e9ebe9 Add DOM fixtures for disabled button click events (#9271) 2017-03-29 11:17:54 -05:00
Dominic GannawayandGitHub 09f0a5ded9 Merge pull request #9276 from trueadm/getDeclarationErrorAddendum_DEV
[Fiber] Adds DEV condition around getDeclarationErrorAddendum
2017-03-29 13:55:04 +01:00
Dominic Gannaway 660306982c added DEV condition around getDeclarationErrorAddendum contents 2017-03-29 13:49:30 +01:00
Sasha AickinandBen Alpert aaabd655a6 Added jest-cli to the package.json for the Fiber record-tests script. (#9270) 2017-03-28 22:55:22 +01:00
Brian VaughnandGitHub a749f4fb63 Adding fix to EventPropagators that was accidentally omitted from PR #9219 (#9274) 2017-03-28 11:24:13 -07:00
Brian VaughnandGitHub fca5d3ffc5 Added missing @flow annotation to ReactNativeFeatureFlags file (#9267) 2017-03-27 14:59:37 -07:00
Andrew Clark 090efbdb17 Merge branch 'giamir-add_toggle_to_fiber_triangle_demo' 2017-03-27 12:48:39 -07:00
Andrew Clark f6a64cad5d Use radio buttons for toggle 2017-03-27 12:48:05 -07:00
Andrew Clark ef9dac518f Merge branch 'add_toggle_to_fiber_triangle_demo' of https://github.com/giamir/react into giamir-add_toggle_to_fiber_triangle_demo 2017-03-27 11:46:59 -07:00
Nathan HunzakerandBrandon Dail 29d9710892 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-27 11:39:18 -05:00
Sasha AickinandBen Alpert c51411c812 Adding new SSR tests for context, refs, and reviving markup. (#9257) 2017-03-26 13:32:23 -07:00
Giamir Buoncristiani b62f851e64 Add a button to switch from Fiber with time-slicing to Fiber without it 2017-03-26 17:24:26 +01:00
najisawasandBrandon Dail c47f334ac9 Fixed typo on implementation notes page (#9258)
Added paren to "mountComponent()" for consistency
2017-03-25 20:57:28 -05:00
Brian Vaughn cb585229bc Ran yarn and fixed line-length lint issue 2017-03-24 19:59:05 -07:00
Brian Vaughn 1a29b4e2a3 Updating packages for 16.0.0-alpha.6 release 2017-03-24 15:44:09 -07:00
Brian VaughnandGitHub 1acf949240 ReactElementValidator uses temporary ReactNative View propTypes getter (#9256) 2017-03-24 15:37:21 -07:00
Sasha AickinandBen Alpert 25deff6203 Add more SSR unit tests for elements and children. (#9221)
* Adding more SSR unit tests for elements and children.

* Some of my SSR tests were testing for react-text and react-empty elements that no longer exist in Fiber. Fixed the tests so that they expect correct markup in Fiber.

* Tweaked some test names after @gaearon review comment https://github.com/facebook/react/pull/9221#discussion_r107045673 . Also realized that one of the tests was essentially a direct copy of another, so deleted it.

* Responding to code review https://github.com/facebook/react/pull/9221#pullrequestreview-28996315 . Thanks @spicyj!
2017-03-24 13:31:15 -07:00
Dan AbramovandGitHub 0a41890eaa Remove rethrowCaughtError injection (#9252) 2017-03-24 18:19:12 +00:00
Johan TinglöfandBrandon Dail 38d8f3ee6b Updated Router import for example (#9233)
Updated import in order to be a correct working example as in accordance with the docs
2017-03-24 09:37:32 -05:00
Dan Abramov f082e35b36 Fix up invariant import to be from fbjs/lib/ 2017-03-23 19:45:10 +00:00
Dan AbramovandGitHub d6a2c669d2 Fix ReactErrorUtils injection (#9247) 2017-03-23 19:13:07 +00:00
Dan AbramovandGitHub 1c9dcd53d5 Add dynamic injection to ReactErrorUtils (#9246) 2017-03-23 18:45:38 +00:00
Brian VaughnandGitHub c8897f8382 Updated ReactNative findNodeHandle() to handle number case (#9238) 2017-03-23 08:16:52 -07:00
Dan Abramov b0b9f37960 Fix up Flow syntax 2017-03-22 18:41:42 +00:00
Dan AbramovandGitHub 8de9c6c12c Add injection for error dialog (#9235) 2017-03-22 18:21:12 +00:00
Bernard LinandBrandon Dail fbc6977fbc Conferences (#9234)
* standard format for React Rally

* move React Conf 2017 to past conferences
2017-03-22 10:40:13 -05:00
Brian Vaughn 8ce5fe97b5 Bumped React version to 16.0.0-alpha.5 2017-03-21 13:04:08 -07:00
Valentin SherginandBen Alpert 97ab3f5ef8 Removed optimization for events without target in ReactNativeEventEmitter (#9219)
* Removed optimization for events without target in ReactNativeEventEmitter

This PR fixes the problem originally introduced in https://github.com/facebook/react/pull/6590
The problem is that `ResponderEventPlugin` (and `ResponderTouchHistoryStore`) relies on that fact that touch events are balanced.
So if one `startish` event happened, should be coming `endish` event. Otherwise there is no way to maintain internal `trackedTouchCount` counter. So, if we drop some events, we break this logic.

Moreover, that optimization clearly contradict with this statement from `ResponderEventPlugin`:
```
We must be resilient to `targetInst` being `null` on `touchMove` or
`touchEnd`. On certain platforms, this means that a native scroll has
assumed control and the original touch targets are destroyed.
```

This issue causes several major problems in React Native, and one of them (finally!) is easy to reproduce: https://github.com/facebook/react-native/issues/12976 .

The test also illustrates this problem.

* Prettier
2017-03-20 17:07:28 -07:00
Brian VaughnandGitHub 7f665da0ee ReactNative upstream sync (#9197)
* Addresses a circular dependency between NativeMethodsMixin and ReactNativeFiber:

* Created new ReactNativeFiberHostComponent with similar interface but without unnecessary call to findNodeHandle.
* Created new Flow interface for mixins to ensure ReactNativeFiberHostComponent and NativeMethodsMixinUtils stay synced.
* Moved helper methods to NativeMethodsMixinUtils to be shared between the 2 wrappers.

This diff was submitted and reviewed internally along with some other ReactNative changes. This is the React-only portion.

* Removed unused Flow type import

* Copied a Flow fix from internal
2017-03-20 13:50:31 -07:00
Dan AbramovandGitHub e15a481773 Re-add tests unintentionally deleted in #9209 (#9225)
These tests are useful and don't test addons specifically.
I moved them to appropriate places in the codebase.
2017-03-20 19:38:54 +00:00
Dan AbramovandGitHub 34e4352cba Delete addons (#9209)
* Delete addons

* Remove ReactFragment dependency from tests

* Remove addons testing from fixtures

* Don't mention createFragment() in a warning

* Address feedback

* Remove unused variables

* Remove mention of deleted file

* Add a missing key to the test

* Fix lint
2017-03-20 16:15:01 +00:00
CodinCatandDan Abramov 0ceb5115ac Use single quotes, remove extra whitespace (#9215) 2017-03-19 18:34:53 +00:00