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

Release/3.2 #1383

Merged
merged 240 commits into from
Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from 221 commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
c3b35e6
WIP
ndelangen Jun 12, 2017
fcd6283
WIP, webpack succesful
ndelangen Jun 12, 2017
7b53666
testing
ndelangen Jun 12, 2017
b1470eb
Implement basic working version, Cannot handle extension and global c…
alexandrebodin Jun 13, 2017
23aadf4
:shirt: refactor(client): update preview rendering
kazupon Jun 13, 2017
c23caa9
:shirt: refactor(examples): update stories
kazupon Jun 13, 2017
ccbbf6e
Publish alpha.0
ndelangen Jun 14, 2017
55aa3ff
Make global examples work if config.js bootstrap components and exten…
alexandrebodin Jun 14, 2017
e7b9b0a
Make working examples for functions, Vue extensions and Vue global co…
alexandrebodin Jun 14, 2017
6b21da8
fix dep for lerna bootstrap
alexandrebodin Jun 14, 2017
cc546c5
HMR works!
ndelangen Jun 14, 2017
d51f83e
CHANGE favicon
ndelangen Jun 14, 2017
9454fa7
ADD example with actions and links
ndelangen Jun 14, 2017
d0dc873
Update the dep value to work with next releases of @storybook/vue
alexandrebodin Jun 14, 2017
385611b
Merge branch 'master' into add-app-vue
ndelangen Jun 14, 2017
9974a3b
Add support for vue in addon-notes
alexandrebodin Jun 14, 2017
bf00a9a
Make addon notes agnostic
alexandrebodin Jun 14, 2017
514f4b7
deprecate old WithNotes but keep backward compatible
alexandrebodin Jun 14, 2017
5a6472d
Cleaning up deps and comments
alexandrebodin Jun 14, 2017
a93eba3
Merge pull request #1278 from storybooks/addon-notes-vue
ndelangen Jun 14, 2017
b41fda4
:construction: wip: add story template for vue app project
kazupon Jun 15, 2017
ff56861
:up: update(cli): getstorybook vue supporting
kazupon Jun 15, 2017
765d394
Merge branch 'master' into add-app-vue
ndelangen Jun 16, 2017
9bd55bc
:up: update(cli): stories creating for vue
kazupon Jun 16, 2017
82d44e8
Merge branch 'add-app-vue' into getstorybook-support-for-vue
kazupon Jun 16, 2017
19dcfd9
Change docs to contains Vue info
ndelangen Jun 16, 2017
db319e4
Merge branch 'master' into add-app-vue
ndelangen Jun 16, 2017
d9a3da5
Make a working example
alexandrebodin Jun 14, 2017
5e66224
Cleaning up
alexandrebodin Jun 14, 2017
aef1f01
less ugly working example
alexandrebodin Jun 15, 2017
5784a79
Comment unused to make PR clear
alexandrebodin Jun 15, 2017
bac1905
Add support for addonKnobs, rename withX to addonX to avoid name coll…
alexandrebodin Jun 15, 2017
6255569
Finish cleanup of addon knobs
alexandrebodin Jun 16, 2017
4c1daab
More clean up
alexandrebodin Jun 16, 2017
3e12ba1
:shirt: refactor: tweak style guide
kazupon Jun 17, 2017
b355060
Fix example using a function as a component to object component
alexandrebodin Jun 17, 2017
4dd6b78
Make example a proper vue app
alexandrebodin Jun 17, 2017
3260f7d
Readme fix
alexandrebodin Jun 17, 2017
1e91907
Wording
alexandrebodin Jun 17, 2017
838730f
:up: update: show the error at storybook/vue
kazupon Jun 17, 2017
2e3170d
:pencil: docs: update vue guide
kazupon Jun 17, 2017
040f4e0
Merge pull request #1287 from kazupon/getstorybook-support-for-vue
alexandrebodin Jun 18, 2017
68d237c
Remove unwatend packe-lock.json
alexandrebodin Jun 18, 2017
bc84ee6
Rename vue example to vue-kitchen-sink
alexandrebodin Jun 18, 2017
8145ac3
Merge branch 'master' into add-app-vue
alexandrebodin Jun 18, 2017
d3c53c1
:up: update: fix error display
kazupon Jun 18, 2017
70a043f
add more examples with knobs fields
alexandrebodin Jun 18, 2017
8178ec1
Merge branch 'add-app-vue' of github.com:storybooks/storybook into ad…
alexandrebodin Jun 18, 2017
043b5f1
Merge branch 'master' into add-app-vue
ndelangen Jun 19, 2017
5daa769
Merge branch 'master' into add-app-vue
alexandrebodin Jun 20, 2017
6c95ac9
add tests
alexandrebodin Jun 20, 2017
6e8f869
fix dependency
alexandrebodin Jun 20, 2017
c7efe5a
bumping version
alexandrebodin Jun 20, 2017
654be24
bumping version
alexandrebodin Jun 20, 2017
e35aeee
Merge branch 'add-app-vue' of github.com:storybooks/storybook into ad…
alexandrebodin Jun 20, 2017
7be65d4
fix resolve in webpack
alexandrebodin Jun 20, 2017
a7a3900
Add left panel hierarchy support
Jun 21, 2017
ad32ffa
Fix a few related codebeat issues
Jun 21, 2017
6960d91
Add more tests for stories.js
Jun 21, 2017
3dbdb9e
Better UI for the hierarchy view + bugs fixes
Jun 22, 2017
6bfed5d
Merge remote-tracking branch 'origin/master' into left-panel-hierarchy
Jun 22, 2017
56f96a6
remove typings for @storybook/addon-knobs, references https://github.…
joscha Jun 22, 2017
e9a2ec8
remove typings for @storybook/addon-links, references https://github.…
joscha Jun 22, 2017
64e9c1e
remove typings for @storybook/addon-options, references https://githu…
joscha Jun 22, 2017
f4b3df3
remove typings for @storybook/addon-notes, references https://github.…
joscha Jun 22, 2017
dcae32f
Merge branch 'master' into joscha/remove-addon-knobs-types
joscha Jun 22, 2017
f27825d
Add shortcut to toggle hierarchy
Jun 23, 2017
9b00eb3
Extract hierarchy creation to the mapper
igor-dv Jun 23, 2017
96031cd
Merge branch 'master' into add-app-vue
ndelangen Jun 23, 2017
e87bcf5
Merge branch 'master' into release/3.2
shilman Jun 23, 2017
d806c3f
WIP
ndelangen Jun 23, 2017
d41655a
Merge branch 'master' of github.com:storybooks/storybook into add-app…
alexandrebodin Jun 23, 2017
c7ddd09
clean up build and wording
alexandrebodin Jun 23, 2017
f2926f4
bump to alpha 4
alexandrebodin Jun 23, 2017
06a4c54
Remove shortcuts for the hierarchy toggling + change leftPanelHierarc…
igor-dv Jun 23, 2017
c16cc2d
Rename resolveStoryHierarchyNamespace to resolveStoryHierarchy
igor-dv Jun 23, 2017
cafa395
FIX multiple version react in vue app
ndelangen Jun 23, 2017
0605107
CLEANUP
ndelangen Jun 23, 2017
3fde529
Fix tests + Add tests for hierarchy
igor-dv Jun 23, 2017
997f3d9
FIX multiple versions of react & vue && CLEANUP
ndelangen Jun 23, 2017
5e82586
Merge pull request #1342 from joscha/joscha/remove-addon-links-types
shilman Jun 23, 2017
11dc35d
Merge pull request #1339 from joscha/joscha/remove-addon-knobs-types
shilman Jun 23, 2017
a88354c
Merge pull request #1343 from joscha/joscha/remove-addon-options-types
shilman Jun 23, 2017
f2241b4
Merge pull request #1344 from joscha/joscha/remove-addon-notes-types
shilman Jun 23, 2017
17fb4f5
Fix the cases when the separator is not a "."
igor-dv Jun 24, 2017
87adce4
Add assertions to left_panel.test.js
igor-dv Jun 24, 2017
bbf6360
Fix warnings in stories.test.js
igor-dv Jun 25, 2017
1c33fda
Fix tests + Add tests
igor-dv Jun 25, 2017
df26718
Remove require.resolve from libs/ui webpack.config.js
igor-dv Jun 25, 2017
21d7173
Remove package-lock.json files
igor-dv Jun 25, 2017
f57a602
Merge pull request #1329 from igor-dv/left-panel-hierarchy
shilman Jun 25, 2017
b4e794d
Try to use react-treebeard
igor-dv Jun 25, 2017
1472ae9
Try to save local state of the nodes inside the stories.js
igor-dv Jun 25, 2017
4e7037f
Alow animations (with warnings) + Styling
igor-dv Jun 26, 2017
dbb04c1
Repalce resolveStoryHierarchy func with hierarchySeparator
igor-dv Jun 26, 2017
142b2b8
Merge remote-tracking branch 'origin/151-story-hierarchy' into story-…
igor-dv Jun 27, 2017
17fb92f
Delete unused code + adjust names
igor-dv Jun 27, 2017
8f1a4d6
Fix hierarchy + remove unused functionality
igor-dv Jun 27, 2017
ec67cc5
:up: update(server): tweak consoleoutputing
kazupon Jun 27, 2017
a024975
Fix stories.test.js
igor-dv Jun 27, 2017
c25ac5b
Update global hook for Vue Devtools
matt-oconnell Jun 20, 2017
3f76d6c
Remove the root node of the tree
igor-dv Jun 29, 2017
8a98f62
Add react-icons for a better tree structure
igor-dv Jun 29, 2017
279e198
Change the order of the atomic namespace
igor-dv Jun 29, 2017
74fde7b
Merge branch 'master' into release/3.2
shilman Jun 29, 2017
43ca59b
Merge remote-tracking branch 'origin/release/3.2' into 151-story-hier…
igor-dv Jun 29, 2017
8262b7b
Revert code that was injected by aliens
igor-dv Jun 29, 2017
2fdf710
Merge remote-tracking branch 'origin/151-story-hierarchy' into story-…
igor-dv Jun 29, 2017
0362bc2
Merge pull request #1356 from storybooks/151-story-hierarchy
igor-dv Jun 29, 2017
fa4ee72
Remove a redundant comment
igor-dv Jun 29, 2017
4c562c3
Move decorators to separate file
igor-dv Jun 29, 2017
836215f
Fix a bug when the component node and one of the namespaces nodes hav…
igor-dv Jun 30, 2017
2980693
Extract tree_style to separate file
igor-dv Jun 30, 2017
d2f259b
Merge branch 'add-app-vue' of github.com:storybooks/storybook into ad…
alexandrebodin Jul 1, 2017
929eb38
Merge branch 'master' of github.com:storybooks/storybook into add-app…
alexandrebodin Jul 1, 2017
864e97e
fix version in package.json
alexandrebodin Jul 1, 2017
3e315bb
Use a forked version of the react-treebeard
igor-dv Jul 1, 2017
80f7ab2
Merge branch 'master' into release/3.2
shilman Jul 1, 2017
682d394
Merge branch 'release/3.2' into 151-story-hierarchy
shilman Jul 2, 2017
a10d19d
Merge remote-tracking branch 'origin/151-story-hierarchy' into 151-st…
shilman Jul 2, 2017
83bb874
Merge branch 'release/3.2' into add-app-vue
shilman Jul 2, 2017
5a6ca6c
Rename stories dir to the stories_tree to prevent prepublish script i…
igor-dv Jul 2, 2017
cf94190
Merge pull request #1267 from storybooks/add-app-vue
shilman Jul 2, 2017
3d65aad
Upgrade storybook-react-treebeard to a newer version that fixes impor…
igor-dv Jul 2, 2017
f048d32
Add more tests for stories_tree
igor-dv Jul 2, 2017
b26e39b
Merge pull request #1387 from storybooks/151-story-hierarchy
shilman Jul 2, 2017
5642b7d
v3.2.0-alpha.5
shilman Jul 2, 2017
c0eb57a
Update cra-kitchen-sink versioning for alpha release
shilman Jul 2, 2017
90e9780
Fix typo
shilman Jul 2, 2017
61f6878
Fix loss of the state in a reall app with componentWillReceiveProps
igor-dv Jul 2, 2017
a2802e5
Merge pull request #1400 from storybooks/examples-3.2-alpha-versioning
shilman Jul 3, 2017
957ff8f
Merge branch 'release/3.2' into 151-story-hierarchy
shilman Jul 3, 2017
281b021
Add tests to check the componentWillReceiveProps
igor-dv Jul 3, 2017
0e06e1a
Merge remote-tracking branch 'origin/release/3.2' into 151-story-hier…
igor-dv Jul 3, 2017
03e10d0
Bump vue to 3.2.0-alpha.6 to publish as latest (getstorybook needs this)
alexandrebodin Jul 4, 2017
fe3f19d
Use deepEqual to compare selectedHierarchy
igor-dv Jul 4, 2017
9120949
Merge remote-tracking branch 'origin/release/3.2' into 151-story-hier…
igor-dv Jul 4, 2017
3096cde
Merge remote-tracking branch 'origin/151-story-hierarchy' into 151-st…
shilman Jul 6, 2017
d6177f8
Merge pull request #1401 from storybooks/151-story-hierarchy
shilman Jul 6, 2017
3d1926b
Merge pull request #1419 from storybooks/master
shilman Jul 6, 2017
e50d7b2
Merge branch 'release/3.2' into update-global-hook
ndelangen Jul 6, 2017
f6e4c11
v3.2.0-alpha.7
shilman Jul 6, 2017
fbc665f
v3.2.0-alpha.7
shilman Jul 6, 2017
e34cf19
Add keyboard accessibility to stories tree
igor-dv Jul 7, 2017
392f4d4
Merge branch '151-story-hierarchy' of https://github.com/storybooks/s…
igor-dv Jul 7, 2017
3607ed5
Merge remote-tracking branch 'origin/release/3.2' into 151-story-hier…
igor-dv Jul 7, 2017
86679eb
MVP version of the on device React Native UI
matt-oakes Jul 5, 2017
760a752
Fix long story name word-breaking
igor-dv Jul 7, 2017
de858e5
Add test for pressing enter on story
igor-dv Jul 7, 2017
c390802
Implement filtering on story-level
jackhurley23 Jul 8, 2017
a1a0d14
Update filtering to be case-insensitive at story level
jackhurley23 Jul 8, 2017
c331251
Update cra-kitchen-sink package versions for 3.2-alpha
shilman Jul 8, 2017
f2054b9
Merge pull request #1434 from storybooks/1433-fix-alpha-versions
ndelangen Jul 8, 2017
d9a2948
Refactoring Addon Info [WIP]
usulpro Jul 9, 2017
d41888f
Addons composition
usulpro Jul 10, 2017
d214b7e
Merge remote-tracking branch 'origin/release/3.2' into 151-story-hier…
igor-dv Jul 10, 2017
28eb25a
Add hierarchySeparator to README
joscha Jul 10, 2017
0c9d561
Fix addon notes
usulpro Jul 10, 2017
73f64c8
Add withInfo()(storyFn)
usulpro Jul 10, 2017
6481449
Fix the left panel width when narrowing
igor-dv Jul 11, 2017
e13d727
Merge pull request #1448 from storybooks/Fix-addon-notes
usulpro Jul 11, 2017
7e9c35d
Merge branch 'release/3.2' into joscha/add-hierarchySeparator
ndelangen Jul 11, 2017
e0422ff
Merge remote-tracking branch 'origin/release/3.2' into 151-story-hier…
igor-dv Jul 11, 2017
973e8ea
Merge branch 'release/3.2' into 1147-info-addon
usulpro Jul 11, 2017
ec8ee5c
Add deprecation warning
usulpro Jul 11, 2017
0e8230c
Refactoring withInfo function
usulpro Jul 11, 2017
868dced
Add test
usulpro Jul 11, 2017
1e2892f
Improve test coverage
usulpro Jul 12, 2017
6c128f3
Fix typo
usulpro Jul 12, 2017
3832ae9
Switch to util-deprecate
usulpro Jul 13, 2017
cabfee0
Mark the nested prop types with isRequired
igor-dv Jul 13, 2017
a73d01d
Fix tests and default props
usulpro Jul 13, 2017
d6efd70
Merge pull request #1452 from storybooks/1147-info-addon
shilman Jul 13, 2017
a22cdda
Merge branch 'release/3.2' into 151-story-hierarchy
shilman Jul 13, 2017
0121a7c
Merge pull request #1427 from storybooks/151-story-hierarchy
igor-dv Jul 14, 2017
594dab4
Merge branch 'release/3.2' into joscha/add-hierarchySeparator
ndelangen Jul 14, 2017
fdcacc8
cahnge to /
joscha Jul 14, 2017
1c59065
Merge branch 'master' into release/3.2
shilman Jul 14, 2017
560224c
Merge pull request #1445 from storybooks/joscha/add-hierarchySeparator
shilman Jul 15, 2017
65e7341
Merge pull request #1432 from jhurley23/109-story-level-filtering
shilman Jul 16, 2017
ed8bbcb
:pushpin: dependency(vue): bump vue
kazupon Jul 16, 2017
7f5dd72
:shirt: refactor(vue): tweak vue implementation
kazupon Jul 16, 2017
573f986
:pushpin: dependency(examples): bump dependency modules
kazupon Jul 16, 2017
45ada35
Merge branch 'release/3.2' into update-global-hook
ndelangen Jul 18, 2017
0958ab5
Set '/' as a default hierarchySeparator
igor-dv Jul 18, 2017
88be449
Remove '/' from ui\example\client\provider since it's a default value
igor-dv Jul 19, 2017
48ee2cd
Change the react-treebeard to the main repo version
igor-dv Jul 19, 2017
3c84722
Merge branch 'release/3.2' into storybook-native-ui
ndelangen Jul 19, 2017
889ea2b
Change toggle icon and delete other icons to make the tree look clean…
igor-dv Jul 19, 2017
7c717ae
Merge pull request #1413 from matt-oakes/storybook-native-ui
shilman Jul 19, 2017
64c053f
Merge branch 'release/3.2' into 151-story-hierarchy
ndelangen Jul 19, 2017
91b62f0
Merge branch 'release/3.2' into tweak/vue-app
ndelangen Jul 19, 2017
874a780
Merge pull request #1488 from storybooks/151-story-hierarchy
igor-dv Jul 20, 2017
3862c99
Merge branch 'master' into release/3.2
ndelangen Jul 20, 2017
1d09d47
linting
ndelangen Jul 20, 2017
0968770
UPDATE / SYNC package dependencies for optimal bootstrap
ndelangen Jul 20, 2017
852ee89
FIX sometimes storyName being undefined when url is '/'
ndelangen Jul 20, 2017
312eebf
Merge branch 'release/3.2' into tweak/vue-app
ndelangen Jul 20, 2017
d9ff515
:pushpin: dependecy:make vue-template-compiler the same as vue core
kazupon Jul 20, 2017
0daec90
Merge pull request #1477 from kazupon/tweak/vue-app
shilman Jul 20, 2017
4513cc9
v3.2.0-alpha.8
shilman Jul 20, 2017
9fe1a14
Fix vue release and examples dependencies
shilman Jul 20, 2017
c00f4d5
Merge branch 'master' into release/3.2
ndelangen Jul 21, 2017
2513f6e
Extract nopreview component & allow it to be re-rendered
ndelangen Jul 21, 2017
1e696e9
Fix a 'funny' hmr issue
igor-dv Jul 22, 2017
bf2e4ee
FIX unittests
ndelangen Jul 22, 2017
1a671ec
Merge branch 'release/3.2' into fix-nopreview-vue
ndelangen Jul 22, 2017
07ece8e
Merge branch 'release/3.2' into fix-hmr-issue-in-cra-kitchen-sink
ndelangen Jul 22, 2017
958e5d8
Merge pull request #1504 from storybooks/fix-nopreview-vue
ndelangen Jul 22, 2017
52adbc3
Merge branch 'release/3.2' into fix-hmr-issue-in-cra-kitchen-sink
ndelangen Jul 22, 2017
5b30336
Merge pull request #1508 from storybooks/fix-hmr-issue-in-cra-kitchen…
ndelangen Jul 22, 2017
a0a8ab3
Fix RN preview welcome instructions
shilman Jul 22, 2017
0f8755c
Reset storybook on startup?
shilman Jul 22, 2017
8f8f55e
Show first story on OnDeviceUI startup
shilman Jul 22, 2017
a9b1664
Merge branch 'release/3.2' into 1492-on-device-startup
shilman Jul 22, 2017
ecd054d
Merge branch 'release/3.2' into update-global-hook
ndelangen Jul 22, 2017
afacba9
Merge pull request #1376 from matt-oconnell/update-global-hook
ndelangen Jul 23, 2017
f26700d
Update README.md
ndelangen Jul 23, 2017
dfaaa09
Merge pull request #1510 from storybooks/1492-on-device-startup
shilman Jul 23, 2017
0f3b878
v3.2.0-alpha.9
shilman Jul 23, 2017
73130d4
Merge branch 'master' into release/3.2
ndelangen Jul 25, 2017
b7f43ed
Merge branch 'master' into release/3.2
ndelangen Jul 25, 2017
63404f6
Merge branch 'master' into release/3.2
ndelangen Jul 25, 2017
de75c5d
Merge branch 'master' into release/3.2
ndelangen Jul 25, 2017
d6f1b89
Add warnings if 'module' is missing
igor-dv Jul 26, 2017
949f62f
Merge pull request #1525 from storybooks/hmr-warning-on-storiesOf
igor-dv Jul 26, 2017
21e4081
Merge branch 'master' into release/3.2
ndelangen Jul 26, 2017
6f74da4
Revert knobs API to previous API.
tmeasday Jul 27, 2017
5e9d574
Remove wrapperKnobs
tmeasday Jul 27, 2017
ea02ddd
Revert addonNotes -> withNotes
tmeasday Jul 27, 2017
dcb3e1f
Merge pull request #1527 from storybooks/simplifyKnobsAPI
shilman Jul 27, 2017
6b8a1b8
Fix bad merge that removed react-treebeard dep from lib/ui
shilman Jul 27, 2017
5ba0e4f
SYNC dependencies for improved hoisting
ndelangen Jul 27, 2017
79a8896
Merge pull request #1531 from storybooks/fix-3.2-package-versions
shilman Jul 27, 2017
0188ace
v3.2.0-alpha.10
shilman Jul 27, 2017
1b25491
Add negative margin to move the tree to the left =/
igor-dv Jul 27, 2017
b8bcabe
Merge pull request #1533 from storybooks/1532-fix-stories-decorator-r…
shilman Jul 27, 2017
64d2976
v3.2.0-alpha.11
shilman Jul 27, 2017
f8ce75f
Update example package deps
shilman Jul 27, 2017
570e3e8
v3.2.0 changelog
shilman Jul 27, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ node_modules
app/**/demo/**
docs/public

vue

*.bundle.js
*.js.map

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It allows you to browse a component library, view the different states of each c

Storybook runs outside of your app. This allows you to develop UI components in isolation, which can improve component reuse, testability, and development speed. You can build quickly without having to worry about application-specific dependencies.

Here are some featured examples that you can reference to see how Storybook works: https://storybook.js.org/examples/
Here are some featured examples that you can reference to see how Storybook works: <https://storybook.js.org/examples/>

Storybook comes with a lot of [addons](https://storybook.js.org/addons/introduction/) for component design, documentation, testing, interactivity, and so on. Storybook's easy-to-use API makes it easy to configure and extend in various ways. It has even been extended to support React Native development for mobile.

Expand Down Expand Up @@ -48,11 +48,13 @@ getstorybook
Once it's installed, you can `npm run storybook` and it will run the development server on your local machine, and give you a URL to browse some sample stories.

**Storybook v2.x migration note**: If you're using Storybook v2.x and want to shift to 3.x version the easiest way is:

```sh
npm i -g @storybook/cli
cd my-storybook-v2-app
getstorybook
```

It runs a codemod to update all package names. Read all migration details in our [Migration Guide](MIGRATION.md)

For full documentation on using Storybook visit: [storybook.js.org](https://storybook.js.org)
Expand Down
4 changes: 2 additions & 2 deletions addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "3.1.9",
"version": "3.2.0-alpha.8",
"description": "Action Logger addon for storybook",
"keywords": [
"storybook"
Expand All @@ -21,7 +21,7 @@
"storybook": "start-storybook -p 9001"
},
"dependencies": {
"@storybook/addons": "^3.1.6",
"@storybook/addons": "^3.2.0-alpha.8",
"deep-equal": "^1.0.1",
"json-stringify-safe": "^5.0.1",
"prop-types": "^15.5.10",
Expand Down
2 changes: 1 addition & 1 deletion addons/centered/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-centered",
"version": "3.1.9",
"version": "3.2.0-alpha.8",
"description": "Storybook decorator to center components",
"license": "MIT",
"author": "Muhammed Thanish <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions addons/comments/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-comments",
"version": "3.1.9",
"version": "3.2.0-alpha.8",
"description": "Comments addon for Storybook",
"keywords": [
"storybook"
Expand All @@ -23,7 +23,7 @@
"storybook-remote": "start-storybook -p 3006"
},
"dependencies": {
"@storybook/addons": "^3.1.6",
"@storybook/addons": "^3.2.0-alpha.8",
"babel-runtime": "^6.23.0",
"deep-equal": "^1.0.1",
"events": "^1.1.1",
Expand Down
4 changes: 2 additions & 2 deletions addons/events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-events",
"version": "3.1.9",
"version": "3.2.0-alpha.8",
"description": "Add events to your Storybook stories.",
"keywords": [
"addon",
Expand All @@ -20,7 +20,7 @@
"storybook": "start-storybook -p 6006"
},
"dependencies": {
"@storybook/addons": "^3.1.6",
"@storybook/addons": "^3.2.0-alpha.8",
"babel-runtime": "^6.23.0",
"format-json": "^1.0.3",
"prop-types": "^15.5.10",
Expand Down
7 changes: 4 additions & 3 deletions addons/info/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-info",
"version": "3.1.9",
"version": "3.2.0-alpha.8",
"description": "A Storybook addon to show additional information for your stories.",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -14,12 +14,13 @@
"storybook": "start-storybook -p 9010"
},
"dependencies": {
"@storybook/addons": "^3.1.6",
"@storybook/addons": "^3.2.0-alpha.8",
"babel-runtime": "^6.23.0",
"global": "^4.3.2",
"marksy": "^2.0.0",
"prop-types": "^15.5.10",
"react-addons-create-fragment": "^15.5.3"
"react-addons-create-fragment": "^15.5.3",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"git-url-parse": "^6.2.2",
Expand Down
15 changes: 11 additions & 4 deletions addons/info/src/components/PropVal.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,16 @@ export default function PropVal(props) {
);
}

PropVal.defaultProps = {
val: null,
maxPropObjectKeys: 3,
maxPropArrayLength: 3,
maxPropStringLength: 50,
};

PropVal.propTypes = {
val: PropTypes.any.isRequired, // eslint-disable-line
maxPropObjectKeys: PropTypes.number.isRequired,
maxPropArrayLength: PropTypes.number.isRequired,
maxPropStringLength: PropTypes.number.isRequired,
val: PropTypes.any, // eslint-disable-line
maxPropObjectKeys: PropTypes.number,
maxPropArrayLength: PropTypes.number,
maxPropStringLength: PropTypes.number,
};
96 changes: 52 additions & 44 deletions addons/info/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React from 'react';
import deprecate from 'util-deprecate';
import _Story from './components/Story';
import { H1, H2, H3, H4, H5, H6, Code, P, UL, A, LI } from './components/markdown';

function addonCompose(addonFn) {
return storyFn => context => addonFn(storyFn, context);
}

export const Story = _Story;

const defaultOptions = {
Expand Down Expand Up @@ -29,59 +34,62 @@ const defaultMarksyConf = {
ul: UL,
};

export default {
addWithInfo(storyName, info, storyFn, _options) {
if (typeof storyFn !== 'function') {
if (typeof info === 'function') {
export function addInfo(storyFn, context, info, _options) {
if (typeof storyFn !== 'function') {
if (typeof info === 'function') {
_options = storyFn; // eslint-disable-line
storyFn = info; // eslint-disable-line
info = ''; // eslint-disable-line
} else {
throw new Error('No story defining function has been specified');
}
} else {
throw new Error('No story defining function has been specified');
}
}

const options = {
...defaultOptions,
..._options,
};
const options = {
...defaultOptions,
..._options,
};

// props.propTables can only be either an array of components or null
// propTables option is allowed to be set to 'false' (a boolean)
// if the option is false, replace it with null to avoid react warnings
if (!options.propTables) {
options.propTables = null;
}
// props.propTables can only be either an array of components or null
// propTables option is allowed to be set to 'false' (a boolean)
// if the option is false, replace it with null to avoid react warnings
if (!options.propTables) {
options.propTables = null;
}

const marksyConf = { ...defaultMarksyConf };
if (options && options.marksyConf) {
Object.assign(marksyConf, options.marksyConf);
}
const marksyConf = { ...defaultMarksyConf };
if (options && options.marksyConf) {
Object.assign(marksyConf, options.marksyConf);
}
const props = {
info,
context,
showInline: Boolean(options.inline),
showHeader: Boolean(options.header),
showSource: Boolean(options.source),
propTables: options.propTables,
propTablesExclude: options.propTablesExclude,
styles: typeof options.styles === 'function' ? options.styles : s => s,
marksyConf,
maxPropObjectKeys: options.maxPropObjectKeys,
maxPropArrayLength: options.maxPropArrayLength,
maxPropsIntoLine: options.maxPropsIntoLine,
maxPropStringLength: options.maxPropStringLength,
};
return (
<Story {...props}>
{storyFn(context)}
</Story>
);
}

return this.add(storyName, context => {
const props = {
info,
context,
showInline: Boolean(options.inline),
showHeader: Boolean(options.header),
showSource: Boolean(options.source),
propTables: options.propTables,
propTablesExclude: options.propTablesExclude,
styles: typeof options.styles === 'function' ? options.styles : s => s,
marksyConf,
maxPropObjectKeys: options.maxPropObjectKeys,
maxPropArrayLength: options.maxPropArrayLength,
maxPropsIntoLine: options.maxPropsIntoLine,
maxPropStringLength: options.maxPropStringLength,
};
export const withInfo = (info, _options) =>
Copy link
Member

Choose a reason for hiding this comment

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

addonCompose((storyFn, context) => addInfo(storyFn, context, info, _options));

return (
<Story {...props}>
{storyFn(context)}
</Story>
);
});
},
export default {
addWithInfo: deprecate(function addWithInfo(storyName, info, storyFn, _options) {
return this.add(storyName, withInfo(info, _options)(storyFn));
}, '@storybook/addon-info .addWithInfo() addon is deprecated, use withInfo() from the same package instead. \nSee https://github.com/storybooks/storybook/tree/master/addons/info'),
};

export function setDefaults(newDefaults) {
Expand Down
59 changes: 59 additions & 0 deletions addons/info/src/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* global document */

