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

#2445 Add min, value, and max labels to range knob #3128

Merged
merged 3 commits into from
Mar 20, 2018

Conversation

jeffcarey
Copy link
Contributor

Issue: #2445

What I did

Added a simple display for the range slider for knobs of type Number: minimum on the left of the slider, and current value and maximum on the right of the slider.

storybook_range_labels

How to test

Add a knob to a story: of type 'number' with range set to true. View the knobs panel for the story.
Expected: A slider appears with the minimum, current value, and maximum. The current value updates as you move the slider.

Is this testable with jest or storyshots?
No

Does this need a new example in the kitchen sink apps?
No (Appears in "official storybook" example).

Does this need an update to the documentation?
No

@codecov
Copy link

codecov bot commented Mar 2, 2018

Codecov Report

Merging #3128 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3128      +/-   ##
==========================================
- Coverage   35.84%   35.83%   -0.02%     
==========================================
  Files         440      440              
  Lines        9632     9636       +4     
  Branches      911      902       -9     
==========================================
  Hits         3453     3453              
+ Misses       5602     5587      -15     
- Partials      577      596      +19
Impacted Files Coverage Δ
addons/knobs/src/components/types/Number.js 7.46% <0%> (-0.48%) ⬇️
app/react/src/server/utils.js 0% <0%> (-100%) ⬇️
lib/core/src/client/manager/index.js 0% <0%> (ø) ⬆️
addons/knobs/src/react/WrapStory.js 49.42% <0%> (ø) ⬆️
...modules/ui/components/stories_panel/text_filter.js 30.98% <0%> (ø) ⬆️
...-native/src/preview/components/OnDeviceUI/index.js 0% <0%> (ø) ⬆️
addons/graphql/src/components/FullScreen/index.js 0% <0%> (ø) ⬆️
...tions/src/lib/types/function/createFunctionEval.js 77.77% <0%> (ø) ⬆️
lib/ui/src/modules/ui/components/menu_item.js 19.14% <0%> (ø) ⬆️
addons/knobs/src/angular/utils.js 82.14% <0%> (ø) ⬆️
... and 68 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 b2f0115...6bd0d52. Read the comment docs.

@Hypnosphi Hypnosphi merged commit c8373ff into storybookjs:master Mar 20, 2018
@madhaze
Copy link

madhaze commented Mar 29, 2018

@jeffcarey nice. this looks great.

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.

3 participants