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

Provide info about component tree to devtools #6549

Merged
merged 20 commits into from
Apr 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b692893
Revert "Add ReactDebugInstanceMap"
gaearon Apr 19, 2016
e9f8d57
Add an initial implementation of ReactDebugTool events
gaearon Apr 19, 2016
7884606
Handle updates to natives and composites
gaearon Apr 20, 2016
804c680
Report dangerouslySetInnerHTML as no children
gaearon Apr 20, 2016
1587abf
Don't report children for empty and text nodes
gaearon Apr 20, 2016
367594a
Enforce that info about children is available by the time onSetChildr…
gaearon Apr 20, 2016
af3603e
Devtools should be able to clean up the tree on client rendering
gaearon Apr 20, 2016
835ca9b
Clean up the devtool tree on server rendering
gaearon Apr 20, 2016
b5997c8
Extract ReactComponentTreeDevtool
gaearon Apr 21, 2016
f530b97
Test ReactComponentTreeDevtool specifically
gaearon Apr 21, 2016
ab0ef89
Track parentID for ReactPerf
gaearon Apr 21, 2016
1f2e783
No need for a special case here
gaearon Apr 21, 2016
e20d366
Fix expect() slipping into the non-test code
gaearon Apr 21, 2016
1ebffa5
ReactComponentTreeDevtool should ignore TopLevelWrapper
gaearon Apr 22, 2016
df3c858
Stop exposing ReactComponentTreeDevtool internal tree directly
gaearon Apr 22, 2016
900a588
Add safeguards to ReactComponentTreeDevtool
gaearon Apr 23, 2016
829558b
Refactor how native container ID is stored
gaearon Apr 23, 2016
9f16003
Assert that unmounted instances are in the tree until purged
gaearon Apr 24, 2016
acd67c3
Remove isComposite and hide TopLevelWrapper
gaearon Apr 24, 2016
a9e0896
Mute devtool events for TopLevelWrapper and empty components
gaearon Apr 26, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 0 additions & 124 deletions src/isomorphic/ReactDebugInstanceMap.js

This file was deleted.

28 changes: 20 additions & 8 deletions src/isomorphic/ReactDebugTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,29 @@ var ReactDebugTool = {
onSetState() {
emitEvent('onSetState');
},
onMountRootComponent(internalInstance) {
emitEvent('onMountRootComponent', internalInstance);
onSetDisplayName(debugID, displayName) {
emitEvent('onSetDisplayName', debugID, displayName);
},
onMountComponent(internalInstance) {
emitEvent('onMountComponent', internalInstance);
onSetChildren(debugID, childDebugIDs) {
Copy link
Collaborator

@sebmarkbage sebmarkbage Apr 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TANGENT:

We shouldn't do this now but as an FYI, I been thinking that the notion of a "child" component isn't limited to children. It's not in React components so why should it be in native.

AirBnB wanted to do this <input placeholder={<CustomComponent />} /> for example which would have one of the attributes expand into a series of "children".

Similar things can happen with layout I think. Anyway, let's fix that later when we know when it happens.

emitEvent('onSetChildren', debugID, childDebugIDs);
},
onUpdateComponent(internalInstance) {
emitEvent('onUpdateComponent', internalInstance);
onSetOwner(debugID, ownerDebugID) {
emitEvent('onSetOwner', debugID, ownerDebugID);
},
onUnmountComponent(internalInstance) {
emitEvent('onUnmountComponent', internalInstance);
onSetText(debugID, text) {
emitEvent('onSetText', debugID, text);
},
onMountRootComponent(debugID) {
emitEvent('onMountRootComponent', debugID);
},
onMountComponent(debugID) {
emitEvent('onMountComponent', debugID);
},
onUpdateComponent(debugID) {
emitEvent('onUpdateComponent', debugID);
},
onUnmountComponent(debugID) {
emitEvent('onUnmountComponent', debugID);
},
};

Expand Down
173 changes: 0 additions & 173 deletions src/isomorphic/__tests__/ReactDebugInstanceMap-test.js

This file was deleted.

Loading