import React from 'react';
import ReactDOM from 'react-dom';
import AddonInfo, { withInfo, setDefaults, addInfo } from './';

/* eslint-disable */
const TestComponent = ({ func, obj, array, number, string, bool, empty }) =>
<div>
<h1>{func}</h1>
<h2>{obj.toString()}</h2>
<h3>{array}</h3>
<h4>{number}</h4>
<h5>{string}</h5>
<h6>{bool}</h6>
<p>{empty}</p>
<a href="#">test</a>
<code>storiesOf</code>
<ui>
<li>1</li>
<li>2</li>
</ui>
</div>;
/* eslint-enable */

const testContext = { kind: 'addon_info', story: 'jest_test' };
const testOptions = { propTables: false };

describe('addon Info', () => {
const story = context =>
<div>
It's a {context.story} story:
<TestComponent
func={x => x + 1}
obj={{ a: 'a', b: 'b' }}
array={[1, 2, 3]}
number={7}
string={'seven'}
bool
/>
</div>;
const api = {
add: (name, fn) => fn(testContext),
};
it('should render <Info /> and markdown', () => {
const Info = withInfo(
'# Test story \n## with markdown info \ncontaing **bold**, *cursive* text and `code`'
)(story);
ReactDOM.render(<Info />, document.createElement('div'));
});
it('should render with missed info', () => {
setDefaults(testOptions);
addInfo(null, testContext, story, testOptions);
});
it('should show deprecation warning', () => {
const addWithInfo = AddonInfo.addWithInfo.bind(api);
addWithInfo('jest', story);
});
});
14 changes: 8 additions & 6 deletions addons/knobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Now, write your stories with knobs.

