- Sep 28, 2019
-
-
Sebastian Markbåge authored
* Regression test: Suspense + hydration + legacy * Allow Suspense Mismatch on the Client to Silently Proceed This fixes but isn't actually the semantics that we want this case to have.
-
- Sep 25, 2019
-
-
Sebastian Markbåge authored
* Add Feature Flag for Selective Hydration * Enable Synchronous Hydration of Discrete Events * Resolve cyclic dependency
-
Dominic Gannaway authored
-
Brian Vaughn authored
* Update useEditableValue to mirror value cahnges Previously, the hook initialized local state (in useState) to mirror the prop/state value. Updates to the value were ignored though. (Once the state was initialized, it was never updated.) The new hook updates the local/editable state to mirror the external value unless there are already pending, local edits being made. * Optimistic CHANGELOG update * Added additional useEditableValue() unit test cases
-
Dominic Gannaway authored
-
Dominic Gannaway authored
-
Sebastian Markbåge authored
-
Sebastian Markbåge authored
By hard coding them here they can get properly DCE and don't have to be sent to users. The internal config should only have dynamic flags.
-
Dominic Gannaway authored
-
Dominic Gannaway authored
-
Joshua Gross authored
* [React Native] Improve logging for missing view configs and invalid view config getter functions * [React Native] Improve logging for missing view configs and invalid view config getter functions
-
- Sep 24, 2019
-
-
Dominic Gannaway authored
-
Dominic Gannaway authored
-
Dominic Gannaway authored
-
Jessica Franco authored
* Rename lowPriorityWarning to lowPriorityWarningWithoutStack This maintains parity with the other warning-like functions. * Duplicate the toWarnDev tests to test toLowPriorityWarnDev * Make a lowPriorityWarning version of warning.js * Extract both variants in print-warning Avoids parsing lowPriorityWarning.js itself as the way it forwards the call to lowPriorityWarningWithoutStack is not analyzable.
-
Andrew Clark authored
* Idle updates should not be blocked by hidden work Use the special `Idle` expiration time for updates that are triggered at Scheduler's `IdlePriority`, instead of `Never`. The key difference between Idle and Never¹ is that Never work can be committed in an inconsistent state without tearing the UI. The main example is offscreen content, like a hidden subtree. ¹ "Never" isn't the best name. I originally called it that because it "never" expires, but neither does Idle. Since it's mostly used for offscreen subtrees, we could call it "Offscreen." However, it's also used for dehydrated Suspense boundaries, which are inconsistent in the sense that they haven't finished yet, but aren't visibly inconsistent because the server rendered HTML matches what the hydrated tree would look like. * Reset as early as possible using local variable * Updates in a hidden effect should be Idle I had made them Never to avoid an extra render when a hidden effect updates the hidden component -- if they are Idle, we have to render once at Idle, which bails out on the hidden subtree, then again at Never to actually process the update -- but the problem of needing an extra render pass to bail out hidden updates already exists and we should fix that properly instead of adding yet another special case.
-
- Sep 23, 2019
-
-
Nicolas Gallagher authored
We only need to read and modify the value for the lifetime of the hook
-
Brian Vaughn authored
-
Brian Vaughn authored
PR #16752 changed how we were injecting the backend script to be done by the content script in order to work around Trusted Type limitations with our previous approach. This may have caused a regression (see #16840) so I'm backing it out to verify.
-
Brian Vaughn authored
* Fixed a regression in hooks editor from a recent EditableValue change * Fixed a reset/state bug in useEditableValue() hook and removed unnecessary useMemo()
-
Dominic Gannaway authored
-
Dominic Gannaway authored
Fix
-
Andrew Clark authored
* Outline push/pop logic in `renderRoot` I want to get rid of the the `isSync` argument to `renderRoot`, and instead use separate functions for concurrent and synchronous render. As a first step, this extracts the push/pop logic that happens before and after the render phase into helper functions. * Extract `catch` block into helper function Similar to previous commit. Extract error handling logic into a separate function so it can be reused. * Fork `renderRoot` for sync and concurrent Removes `isSync` argument in favor of separate functions. * Extra "root completion" logic to separate function Moving this out to avoid an accidental early return, which would bypass the call to `ensureRootIsScheduled` and freeze the UI. * Inline `renderRoot` Inlines `renderRoot` into `performConcurrentWorkOnRoot` and `performSyncWorkOnRoot`. This lets me remove the `isSync` argument and also get rid of a redundant try-catch wrapper. * [suspense][error handling] Add failing unit test Covers an edge case where an error is thrown inside the complete phase of a component that is in the return path of a component that suspends. The second error should also be handled (i.e. able to be captured by an error boundary. The test is currently failing because there's a call to `completeUnitOfWork` inside the main render phase `catch` block. That call is not itself wrapped in try-catch, so anything that throws is treated as a fatal/unhandled error. I believe this bug is only observable if something in the host config throws; and, only in legacy mode, because in concurrent/batched mode, `completeUnitOfWork` on fiber that throws follows the "unwind" path only, not the "complete" path, and the "unwind" path does not call any host config methods. * [scheduler][profiler] Start time of delayed tasks Fixes a bug in the Scheduler profiler where the start time of a delayed tasks is always 0. * Remove ad hoc `throw` Fatal errors (errors that are not captured by an error boundary) are currently rethrown from directly inside the render phase's `catch` block. This is a refactor hazard because the code in this branch has to mirror the code that happens at the end of the function, when exiting the render phase in the normal case. This commit moves the throw to the end, using a new root exit status. * Handle errors that occur on unwind
-
Sebastian Markbåge authored
* Add Event Replaying Infra * Wire up Roots and Suspense boundaries, to retry events, after they commit * Replay discrete events in order in a separate scheduler callback * Add continuous events These events only replay their last target if the target is not yet hydrated. That way we don't have to wait for a previously hovered boundary before invoking the current target. * Enable tests from before These tests were written with replaying in mind and now we can properly enable them. * Unify replaying and dispatching * Mark system flags as a replay and pass to legacy events That way we can check if this is a replay and therefore needs a special case. One such special case is "mouseover" where we check the relatedTarget. * Eagerly listen to all replayable events To minimize breakages in a minor, I only do this for the new root APIs since replaying only matters there anyway. Only if hydrating. For Flare, I have to attach all active listeners since the current system has one DOM listener for each. In a follow up I plan on optimizing that by only attaching one if there's at least one active listener which would allow us to start with only passive and then upgrade. * Desperate attempt to save bytese * Add test for mouseover replaying We need to check if the "relatedTarget" is mounted due to how the old event system dispatches from the "out" event. * Fix for nested boundaries and suspense in root container This is a follow up to #16673 which didn't have a test because it wasn't observable yet. This shows that it had a bug. * Rename RESPONDER_EVENT_SYSTEM to PLUGIN_EVENT_SYSTEM
-
Andrew Clark authored
Uses Closure Compiler's `@noinline` directive. See https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#noinline
-
Nicolas Gallagher authored
Makes sure that touch events with modifier keys behave the same way as other pointer types (i.e., does not call `onTapStart` if the gesture begins with a modifier key held down)
-
Dominic Gannaway authored
-
Dominic Gannaway authored
-
- Sep 20, 2019
-
-
Dan Abramov authored
-
Dominic Gannaway authored
-
- Sep 19, 2019
-
-
Brian Vaughn authored
-
Brian Vaughn authored
-
Sebastian Markbåge authored
This is because the HostConfig can't be guaranteed to be consistent with other code such as code that touches the DOM directly. Ideally we'd have a more systemic solution to this since it will pop up for other packages later too.
-
Nicolas Gallagher authored
This patch limits the `onTap*` callbacks to the primary pointer button. Auxiliary button and modified primary button interactions call `onAuxiliaryTap`, cancel any active tap, and preserve the native behavior.
-
Dan Abramov authored
-
Dominic Gannaway authored
-
- Sep 18, 2019
-
-
halvves authored
* prevent firefox marking required textareas invalid Bug was caused by an IE10/IE11 bugfix dealing with the placeholder attribute and textContent. Solved by avoiding the IE bugfix when textContent was empty. Closes #16402 * more explicit conditional check for textContent re: @philipp-spiess code review * clarify textarea test fixture's expected result better describe the behavior we are testing for re: @philipp-spiess code review
-
Dan Abramov authored
-
Rick Hanlon authored
-
Dominic Gannaway authored
-