Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Improved logging with react-inspector #11

Merged
merged 2 commits into from
Jul 8, 2016
Merged

Improved logging with react-inspector #11

merged 2 commits into from
Jul 8, 2016

Conversation

ritz078
Copy link
Contributor

@ritz078 ritz078 commented Jul 7, 2016

2016-07-07 14_26_46
Key points :

  • Removed action name from logged object and showing it separately on right.
    • Generally showing it separately from Object is what I expected as that's not part of my Component.
    • In the current log method, if name remained then the logged object would have always looked like Object{name: 'foo', args: Array[x]} which would have looked same for every log thus making it hard to see the difference between different logs until expanded.
  • showing __proto__.
    • It won't cause any perf issue as it is created inside the Inspector Component and isn't a part of action object.

@arunoda
Copy link
Contributor

arunoda commented Jul 8, 2016

This is pretty cool and I'm getting this now.

@arunoda arunoda merged commit c8b679f into storybook-eol:master Jul 8, 2016
@ritz078 ritz078 deleted the logger branch July 8, 2016 19:56
@arunoda
Copy link
Contributor

arunoda commented Jul 9, 2016

All these changes comes with @kadira/[email protected].
Thanks again :)

@xyc
Copy link

xyc commented Jul 13, 2016

Hi, react-inspector author here :) Thanks for using this lib!

Just a friendly reminder that an upcoming change is that the name prop will be rendered in the root node as per issue:
storybookjs/react-inspector#13

So the result for <Inspector name="test" data={{k: 'v'}}/> will look like

 ▶ test: Object {k: 'v'}

So you might want to remove the name prop if you don't want it to be shown on the left side:
(Currently the name prop has no effects anyway)

+          <Inspector
+            showNonenumerable
+            data={action.data.args || action.data}
+          />

@ritz078
Copy link
Contributor Author

ritz078 commented Jul 13, 2016

@xyc Thats nice. In a way we would love that feature.

@arunoda
Copy link
Contributor

arunoda commented Jul 13, 2016

I agree with @ritz078.
@xyc The new one is way better :)

data={action.data.args || action.data}
/>
</div>
<span style={actionNameStyle}>{action.data.name}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

@ritz078 When we update the new inspector. We may need to remove this right?
Could you work on that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

once the new one is released, i will remove it.

ndelangen pushed a commit that referenced this pull request Apr 2, 2017
Renamed ‘wrap’ to ‘withKnobs’
ndelangen pushed a commit that referenced this pull request Apr 2, 2017
ndelangen pushed a commit that referenced this pull request Apr 10, 2017
Add generator for React Native apps
ndelangen pushed a commit that referenced this pull request Apr 10, 2017
ndelangen added a commit that referenced this pull request Apr 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants