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

Addon(info) - wrap prop values in braces #1915

Merged
merged 4 commits into from Sep 30, 2017

Conversation

bmv437
Copy link
Contributor

@bmv437 bmv437 commented Sep 29, 2017

Issue:
Based on the code around braceWrap I believe the intention was to surround non-string prop values in curly braces. This would make it pretty easy to copy/paste react code from storybook into an app.

What I did

I surrounded non-string prop values in html encoded curly braces.

How to test

addon-info "Story Source" used to look like:

<Component prop=value />

now looks like

<Component prop={value} />

Is this testable with jest or storyshots?
Yes, with storyshots. I've updated them.

Does this need a new example in the kitchen sink apps?
No.

Does this need an update to the documentation?
No.

If your answer is yes to any of these, please make sure to include it in your PR.

@bmv437 bmv437 changed the title Add braces Addon(info) - wrap prop values in braces Sep 29, 2017
@codecov
Copy link

codecov bot commented Sep 29, 2017

Codecov Report

Merging #1915 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1915   +/-   ##
=======================================
  Coverage   21.29%   21.29%           
=======================================
  Files         261      261           
  Lines        5743     5743           
  Branches      694      684   -10     
=======================================
  Hits         1223     1223           
- Misses       3993     3997    +4     
+ Partials      527      523    -4
Impacted Files Coverage Δ
addons/info/src/components/PropVal.js 41.41% <100%> (ø) ⬆️
app/vue/src/server/config/babel.js 0% <0%> (-100%) ⬇️
app/vue/src/server/babel_config.js 0% <0%> (-77.42%) ⬇️
lib/ui/src/modules/ui/configs/handle_keyevents.js 33.33% <0%> (ø) ⬆️
lib/ui/src/modules/api/configs/init_api.js 40.47% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/layout.js 12.5% <0%> (ø) ⬆️
...res__/update-addon-info/update-addon-info.input.js 0% <0%> (ø) ⬆️
addons/knobs/src/KnobManager.js 32% <0%> (ø) ⬆️
addons/knobs/src/components/PropForm.js 8.51% <0%> (ø) ⬆️
... and 23 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 3e9da08...335d118. Read the comment docs.

@ndelangen
Copy link
Member

It looks good to me, what do you think @usulpro @Hypnosphi ?

Copy link
Member

@Hypnosphi Hypnosphi left a comment

Choose a reason for hiding this comment

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

Excellent!

@Hypnosphi
Copy link
Member

@ndelangen I think it's rather a bugfix then a feature

@ndelangen ndelangen merged commit 6c7f910 into storybookjs:master Sep 30, 2017
@ndelangen
Copy link
Member

Welcome to the team @bmv437 !!

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