Commit Graph
19463 Commits
Author SHA1 Message Date
Dan Abramov fb6b50871b Update versions for 16.8.6 2019-03-27 23:58:16 -07:00
Dan Abramov 4148b0511d Changelog 2019-03-27 23:58:06 -07:00
Dominic Gannaway 1cfd256685 Fix circular module imports causing file size increase (#15231)
* Fix circular module imports causing file size increase
2019-03-27 21:17:58 -07:00
Dominic Gannaway 669cafb36f Adds experimental event component responder surfaces (#15228)
* Adds Press and Hover event modules + more features to the Event Responder System
2019-03-27 16:42:17 -07:00
Brian Vaughn d8cb10f11f Enabled warnAboutDeprecatedLifecycles flag by default (#15186) 2019-03-27 16:30:49 -07:00
Brian Vaughn 61a251f01a Disable reload-and-profile button if no renderers support profiling 2019-03-27 09:50:19 -07:00
Brian Vaughn 7d24e83989 Implemented reload-and-profile. Also fixed an couple of minor profiling bugs along the way 2019-03-27 09:41:12 -07:00
Dominic Gannaway 80f8b0d512 Add part of the event responder system for experimental event API (#15179)
* Add part of the event responder system
2019-03-26 16:55:25 -07:00
Dan Abramov d03ac4b231 Fix tracing fixture 2019-03-26 13:59:32 -07:00
Brian Vaughn ea5f310fe1 Webpack config injects a __DEV_ constant 2019-03-26 13:22:55 -07:00
Brian Vaughn 0d5e4c7e09 Remove coverage badge from README (#15216) 2019-03-26 12:37:05 -07:00
Brian Vaughn 691068b0a3 Suppress horizontal scroll bars in snapshot selector 2019-03-26 11:23:19 -07:00
Brian Vaughn 894990919c Fixed a tab restoration bug in browser extension 2019-03-26 11:13:40 -07:00
Brian Vaughn 3fa951d3c3 Cleaned up a no-selection state 2019-03-25 10:34:22 -07:00
Brian Vaughn 030914fdca Moved some shared CSS vars into CSS 2019-03-25 10:29:25 -07:00
Brian Vaughn 3ba64e5955 Cleaned up edge cases around filtered commits 2019-03-25 10:18:38 -07:00
Brian Vaughn 5718eaf0f3 Added arrow key navigation for commits and interactions 2019-03-24 18:53:59 -07:00
Brian Vaughn d973452c36 Removed some outdated TODO comments 2019-03-24 10:14:28 -07:00
Brian Vaughn 9d942b486a Show commit boxes in interaxctions sidebar 2019-03-24 09:58:56 -07:00
Brian Vaughn afba752034 Clicking commits and interactions link to each other 2019-03-24 09:46:54 -07:00
Brian Vaughn 5602fc5371 Added interaction tracing test harness to shell 2019-03-24 09:21:37 -07:00
Brian Vaughn 69cdd38c9d Interaction chart with commit blocks rendering 2019-03-24 09:07:00 -07:00
Dan Abramov 5c2b2c0852 Warn about async infinite useEffect loop (#15180)
* Warn about async infinite useEffect loop

* Make tests sync
2019-03-22 20:04:34 +00:00
Dan Abramov 8e9a013c07 Release 16.8.5 2019-03-22 16:47:59 +00:00
Dan Abramov db96d637d8 Changelog 2019-03-22 16:47:54 +00:00
Dan Abramov 8127a57c44 Update CHANGELOG.md 2019-03-22 16:47:44 +00:00
Dan Abramov bfb5a0cfef Add 16.8.5 changelog 2019-03-22 16:47:39 +00:00
Dan Abramov f33e5790b8 eslint-plugin-react-hooks@1.6.0 2019-03-22 13:56:07 +00:00
Dan Abramov b1cccd1ed1 Warn about setState directly in dep-less useEffect (#15184) 2019-03-22 13:41:10 +00:00
Dominic Gannaway 78f2775ed0 Flip event passive logic on passiveBrowserEventsSupported (#15190) 2019-03-22 10:28:03 +00:00
Brian Vaughn f161ee2eb7 React.warn() and React.error() (#15170) 2019-03-21 14:44:08 -07:00
Dan Abramov 78968bb3d9 Validate useEffect without deps too (#15183) 2019-03-21 20:42:13 +00:00
Sebastian Markbåge 4b8e1641b7 Fork performWork instead of using boolean flag (#15169)
I inline it into performAsyncWork instead.

Code that was only relevant to the async callback had leaked into the
performWork call which is an indication that this was a bad abstraction
and therefore the wrong place to DRY.

By inlining I also discovered that minExpirationTime is actually irrelevant
in the yieldy case so we can clean that up.
2019-03-21 13:20:52 -07:00
Brian Vaughn 56035dac64 unstable_Profiler -> Profiler (#15172) 2019-03-21 09:18:34 -07:00
Dan Abramov 31518135c2 Strengthen nested update counter test coverage (#15166)
* Isolate ReactUpdates-test cases

This ensures their behavior is consistent when run in isolation, and that they actually test the cases they're describing.

* Add coverage for cases where we reset nestedUpdateCounter

These cases explicitly verify that we reset the counter in right places.

* Add a mutually recursive test case

* Add test coverage for useLayoutEffect loop
2019-03-21 14:52:51 +00:00
Dominic Gannaway 66f280c87b Add internal logic for listening to event responders (#15168)
* Add the logic for listening to event responders
2019-03-21 12:32:40 +00:00
Andrew Clark b1a56abd6a Fork ReactFiberScheduler with feature flag
Adds a feature flag `enableNewScheduler` that toggles between two
implementations of ReactFiberScheduler. This will let us land changes in
master while preserving the ability to quickly rollback.

Ideally this will be a short-lived fork. Once we've tested the new
scheduler for a week or so without issues, we will get rid of it. Until
then, we'll need to maintain two parallel implementations and run tests
against both of them. We rarely land changes to ReactFiberScheduler, so
I don't expect this will be a huge burden.

This commit does not implement anything new. The flag is still off and
tests run against the existing implementation.

Use `yarn test-new-scheduler` to run tests against the new one.
2019-03-20 16:28:33 -07:00
Andrew Clark 45f571736c ReactFiberScheduler -> ReactFiberScheduler.old
Doing this in its own commit so history and blame are preserved.
2019-03-20 16:27:59 -07:00
Brian Vaughn 64e355bb74 Added basic Interactions view (without graph for now) 2019-03-20 11:12:46 -07:00
Brian Vaughn 17a966651c Added suspense to TODO list and added interactions to 'Commit Info' panel 2019-03-20 09:39:14 -07:00
Dan Abramov c05b4b81f9 Link to useLayoutEffect gist in a warning (#15158) 2019-03-20 13:40:36 +00:00
Renan Valentin 061d6ce3c0 fix(react-dom): access iframe contentWindow instead of contentDocument (#15099)
MDN has a list of methods for obtaining the window reference of an
iframe:

https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#Syntax

fix(react-dom): check if iframe belongs to the same origin

Accessing the contentDocument of a HTMLIframeElement can cause the browser
to throw, e.g. if it has a cross-origin src attribute.
Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:

```javascript
try {
 $0.contentDocument.defaultView
} catch (err) {
  console.log('err', err)
}

> Blocked a frame with origin X from accessing a frame with origin Y. Protocols, domains, and ports must match.
> err – TypeError: null is not an object (evaluating '$0.contentDocument.defaultView')
```

A safety way is to access one of the cross origin properties: Window or Location
Which might result in "SecurityError" DOM Exception and it is compatible to Safari.

```javascript
try {
 $0.contentWindow.location.href
} catch (err) {
 console.log('err', err)
}

> err – SecurityError: Blocked a frame with origin "http://localhost:3001" from accessing a cross-origin frame. Protocols, domains, and ports must match.
```

https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
2019-03-20 13:11:54 +00:00
Dominic Gannaway b83e01cade Adds more scaffolding for experimental event API (#15112)
* Adds more scaffolding for experimental event API
2019-03-20 11:20:17 +00:00
Brian Vaughn 3e82e4152e Added getInteractions message 2019-03-19 18:13:44 -07:00
Dominic Gannaway daeda44d8f Follow up to 15150 (#15152) 2019-03-19 20:55:04 +00:00
Sebastian Markbåge acd65db5bc Deprecate module pattern (factory) components (#15145) 2019-03-19 12:55:27 -07:00
Brian Vaughn 433b6aadd6 Added placeholder Profiler sidebar views 2019-03-19 12:41:49 -07:00
Brian Vaughn ac1a986ace Handle RTE in profiler when commit does not contain selected node 2019-03-19 11:19:30 -07:00
Brian Vaughn 1846d4fe59 Fixed a bug where treeBaseDurations were undefined for fibers that were unmounted during profiling 2019-03-19 11:08:51 -07:00
Dominic Gannaway 55cc921c5d Adds react-events package for internal testing (#15150)
* Adds react-events package for internal testing
2019-03-19 15:12:45 +00:00