```js
import { storiesOf } from '@storybook/react';
import { withKnobs, text, boolean, number } from '@storybook/addon-knobs';
import { addonKnobs, text, boolean, number } from '@storybook/addon-knobs';

const stories = storiesOf('Storybook Knobs', module);

Expand All @@ -52,14 +52,15 @@ stories.add('with a button', () => (
</button>
))

const options = {};
// Knobs as dynamic variables.
stories.add('as dynamic variables', () => {
stories.add('as dynamic variables', addonKnobs(options)(() => {
const name = text('Name', 'Arunoda Susiripala');
const age = number('Age', 89);

const content = `I am ${name} and I'm ${age} years old.`;
return (<div>{content}</div>);
});
}));
```

You can see your Knobs in a Storybook panel as shown below.
Expand Down Expand Up @@ -233,10 +234,11 @@ const value = date(label, defaultValue);

If you feel like this addon is not performing well enough there is an option to use `withKnobsOptions` instead of `withKnobs`.
Usage:
```

```js
story.addDecorator(withKnobsOptions({
debounce: { wait: number, leading: boolean}, // Same as lodash debounce.
timestamps: true // Doesn't emit events while user is typing.
debounce: { wait: number, leading: boolean}, // Same as lodash debounce.
timestamps: true // Doesn't emit events while user is typing.
}));
```

