467 Commits

Author SHA1 Message Date
Arman Sargsyan
b08786086e fix(knobs): add groupId for files knob 2019-04-16 10:30:21 +03:00
Benoit Dion
632eabd37c Safe navigator.userAgent access
`navigator.userAgent` is not defined in react-native
2019-04-15 20:32:13 -04:00
Benedikt D Valdez
7edfeb0ee2 Refactor sorting implementation to fix tests 2019-04-11 14:03:35 +00:00
Benedikt D Valdez
6ec3ebb1a0 Use DEFAULT_GROUP_ID and minor optimisation 2019-04-11 14:03:30 +00:00
Benedikt D Valdez
d10084a692 Fix sorting of knobs Panels
- Instead of sorting the array of groups, we now filter Other out of the array completely and append it to the end.
- Also updated the story in official-storybook that displays multiple knobs groups so that the ungrouped knob is at the beginning.

The previous implementation of moving the ungrouped knob panel to the end was not working as expected in Chrome. This only happened during development (running `start-storybook`) and only when the ungrouped knobs are defined before the other grouped ones. I think that is the reason this hasn’t been noticed before, since the official-storybook defined the ungrouped knobs last.

I found an inconsistency in how Chrome handles `Array.prototype.sort()` compared to the other major browsers. (relevant screenshot: https://d.pr/i/S9iChT+)
2019-04-11 14:03:26 +00:00
Norbert de Langen
ef93ffd3d1 FIX tests for knobmanager && FIX 3 year old bug where HMR of story would reset value to default && FIX storyshots 2019-04-11 11:27:44 +02:00
Norbert de Langen
b115322018 MIGRATE knobs to use api.on over channel.on && REMOVE unneeded test 2019-04-11 11:26:17 +02:00
Norbert de Langen
5c74a029a9 REVERT removal of event firing upon knob being set from url state 2019-04-11 09:40:48 +02:00
Norbert de Langen
42b26cf9af CHANGE the detection of existingKnob so it just checks the type & name matches
if the name AND type match, it's very likely the same knob, checking the value was slower & caused and issue for me
when loading the value from url the first time. Open to other solutions too.
2019-04-10 23:51:58 +02:00
Norbert de Langen
4addccc21a FIX queryParams not being serialized 2019-04-10 23:51:58 +02:00
Norbert de Langen
463baabad6 IMPROVE setting of knob value in manager 2019-04-10 23:51:58 +02:00
Norbert de Langen
c2d8b8d930 CHANGE addon-knob to allow for setting of knob after loading from URL 2019-04-10 23:51:57 +02:00
Norbert de Langen
b55bc7f2af CHANGE addon-knob so it sets queryParams to actual values instead of deleting them
This DOES NOT set them to the URL, they are STILL REMOVED as always from main URL.
2019-04-10 23:51:56 +02:00
Norbert de Langen
3870bd1707 CHANGE addon-knobs so it can read value of knob from url 2019-04-10 23:51:56 +02:00
Norbert de Langen
313c84e226
Merge pull request #6232 from storybooks/5256-fix-ungrouped-knobs
Knobs: Rename ALL panel to Other for ungrouped knobs
2019-03-25 23:14:56 +01:00
Michael Shilman
3d8b8bc608 Sort Other tab last 2019-03-23 12:59:40 +08:00
Michael Shilman
d716b72343
Merge pull request #6159 from leoyli/next
Fix addon-knobs ObjectType knob react warning #5276
2019-03-23 12:38:27 +08:00
Leo Y. Li
e34bbfc2e7
Fix addon-knobs ObjectType knob react warning #5276 2019-03-22 22:25:13 -04:00
Michael Shilman
7cffc23b3d Knobs: Rename ALL panel to Other for ungrouped knobs 2019-03-22 17:17:49 +08:00
Arman Sargsyan
c3ca20841d fix(knobs): color type button z-index 2019-03-20 22:19:55 +03:00
Leo Y. Li
c574c1d98a Fix addon-knobs ObjectType knob react warning #5276 2019-03-19 09:41:13 -04:00
Michael Shilman
1da9b3db97
Merge pull request #6094 from jonrimmer/angular-rerender-perf
Fix performance of Angular rerender
2019-03-19 20:52:56 +08:00
Leo Y. Li
e5af74ba0a Fix addon-knobs ObjectType knob react warning #5276 2019-03-18 14:36:06 -04:00
Benoit Dion
0b63ad1354 Export shared events 2019-03-16 10:24:44 -04:00
Jon Rimmer
e651a3bdbc Fix performance of Angular rerender 2019-03-15 09:42:46 +00:00
toshi1127
c1f8ec90d8 fix change value 2019-03-12 21:35:30 +09:00
codebyalex
48788f65e3 Removed double lodash import added during merge 2019-03-11 12:39:18 -04:00
Alex Wilson
636a02dc91
Merge branch 'next' into feature/knobs-performance-debouncing 2019-03-11 12:02:41 -04:00
codebyalex
fcb86a835f Modified the component force render debounce so that knob storage occurs but the force rendering is debounced. Debouncing waits 325ms to allow for a user to finish a thought before rendering. Tested this change in the cli projects. 2019-03-11 11:46:20 -04:00
Alex Wilson
ca63d0ec9a
Merge branch 'next' into performance-fix-knob-change-debouncing 2019-03-07 00:39:05 -05:00
codebyalex
8aa71c5382 modified debounce logic to use lodash rather than custom timeout code 2019-03-07 00:37:57 -05:00
Norbert de Langen
f712f0c702 REMOVE unnecessary console.log 2019-03-05 23:22:18 +01:00
Michael Shilman
f2b625bab0 Merge master into next after 5.0.0 release 2019-03-06 02:08:02 +08:00
Norbert de Langen
8b28b30163 FIX tests 2019-03-04 21:56:30 +01:00
CodeByAlex
c15e07a646 edited variable name 2019-03-01 19:18:58 -05:00
CodeByAlex
429752a546 added debouncing at 155ms between each keypress before the forceReRender function is called 2019-03-01 11:17:54 -05:00
Norbert de Langen
79d2cd11d0 REFACTOR no scroller around Tabs content, instead force scroll on child
This I hacky, I know but we need to scroll over content, without the Actionbar component, that should stick.

I'd like to refactor the Tabs component so it can render ActionBar independently, but that a bigger overhaul,
then I feel comfortable with at the moment.

Most of our addons will show a custom scrollbar now, but it's a manual process, the addon rendering is taking control
over scrolling.

Instead I'd like tabs to be in control of scrolling, but that's currently not feasable with how ActionBar works.
2019-02-27 17:31:00 +01:00
Gaëtan Maisse
7dd965bc8e fix: remove call to forceReRender() on STORY_CHANGED in addon knobs
This call is no necessary because it's already done by SB core.

Closes https://github.com/storybooks/storybook/issues/5382.
2019-02-25 20:05:27 +01:00
domyen
06ec78c20c Fix spacing bug on knobs date component 2019-02-15 12:20:22 -05:00
domyen
9bf18c6ebe Update snapshots 2019-02-12 17:44:44 -05:00
domyen
9a50e803e3 Dark theme QA and cleanup 2019-02-12 15:59:51 -05:00
domyen
63a3a7f26b Adjust layout of Knobs && remove hardcoded fontsizes 2019-02-12 14:29:30 -05:00
domyen
07e933ff95 Start theming dark mode 2019-02-08 19:06:43 -05:00
domyen
b15a0ed5e2 Change theme var names 2019-02-08 17:00:55 -05:00
domyen
be822727e1 Polish 2019-02-07 19:26:47 -05:00
domyen
18c00e2413 Minor styling tweaks 2019-02-07 17:02:37 -05:00
domyen
28e2d4f059 Use theme-level borderRadius instead of hardcoding 2019-02-07 15:45:55 -05:00
domyen
f2b8e42bb1 Update styling for Knobs.Color + Form.Field + stories 2019-02-07 15:37:05 -05:00
domyen
65239eefd4 Use Link component instead of raw <a> 2019-02-06 17:50:06 -05:00
domyen
6505ec2bfa Fix regression: Use the buttons from form instead of the other storybook buttons
Temporarily fixes regression from having 2 types of buttons, need to consolidate in the future
2019-02-06 17:43:35 -05:00