Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added trace updates feature (DOM only) #16989

Merged
merged 12 commits into from Oct 3, 2019

Conversation

@bvaughn
Copy link
Contributor

bvaughn commented Oct 2, 2019

Resolves #16437

Caveats

  • It is only enabled in the browser extension (and react-devtools-inline NPM package) for now, so it only supports React DOM.
  • It is not implemented for legacy renderers (v15) although it could be added by someone if they wanted to submit a follow up PR

Demo

Trace updates demo

@sizebot

This comment has been minimized.

Copy link

sizebot commented Oct 2, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS against 2492694

bvaughn added 2 commits Oct 2, 2019
@bvaughn bvaughn force-pushed the bvaughn:trace-updates branch from e68a3c9 to 3bd2d1c Oct 2, 2019
@bvaughn bvaughn force-pushed the bvaughn:trace-updates branch from 3bd2d1c to 6044a56 Oct 2, 2019
@bvaughn bvaughn requested a review from sebmarkbage Oct 2, 2019
bvaughn added 2 commits Oct 2, 2019
…hown for too long a time
…ag in the recursive mount case, because we don't want to highlight every host node inside of a newly mounted subtree.
@@ -1244,6 +1250,20 @@ export function attach(
recordMount(fiber, parentFiber);
}

if (traceUpdatesEnabled) {
const elementType = getElementTypeForFiber(fiber);

This comment has been minimized.

Copy link
@sebmarkbage

sebmarkbage Oct 3, 2019

Member

You can move this inside the if (traceNearestHostComponentUpdate) condition now that you only use it in one of the branches.

@bvaughn bvaughn merged commit 0545f36 into facebook:master Oct 3, 2019
13 checks passed
13 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: flow Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: lint_build Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_build Your tests passed on CircleCI!
Details
ci/circleci: test_build_devtools Your tests passed on CircleCI!
Details
ci/circleci: test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: test_dom_fixtures Your tests passed on CircleCI!
Details
ci/circleci: test_source Your tests passed on CircleCI!
Details
ci/circleci: test_source_persistent Your tests passed on CircleCI!
Details
ci/circleci: test_source_prod Your tests passed on CircleCI!
Details
@bvaughn bvaughn deleted the bvaughn:trace-updates branch Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.