Expand Down
11 changes: 6 additions & 5 deletions addons/knobs/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "@storybook/addon-knobs",
"version": "3.1.9",
"version": "3.2.0-alpha.8",
"description": "Storybook Addon Prop Editor Component",
"license": "MIT",
"main": "dist/index.js",
"typings": "./storybook-addon-knobs.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/storybooks/storybook.git"
Expand All @@ -16,7 +15,7 @@
"storybook": "start-storybook -p 9010"
},
"dependencies": {
"@storybook/addons": "^3.1.6",
"@storybook/addons": "^3.2.0-alpha.8",
"babel-runtime": "^6.23.0",
"deep-equal": "^1.0.1",
"global": "^4.3.2",
Expand All @@ -26,7 +25,8 @@
"prop-types": "^15.5.10",
"react-color": "^2.11.4",
"react-datetime": "^2.8.10",
"react-textarea-autosize": "^4.3.0"
"react-textarea-autosize": "^4.3.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@types/node": "^7.0.12",
Expand All @@ -37,7 +37,8 @@
"react-dom": "^15.5.4",
"style-loader": "^0.17.0",
"typescript": "^2.2.2",
"typescript-definition-tester": "^0.0.5"
"typescript-definition-tester": "^0.0.5",
Copy link
Member

Choose a reason for hiding this comment

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

do we still need this, now that we have moved the typescript definitions?

"vue": "^2.4.1"
},
"peerDependencies": {
"react": "*",
Expand Down
Loading