Commit Graph

12446 Commits

Author SHA1 Message Date
Brian Vaughn c00a920640 Merge branch 'master' into devtools-v4-merge 2019-08-26 09:42:25 -07:00
Brian Vaughn 0da7bd0604 React DevTools CHANGELOG entry for 4.0.6 2019-08-26 09:34:06 -07:00
Brian Vaughn a39d9c3dff 4.0.5 -> 4.0.6 2019-08-26 08:42:38 -07:00
Brian Vaughn 1e3b0b520e Added a null check around memoizedProps 2019-08-24 09:04:26 -07:00
Brian Vaughn 84b492f344 Polyfill Symbol usage 2019-08-23 17:38:45 -06:00
Dominic Gannaway fc80772078
[react-events] Ensure updateEventListeners updates in commit phase (#16540) 2019-08-22 23:58:16 +01:00
Dan Abramov 0f6e3cd61c [Scheduler] Profiler Features (second try) (#16542)
* Revert "Revert "[Scheduler] Profiling features (#16145)" (#16392)"

This reverts commit 4ba1412305.

* Fix copy paste mistake

* Remove init path dependency on ArrayBuffer

* Add a regression test for cancelling multiple tasks

* Prevent deopt from adding isQueued later

* Remove pop() calls that were added for profiling

* Verify that Suspend/Unsuspend events match up in tests

This currently breaks tests.

* Treat Suspend and Resume as exiting and entering work loop

Their definitions used to be more fuzzy. For example, Suspend didn't always fire on exit, and sometimes fired when we did _not_ exit (such as at task enqueue).

I chatted to Boone, and he's saying treating Suspend and Resume as strictly exiting and entering the loop is fine for their use case.

* Revert "Prevent deopt from adding isQueued later"

This reverts commit 9c30b0b695.

Unnecessary because GCC

* Start counter with 1

* Group exports into unstable_Profiling namespace

* No catch in PROD codepath

* No label TODO

* No null checks
2019-08-22 13:58:12 -07:00
Nicolas Gallagher 474b650cac
[react-events] Rename hook exports (#16533)
For example, 'useHoverResponder' becomes 'useHover'
2019-08-22 13:30:35 -07:00
Nicolas Gallagher 2f03aa6eed
[react-events] Fix middle-click for Press (#16546)
Browsers always report 'buttons' as 0 when a pointer is released.
2019-08-22 10:22:14 -07:00
Bruno Scopelliti 16c3408638 Only warn in case the fourth argument is a function (#16543) 2019-08-22 17:31:27 +01:00
Sebastian Markbåge 05f5192e81
[Partial Hydration] Dispatching events should not work until hydration commits (#16532)
* Refactor a bit to use less property access

* Add test for invoking an event before mount

* Add Hydration effect tag

This is equivalent to a "Placement" effect in that it's a new insertion
to the tree but it doesn't need an actual mutation.

It is only used to determine if a subtree has actually mounted yet.

* Use the Hydration flag for Roots

Previous roots had a Placement flag on them as a hack for this case but
since we have a special flag for it now, we can just use that.

* Add Flare test
2019-08-22 08:46:20 -07:00
Brian Vaughn bf9415834f Fixed outdated extension popup wording 2019-08-21 14:28:57 -07:00
Brian Vaughn 6dda816102 Remove emoji prefix from Firefox extension tab labels
Firefox adds these already for React, so the extra emoji character was confusing. For now, we still prepend it for Chrome
2019-08-21 14:23:51 -07:00
Brian Vaughn 79bda69d88 Renamed DevTools Jest config to be more concistent with others 2019-08-21 13:40:24 -07:00
Dan Abramov 8a01b50fc3 eslint-plugin-react-hooks@2.0.1 2019-08-21 21:40:20 +01:00
Dan Abramov 3ed289b3b1
Clear canceled task node early (#16403) 2019-08-21 19:49:22 +01:00
Dan Abramov 0672829053
Bump ESLint plugin to 2.0 (#16528) 2019-08-21 19:14:34 +01:00
Nicolas Gallagher 2559111c21
[react-events] Rely on 'buttons' rather than 'button' (#16479)
The semantics of 'button' on events differs between PointerEvent and
MouseEvent, whereas they are the same for 'buttons'. Furthermore, 'buttons'
allows developers to determine when multiple buttons are pressed as the same
time.

https://w3c.github.io/pointerevents/#the-button-property
2019-08-21 10:07:15 -07:00
Dan Abramov c433fbb593
Revert "Revert "[ESLint] Forbid top-level use*() calls (#16455)"" (#16525)
* Revert "Revert "[ESLint] Forbid top-level use*() calls (#16455)" (#16522)"

This reverts commit 507f0fb372.

* Update RulesOfHooks.js
2019-08-21 15:43:31 +01:00
Sunil Pai 507f0fb372
Revert "[ESLint] Forbid top-level use*() calls (#16455)" (#16522)
This reverts commit 96eb703bbf.
2019-08-21 10:20:34 +01:00
Brian Vaughn 66c9fedc34 Flow fixes 2019-08-20 13:33:33 -07:00
Brian Vaughn fe943c339d Add custom DevTools Flow definitions to shared flowconfig 2019-08-20 11:37:45 -07:00
Brian Vaughn 2e549efae5 Moved DevTools custom Flow definitions 2019-08-20 11:37:31 -07:00
Brian Vaughn 4da836af71 Merged changes from 4.0.0 -> 4.0.5 from DevTools fork 2019-08-20 11:34:51 -07:00
Brian Vaughn 3ad50710a7 Merge branch 'source' of github.com:bvaughn/react-devtools-experimental 2019-08-20 11:00:02 -07:00
Brian Vaughn 833f206348 Merge branch 'master' into devtools-v4-merge 2019-08-20 10:41:38 -07:00
bbolek efa5dbe7a5 Update CHANGELOG.md (#16439)
* Update CHANGELOG.md

Fixed typo
2019-08-20 09:51:01 -07:00
Heaven da0a47bec3 fix typo in CHNAGELOG.md (#16447) 2019-08-20 09:48:03 -07:00
Morgan McCauley 69aafbf4df Fix spelling in react-devtools CHANGELOG.md (#16448) 2019-08-20 09:47:18 -07:00
Brian Vaughn 2843a1556e Fixed invalid object-assign version (4.0.4 -> 4.0.1) 2019-08-20 09:45:09 -07:00
Brian Vaughn aa56fe34ac Improved GitHub issue repro instructions prompt 2019-08-20 09:44:41 -07:00
Sebastian Markbåge c80678c760
Add "hydrationOptions" behind the enableSuspenseCallback flag (#16434)
This gets invoked when a boundary is either hydrated or if it is deleted
because it updated or got deleted before it mounted.
2019-08-19 13:26:39 -07:00
Dan Abramov 2d68bd0960
Fix message loop behavior when host callback is cancelled (#16407)
* Add a regression test for cancelCallback with message loop

* If there's nothing scheduled, we're not running

* Add more tests from #16271
2019-08-19 21:20:21 +01:00
Dan Abramov 96eb703bbf
[ESLint] Forbid top-level use*() calls (#16455)
* Add a way to skip/only tests to RulesOfHooks test

* [ESLint] Forbid top-level use*() calls

* Add a regression test for logical expressions

This is not a change. Just adding more coverage.
2019-08-19 19:54:06 +01:00
Dan Abramov 56f93a7f38
Throw on unhandled SSR suspending (#16460)
* Throw on unhandled SSR suspending

* Add a nicer message when the flag is off

* Tweak internal refinement error message
2019-08-19 19:53:02 +01:00
Dominic Gannaway dce430ad92
[Flare] Rework the responder dispatching/batching mechanism (#16334) 2019-08-19 19:22:46 +01:00
Brian Vaughn 6ae6a7c020 Updated React DevTools changelog for 4.0.5 2019-08-19 09:28:10 -07:00
Brian Vaughn 5441b094a4 4.0.4 -> 4.0.5 2019-08-19 09:26:55 -07:00
Nicolas Gallagher 56d1b0fb59
[react-events] DOM event testing library (#16433)
This patch formalizes the mock native events and event sequences used in unit tests.

The `createEventTarget` function returns an object that can be used to dispatch native event sequences on the target without having to manually do so across all the scenarios we need to account for. Unit tests can be written as if we were only working with PointerEvent, but they will dispatch realistic native event sequences based on the execution environment (e.g., is PointerEvent supported?) and pointer type.

```
describe.each(environments)('Suite', (hasPointerEvents) => {
  beforeEach(() => {
    // setup
  });

  test.each(pointerTypes)('Test', (pointerType) => {
    const target = createEventTarget(node);
    target.pointerdown({pointerType});
    expect(callback).toBeCalled();
  });
});
```

Every native event that is dispatched now includes a complete object by default. The properties of the events can be customized. Properties that shouldn't be relied on in responder implementations are excluded from the mock native events to ensure tests will fail. Equivalent properties are normalized across different event types, e.g., 'pointerId' is converted to 'identifier' before a TouchEvent is dispatched.
2019-08-19 09:21:55 -07:00
Brian Vaughn 01b1e7e2cf Alpha-sort props/state/context keys 2019-08-19 09:17:52 -07:00
Brian Vaughn d2456c7572 Fixed standalone target not properly serving backend over localhost:8097 2019-08-19 07:36:41 -07:00
Brian Vaughn 14c2eab7c3 Resolved Yarn conflict for object-assign 2019-08-19 07:04:47 -07:00
Brian Vaughn e89c19d16c Added DevTools 4.0.4 CHANGELOG entry 2019-08-18 08:55:49 -07:00
Brian Vaughn 3c6a219466 4.0.3 -> 4.0.4 2019-08-18 08:45:52 -07:00
Brian Vaughn 4697f5b379 Profiler bugfix for filtering out all commits after selecting a fiber 2019-08-18 08:34:40 -07:00
Brian Vaughn d97af798d2 Updated DevTools CHANLOGE to add an unreleased change 2019-08-17 21:19:00 -07:00
Brian Vaughn 95ca079556 Fixed standalone bug that prevented backend from being served over localhost:8097 2019-08-17 21:11:10 -07:00
Brian Vaughn 21e793fb4f
Added 4.0.1, 4.0.2, and 4.0.3 changelog entries (#16438)
* Added 4.0.1, 4.0.2, and 4.0.3 changelog entries
* Added entry about Map/Set/Immutable
2019-08-17 11:47:38 -07:00
Brian Vaughn 95ffd3ccf8 4.0.2 -> 4.0.3 2019-08-17 11:31:31 -07:00
Brian Vaughn 2935d6a18d Unserializable data type fix for standalone shell 2019-08-17 11:31:20 -07:00