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

Add display configuration options to info addon #1157

Merged
merged 13 commits into from
Jun 8, 2017
Merged

Conversation

z4o4z
Copy link
Member

@z4o4z z4o4z commented May 30, 2017

Issue: #1152

What I did

Add new options:

  • maxPropsIntoLine (default is 3)
  • maxPropObjectKeys (default is 3)
  • maxPropArrayLength (default is 3)
  • maxPropStringLength (default is 50)

How to test

Run npm run storybook to see new stories and test it!

@codecov
Copy link

codecov bot commented May 30, 2017

Codecov Report

Merging #1157 into master will increase coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1157      +/-   ##
==========================================
+ Coverage    13.7%   13.72%   +0.02%     
==========================================
  Files         207      207              
  Lines        4647     4640       -7     
  Branches      518      511       -7     
==========================================
  Hits          637      637              
- Misses       3546     3557      +11     
+ Partials      464      446      -18
Impacted Files Coverage Δ
addons/info/src/index.js 0% <ø> (ø) ⬆️
addons/info/src/components/Story.js 0% <0%> (ø) ⬆️
addons/info/src/components/Props.js 0% <0%> (ø) ⬆️
addons/info/src/components/PropVal.js 0% <0%> (ø) ⬆️
addons/info/src/components/PropTable.js 0% <0%> (ø) ⬆️
addons/info/example/story.js 0% <0%> (ø) ⬆️
addons/info/src/components/Node.js 0% <0%> (ø) ⬆️
app/react/src/server/babel_config.js 44.82% <0%> (ø) ⬆️
...rc/modules/ui/components/left_panel/text_filter.js 33.33% <0%> (ø) ⬆️
app/react/src/client/preview/reducer.js 0% <0%> (ø) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update daea520...88d93d4. Read the comment docs.

Copy link
Member

@ndelangen ndelangen left a comment

Choose a reason for hiding this comment

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

I don't think we should use context, What problem did you have that you needed context to solve?

@@ -112,8 +113,14 @@ function previewProp(val) {

export default class PropVal extends React.Component {
render() {
return previewProp(this.props.val);
return previewProp(this.props.val, this.context);
Copy link
Member

Choose a reason for hiding this comment

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

Can we do it without context ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ndelangen fixed

@ndelangen
Copy link
Member

Hey @z4o4z can you fix the merge conflicts? sorry.

@z4o4z
Copy link
Member Author

z4o4z commented Jun 7, 2017

@ndelangen Hi, of course)

@ndelangen ndelangen added this to the v3.0.2 milestone Jun 8, 2017
@z4o4z z4o4z merged commit 6cf80a2 into master Jun 8, 2017
@ndelangen ndelangen deleted the addon-info-new-options branch June 8, 2017 13:43
@shilman shilman changed the title Add new options to info addon Add display configuration options to info addon Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants