Commit Graph
15395 Commits
Author SHA1 Message Date
Brian Vaughn 89e36e3976 Wrap all calls to localStorage/sessionStorage to avoid potential runtime errors 2019-06-07 10:51:01 -07:00
Dominic Gannaway 425473f43f [Flare] Improve runtime performance of hit target intersection (#15836) 2019-06-07 15:57:10 +01:00
Dan Abramov def56c9797 [Fresh] Capture Hook signatures lazily on first render (#15832)
* Split the signature call into two calls

This adds a render-time signature call by making __signature__ curried. We need both calls. The init time tells us which type has which signature. The render time call says when's a good time to capture the lazy Hooks tree. This is necessary for supporting inline requires. I will do that in next commit.

* Lazily compute Hook list on first render

This ensures inline requires don't break comparisons between Hook signatures of previous and next versions by caching Hook list at the time of first render.

* Refactor computing Hook signature keys

Instead of a traversal during the comparison, explicitly compute full keys. This makes it easier to debug mismatches.
2019-06-06 10:53:12 -07:00
Brian Vaughn a987206a36 Fixed an overflow bug. Added mode-specific CSS style for Firefox. 2019-06-06 10:39:07 -07:00
Dominic Gannaway 8cfcfe0fcb [Flare] Fix ES6 issues with IE11 (#15834) 2019-06-06 18:38:46 +01:00
Dan Abramov d0e041aee8 [Fresh] Support classes by force-remounting them on edit (#15801)
* Remount classes during hot reload

* Fix a crash when Hook isn't in scope inside the signature

* Minor tweaks

* Support a comment annotation to force state reset

* Refactoring: pass a function instead of WeakMap

This hides the implementation a little bit and reduces how much React knows about the underlying mechanism.

* Refactor: use forceReset to remount unknown Hooks

We already have the logic to reset a component, so let's just reuse it instead of that special case.
2019-06-05 16:13:42 -07:00
Brian Vaughn d1a88ffc5c Re-add plugin-transform-react-jsx-source plugin for tests 2019-06-05 14:36:01 -07:00
Brian Vaughn dc9b0810f9 Changed react-window alias 2019-06-05 14:33:24 -07:00
Brian Vaughn 9d90189ee3 react-window sync flushes scroll updates 2019-06-05 14:30:43 -07:00
Brian Vaughn 6ff733873c Vendored react-window 2019-06-05 14:27:57 -07:00
Dominic Gannaway 73c27d8b49 [Flare] Add basic Scroll event responder module (#15827) 2019-06-05 18:20:34 +01:00
Dominic Gannaway c72dceffbc [Flare] Small Swipe/Drag fixes (#15825) 2019-06-05 17:51:41 +01:00
Christoph Nakazawa 6aaa43708d Rename ReactFeatureFlags to remove the .fb suffix. (#15826) 2019-06-05 14:20:09 +01:00
Ricky 843a59ab60 [React Native] Remove eventTypes from ReactNativeBridgeEventPlugin (#15802) 2019-06-05 13:21:12 +01:00
Andrew Clark 7b28ad119e [Flare] EventPriority enum (#15823)
* Same as previous commit, but for Flare

I don't know what the public API for setting the event priority should
be. Right now it accepts a numeric enum, but is this what we want?
Maybe it should be a string enum? I've punted on this for now.

* Add test for hover events
2019-06-04 17:20:06 -07:00
Brian Vaughn 7ef5970b2f Removed __source info from production builds 2019-06-04 17:03:13 -07:00
Sunil Pai d707a75794 nit: a quick copy edit for an act() message/comment (#15805) 2019-06-04 16:36:07 -07:00
Dominic Gannaway cfb79ee5b3 [Flare] Fix isTouchEvent (#15824) 2019-06-04 23:58:11 +01:00
Brian Vaughn 1afc83e7cd Tweaked manifest "version_name" logic 2019-06-04 14:56:36 -07:00
Sarhan Aissi e158768b16 fix: remove version_name from Firefox WebExtension manifest 2019-06-04 22:34:20 +01:00
Brian Vaughn 7ed3f6815c Merge pull request #295 from bvaughn/horizontal-compression
Components tree changes to improve HOCs and browsing deep trees
2019-06-04 13:59:22 -07:00
Andrew Clark 6b5deeed50 [Events] Add support for events that are both user-blocking and continuous (#15811)
* [Events] Add EventPriority enum

React DOM's DispatchConfig for synthetic events has an `isDiscrete`
field that affects how updates triggered by an event are scheduled.
Events are either discrete or continuous.

This commit adds an additional type of configuration where an event
has user-blocking priority, but is not discrete. E.g. updates triggered
by hover are more important than the default, but they don't need to
be processed serially. Because there are now three types of event
priority instead of two, I've replaced the `isDiscrete` boolean with an
enum: `eventPriority`.

This commit implements the new enum value but does not change any
behavior. I'll enable it behind a feature flag in the next commit.

I've only implemented this in the legacy event system. I'll leave Flare
for a follow-up.

* enableUserBlockingEvents feature flag

Adds a feature flag to increase the priority of events like `mouseover`,
without making them discrete.
2019-06-04 13:35:52 -07:00
Brian Vaughn 7fa5a716e3 Use Circle CI API v2 to get artifacts job ID (#15821) 2019-06-04 13:28:41 -07:00
Dominic Gannaway 8d4fb132ef [Flare] Fix nativeEvent.x/y for older browsers (#15820) 2019-06-04 20:58:20 +01:00
Dominic Gannaway 2534c0c924 [Flare] Add event position properties to Hover responder (#15819) 2019-06-04 18:10:15 +01:00
Brian Vaughn 2245206c4c Add source location to debug logging info 2019-06-04 08:56:10 -07:00
Brian Vaughn 5963998fbe Display density preference updates :root fontSize
As a result, paddings and sizes (e.g. tab bar heights) will also be impacted now by this preference. More importantly, Profile charts will also use the line height preference, so the 'comfortable' setting will hopefully make profiling data easier to read.
2019-06-04 07:24:14 -07:00
Brian Vaughn b63a41d38a Updated release script to be Workflow aware (#15809) 2019-06-03 17:29:06 -07:00
Nicolas Gallagher dd43cb5fb9 [Flare] Fix isPressWithinResponderRegion logic (#15808)
Compare the viewport-relative coordinates of getBoundingClientRect with those
of the event's client{X,Y} values. This fixes press within scrollable nodes.
2019-06-03 14:59:26 -07:00
Nicolas Gallagher 4f6cab547b [Flare] Ignore keyboard interactions on text input children (#15810) 2019-06-03 14:34:08 -07:00
Brian Vaughn 95a99867f7 Decreased contrast of HOC badges in selected props panel 2019-06-03 12:51:04 -07:00
Brian Vaughn ef139a1811 Batched tweaks and bug fixes:
1. Bugfix: Hide tree grouping/background coloring when inside of collapsed subtree.
2. Bugfix: Don't measure and udpate indentation when Components tab is hidden.
3. Tweak: Lower background color for selected subtree in light theme to increase contrast for text.
4. Tweak: Remove FB-specific displayName check/hack since we will address that by modifying the internal require JS transform.
2019-06-03 12:47:26 -07:00
Simen Bekkhus fa1e8df116 chore: use jest-serializer-raw for react-fresh snapshots (#15806) 2019-06-03 12:46:33 -07:00
Brian Vaughn edfc1bb2b3 Simplified background highlight style now that corner radius has been removed from selected highlight 2019-06-03 10:46:37 -07:00
Brian Vaughn 06b004b5d4 Renamed <Guideline> to <SelectedTreeHighlight> 2019-06-03 09:39:31 -07:00
Brian Vaughn fbc6e5d68a Removed outdated comment and Eslint rule ignore 2019-06-03 09:33:48 -07:00
Brian Vaughn 6ac558df2d Reset max indentation when entering/exiting the owner tree 2019-06-03 09:32:28 -07:00
Brian Vaughn a173f4eb85 Add HOC component filter 2019-06-03 08:51:50 -07:00
Brian Vaughn 78cf211286 Only shrink indentation. Don't increase it again. This avoids 'jumping'. 2019-06-03 08:01:48 -07:00
James Ide 07da821bfd [react-native] Rewrite Haste imports in RN shims and add .fb.js extension (#15786)
This commit is a follow-up to https://github.com/facebook/react/pull/15604, which explains more of the rationale behind moving React Native to path-based imports and the work needed in the React repository. In that linked PR, the generated renderers were updated but not the shims; this commit updates the shims.

The problem is that FB needs a different copy of the built renderers than the OSS versions so we need a way for FB code to import different modules than in OSS. This was previously done with Haste, but with the removal of Haste from RN, we need another mechanism. Talking with cpojer, we are using a `.fb.js` extension that Metro can be configured to prioritize over `.js`.

This commit generates FB's renderers with the `.fb.js` extension and OSS renderers with just `.js`. This way, FB can internally configure Metro to use the `.fb.js` implementations and OSS will use the `.js` ones, letting us swap out which implementation gets bundled.

Test Plan: Generated the renderers and shims with `yarn build` and then verified that the generated shims don't contain any Haste-style imports. Copied the renderers and shims into RN manually and launched the RNTester app to verify it loads end-to-end. Added `.fb.js` to the extensions in `metro.config.js` and verified that the FB-specific bundles loaded.
2019-06-03 15:58:31 +01:00
Brian Vaughn f713265a00 Cap indentation increase at a max 2019-06-02 21:01:24 -07:00
Brian Vaughn 8261a3f453 Removed Tree padding 2019-06-02 20:25:57 -07:00
Brian Vaughn dc08e80037 Cache list rows by Element ID rather than index
This is important since we are caching element sizes by DOM (in a WeakMap). Toggling (as well as insertion/deletion) might otherwise break this in some cases.
2019-06-02 20:10:30 -07:00
Jordan Rome a383c46788 [ESLint] don't warn for Flow type variables (#15804)
In Exhaustive Deps check for react-hooks don't warn if the dependency is
a Flow type variable.
2019-06-03 02:20:51 +01:00
Brian Vaughn 6b6e571c68 Added HOC badge to owners list dropdown 2019-06-02 10:50:07 -07:00
Brian Vaughn 27d4f0b24d Fixed box drawing chars comment 2019-06-02 10:40:10 -07:00
Brian Vaughn dc945f6b81 Fixed a typo in string truncation util 2019-06-02 10:06:05 -07:00
Brian Vaughn 17b04c321c Cleaned up how we measure children and adjust indentation size 2019-06-02 10:02:22 -07:00
Brian Vaughn 3f0606f3d9 Refactored badges to share code and show +count 2019-06-01 18:48:24 -07:00
Brian Vaughn 6a69a6e991 Added HOC badge to owners stack breadcrumbs 2019-06-01 18:05:59 -07:00