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 5.0 #5222

Merged
merged 510 commits into from
Jan 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
510 commits
Select commit Hold shift + click to select a range
87de564
OPTIMIZE treeview state
ndelangen Dec 6, 2018
9f65a57
UPGRADE addon-background usage to use parameters everywhere
ndelangen Dec 6, 2018
e735ede
#3984 clear input when focusing, save on blur, and restores default v…
Jessica-Koch Dec 9, 2018
1b0da95
#3984 change event handler
Jessica-Koch Dec 9, 2018
ba4780d
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 10, 2018
9bfcd1a
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
ndelangen Dec 10, 2018
9eb3cae
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 10, 2018
07bfcc5
#3984 persist keyboard shortcuts, update styles, add success handler
Jessica-Koch Dec 10, 2018
f793237
REFACTOR addon-notes
ndelangen Dec 10, 2018
2fbace1
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
ndelangen Dec 10, 2018
ec82d04
REFACTOR a11y addon && FIX issues with decorators reloading
ndelangen Dec 10, 2018
a1762d7
MODIFY option to use addParameters
ndelangen Dec 10, 2018
2761750
FIX a11y issue
ndelangen Dec 10, 2018
4c5345d
migrated to ts
kroeder Dec 10, 2018
a8bf858
REFACTOR state management
ndelangen Dec 11, 2018
43e3bda
Merge commit '4c5345d15cadb33e0277d399963c27bcee3b7623' into tech/ove…
ndelangen Dec 11, 2018
deb174f
FIX option in story to hide panels
ndelangen Dec 11, 2018
ba3de9b
#3984 reduce code redundancy
Jessica-Koch Dec 11, 2018
22059f9
FIX iframe business, get the iframe once
ndelangen Dec 11, 2018
c066e41
IMPROVE typescript types on addon-notes
ndelangen Dec 11, 2018
ab06d36
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
ndelangen Dec 11, 2018
7d7d21e
WIP
ndelangen Dec 11, 2018
a9d3564
REFACTOR addon-links
ndelangen Dec 12, 2018
63da588
REFACTOR addon-googleAnalytics && ADD error tracking and missing stor…
ndelangen Dec 12, 2018
51c176c
CLEANUP
ndelangen Dec 12, 2018
2fae294
Merge branch 'pr/lifeiscontent/4925' into tech/overhaul-ui
ndelangen Dec 12, 2018
6285702
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 13, 2018
9b229e3
#3984 fix code so that it detcts modifier keys and keypresses
Jessica-Koch Dec 14, 2018
03522a5
#3984 fix pushing duplicate keys
Jessica-Koch Dec 14, 2018
3b7de6d
#3984 fix doubly adding key shortcuts to api
Jessica-Koch Dec 14, 2018
2f0bc49
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 14, 2018
d005878
CMS-19849 refactor shortcuts to depend on arrays to respect ordering
Dec 17, 2018
fe9e681
CMS-19849 add error handling
Dec 17, 2018
9f0a497
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 17, 2018
d7bfb78
FIX some typescript issues
ndelangen Dec 17, 2018
9229165
FIX more typescript things
ndelangen Dec 17, 2018
9a811a4
#3984 fix error when clicking modifiers, adjust styles and fix error …
Jessica-Koch Dec 18, 2018
c6e012e
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 18, 2018
35abf09
FIX linting
ndelangen Dec 18, 2018
e048a7c
FIX more linting && FIX cyclic dependencies
ndelangen Dec 18, 2018
1354b4b
FIX snapshots
ndelangen Dec 18, 2018
0293514
MIGRATE storyshots to use new API with build-in context && update sna…
ndelangen Dec 18, 2018
af4b8d4
FIX tests
ndelangen Dec 18, 2018
656ba78
Not particularly successful attemps to get panel test passing
Dec 19, 2018
68f62c0
Remove deprecated URL APIs as they will no longer work
Dec 19, 2018
b5c2b95
FIX tests
ndelangen Dec 19, 2018
deade9d
FIX tests
ndelangen Dec 19, 2018
ee4e696
FIX tests
ndelangen Dec 19, 2018
0ddb2db
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
ndelangen Dec 19, 2018
f1d76a8
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 19, 2018
450c3a3
FIX random emotion issue by updating version
tmeasday Dec 20, 2018
b89a143
Revert "Remove deprecated URL APIs as they will no longer work"
tmeasday Dec 20, 2018
f080c5e
Merge 4848-new-example-format into tech/overhaul-ui
tmeasday Dec 20, 2018
9b2e424
Fix up parameters examples
tmeasday Dec 20, 2018
e8dc531
Change .examples -> .stories
tmeasday Dec 20, 2018
77afeea
Added a test for url module
tmeasday Dec 20, 2018
a2a1fe3
Added a test for queryParams ?
tmeasday Dec 20, 2018
ffcf018
Added tests for stories core api
tmeasday Dec 20, 2018
24d3163
#3984 fix tests
Jessica-Koch Dec 20, 2018
7513450
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
Jessica-Koch Dec 20, 2018
4707a26
Added `selectStory` test
tmeasday Dec 20, 2018
45ef6a8
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 20, 2018
3f4a31b
remove getUrlData
tmeasday Dec 20, 2018
53c727c
FIX up core/stories.js and tests
tmeasday Dec 20, 2018
7e6f5f7
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 20, 2018
f2e8263
FIX lockfile && FIX snapshots
ndelangen Dec 20, 2018
20ba220
FIX storyshots
ndelangen Dec 20, 2018
1c899c9
FIX storyshots
ndelangen Dec 20, 2018
d353b9f
Use module.hot.dispose to do previousExports.
tmeasday Dec 21, 2018
204b205
Support legacy query params in url.js
tmeasday Dec 21, 2018
c8cf226
Added new id generation code
tmeasday Dec 21, 2018
2f45912
Use id to route legacy urls
tmeasday Dec 21, 2018
38f6210
Fix up stories to use new componentId
tmeasday Dec 21, 2018
6e1bed8
Got url tests passing
tmeasday Dec 21, 2018
dbbd061
Added id to storystore
tmeasday Dec 21, 2018
0d7d8d2
Use new storyId format for story_store
tmeasday Dec 21, 2018
279d764
Change `componentId` => `storyId`
tmeasday Dec 21, 2018
a9e4399
Fix tests
tmeasday Dec 21, 2018
751b847
FIX tests
ndelangen Dec 21, 2018
464a743
FIX tests
ndelangen Dec 21, 2018
72df955
FIX tests
ndelangen Dec 21, 2018
037eb83
FIX tests
ndelangen Dec 21, 2018
18c6333
FIX tests
ndelangen Dec 21, 2018
337cc2b
FIX tests
ndelangen Dec 21, 2018
3aa88f9
FIX tests
ndelangen Dec 21, 2018
2afab93
FIX tests
ndelangen Dec 21, 2018
f55a605
REMOVE tests, as it's no longer implemented here, instead in channel
ndelangen Dec 21, 2018
02b368a
FIX tests
ndelangen Dec 21, 2018
27be672
REMOVE test that is essentially a duplicate of our story
ndelangen Dec 21, 2018
362e41b
CLEANUP
ndelangen Dec 21, 2018
8f895f3
CHANGE to use yarn everywhere
ndelangen Dec 21, 2018
2bb5172
FIX first-child issue && ADD new Heading type
ndelangen Dec 21, 2018
a600edb
FIX snapshots
ndelangen Dec 21, 2018
a2a7823
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 21, 2018
e14315e
FIX linting
ndelangen Dec 21, 2018
810e24e
FIX lockfile for docs
ndelangen Dec 21, 2018
55db5a3
Merge pull request #4927 from storybooks/core/remove-basic-config
ndelangen Dec 21, 2018
0e905b5
REMOVE a ton of cruft from snapshots (reset & divs)
ndelangen Dec 21, 2018
0534738
REMOVE emotion from snapshots, as they become too big, and they provi…
ndelangen Dec 21, 2018
28a50f4
FIX tests
ndelangen Dec 21, 2018
40b515f
#3984 create success and failure error messages
Jessica-Koch Dec 22, 2018
b52531e
#3984 add submit actions to tab and enter keys as well as reimplement…
Jessica-Koch Dec 24, 2018
547e124
Merge branch 'tech/overhaul-ui' into tech/overhaul-ui-new-story-format
ndelangen Dec 24, 2018
66bd01a
Merge pull request #5058 from storybooks/tech/overhaul-ui-new-story-f…
ndelangen Dec 24, 2018
ff46acb
Merge branch '5.0.0' into tech/overhaul-ui
ndelangen Dec 24, 2018
0c400dd
FIX reset
ndelangen Dec 24, 2018
cde44cb
FIX color after reset fix
ndelangen Dec 24, 2018
0e978e2
REFACTOR to Typography component
ndelangen Dec 24, 2018
a567b5d
ADD parent field to story_store data
Dec 26, 2018
6ac24f3
Use parent field for treeview utils
Dec 26, 2018
75306ba
CLEANUP && FIX Tabs
ndelangen Dec 27, 2018
429fcc1
Merge branch 'next' into 5.0.0
ndelangen Dec 27, 2018
ad16519
Merge branch '5.0.0' into tech/overhaul-ui
ndelangen Dec 27, 2018
15fc398
RENAME Link to link
ndelangen Dec 27, 2018
4ad2bcf
Merge branch 'next' into 5.0.0
ndelangen Dec 27, 2018
934aaf1
Merge branch '5.0.0' into tech/overhaul-ui
ndelangen Dec 27, 2018
f2fd91d
FIX gap in layout && FIX lib/addons
ndelangen Dec 27, 2018
0093826
FIX arrow keys shortcuts
ndelangen Dec 27, 2018
19ab87f
FIX filter disappear when 0 results
ndelangen Dec 27, 2018
05f0ca1
#3984 shortcuts are limited to 3 characters
Jessica-Koch Dec 28, 2018
6b34fa4
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
Jessica-Koch Dec 28, 2018
2593256
FIX layout events handling
ndelangen Dec 29, 2018
8e5b94d
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
ndelangen Dec 29, 2018
53a51b2
REMOVE scrollbar in tabs list
ndelangen Dec 29, 2018
6c9e73e
CLEANUP deprecated APIs
ndelangen Dec 29, 2018
1eef24f
RENAME selectedAddonPanel to selectedPanel
ndelangen Dec 29, 2018
0b70afd
FIX snapshots
ndelangen Dec 29, 2018
552d64b
FIX parameter merging
ndelangen Dec 29, 2018
e0dee7e
FIX skipping tests feature in storyshots
ndelangen Dec 29, 2018
1a271ba
IMPROVE warnings
ndelangen Dec 29, 2018
7f5d1e8
CHANGE core event names to uppercase && OPTIMISE app render
ndelangen Dec 29, 2018
673f015
Merge remote-tracking branch 'origin/tech/overhaul-ui' into tech/over…
Dec 30, 2018
020d02e
#3984 merge conflict
Jessica-Koch Dec 30, 2018
58adafe
#3984 remove hidden input field
Jessica-Koch Dec 30, 2018
ead61d8
Use correct prop in explorer.js
Dec 31, 2018
5ecc23e
Fix up key warning in addons panel
Dec 31, 2018
16bc330
Add notifications API
Dec 31, 2018
516693d
More useful error
Dec 31, 2018
aa64e3b
Revert "Use correct prop in explorer.js"
Dec 31, 2018
c4bd65c
Clear the update notification when the about page renders
Dec 31, 2018
b5e8125
Allow adding notifications
Dec 31, 2018
9b4b892
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
Jessica-Koch Dec 31, 2018
4409700
#3984 remove unnecessary console statements
Jessica-Koch Jan 2, 2019
1580b5e
Add versions module and use it to set the versions notification
Jan 1, 2019
6c127f9
Get version for about page from store
Jan 1, 2019
7faeba6
#3984 add more test
Jessica-Koch Jan 3, 2019
075e3ab
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
Jessica-Koch Jan 3, 2019
2f7f5f4
Add API for getting latest/current version
Jan 3, 2019
a6173bf
Only highlight the menu button if there's a version update
Jan 3, 2019
66c5c90
Merge remote-tracking branch 'origin/tech/overhaul-ui' into tech/over…
Jan 3, 2019
20d14ab
Final couple that I missed
Jan 3, 2019
85182cd
Merge pull request #5072 from storybooks/tech/overhaul-ui-new-storyId
Jan 3, 2019
d73653d
FIX grid
ndelangen Jan 3, 2019
93a193b
Merge tech/overhaul-ui
ndelangen Jan 3, 2019
2297ca8
Merge branch 'next' into 5.0.0
ndelangen Jan 3, 2019
a00419b
Merge branch '5.0.0' into tech/overhaul-ui
ndelangen Jan 3, 2019
4022285
UPGRADE dependencies
ndelangen Jan 3, 2019
d9f3043
FIX snapshots
ndelangen Jan 3, 2019
41cc707
REFACTOR story_store
ndelangen Jan 3, 2019
02bf47f
IMPROVE jest.init so it filters some errors (not failing a test over …
ndelangen Jan 3, 2019
08017ca
Merge branch 'next' into 5.0.0
ndelangen Jan 4, 2019
3540112
Merge branch '5.0.0' into tech/overhaul-ui
ndelangen Jan 4, 2019
63d574b
FIX story_store tests
ndelangen Jan 4, 2019
009bc8d
Use version endpoint to get version info
Jan 5, 2019
cf390de
Handle missing latest version on about pages
Jan 5, 2019
7cacf4b
Fix stories tests
Jan 6, 2019
a199a42
Merge branch 'next' into 5.0.0
ndelangen Jan 7, 2019
2178a07
Merge branch '5.0.0' into tech/overhaul-ui
ndelangen Jan 7, 2019
ea04c1f
Simplify treeview a little and handle input prop changes
Jan 7, 2019
648113b
Merge pull request #5163 from storybooks/tmeasday/fix-treeview-reacti…
ndelangen Jan 7, 2019
4139419
Merge branch 'next' into 5.0.0
ndelangen Jan 7, 2019
b64a083
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
ndelangen Jan 7, 2019
75d9cf5
Merge branch '5.0.0' into tech/overhaul-ui
ndelangen Jan 7, 2019
d019636
Merge remote-tracking branch 'origin/next' into 5.0.0
Jan 8, 2019
b4134e5
Merge remote-tracking branch 'origin/tech/overhaul-ui' into 5.0.0
Jan 8, 2019
b701636
Some hackery to get the thing building cc @shilman
Jan 8, 2019
5c55dd5
Fix merge conflict with core-events
Jan 8, 2019
5cfd3c8
Fix issue with core-events
Jan 8, 2019
5c3df97
REMOVE unnecessary log
Jan 8, 2019
f0bb686
FIX navigation to the first story
Jan 8, 2019
a36aa83
Linting
Jan 8, 2019
2622e9a
Fix issue with treeview not getting correct parents
Jan 8, 2019
9cdfcdf
add keycode values and move to typescript
Jessica-Koch Jan 9, 2019
235b206
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
Jessica-Koch Jan 9, 2019
9cab570
add scancode file and fix declared type for channel
Jessica-Koch Jan 9, 2019
a5c0981
Updated storyshots
Jan 9, 2019
123470f
Merge branch 'tech/overhaul-ui' into 5.0.0
Jan 9, 2019
ad1a679
FIX dll not building with .ts reference
Jan 9, 2019
0417b1b
Fix start tests
Jan 9, 2019
34ef10f
Don't require a channel from storystore
Jan 9, 2019
207598a
v5.0.0-debug.1
shilman Jan 9, 2019
b252b50
Merge changes from next into 5.0
shilman Jan 9, 2019
c45e03d
Update yarn.lock
shilman Jan 9, 2019
72f0387
Merge branch '5.0.0' into release/5.0
Jan 10, 2019
27b9e3a
Sort of fix broken merge
Jan 10, 2019
d7ee435
Update some snapshots
Jan 10, 2019
225c4be
Revert "add scancode file and fix declared type for channel"
Jan 10, 2019
0edfb66
Revert accidentally committed files from 9cab57050542c379ea42b29aeab4…
Jan 10, 2019
c7c9ccf
This test appears to be out-of-date
Jan 10, 2019
be8a0f4
Fix client-logger test
Jan 10, 2019
c0b5372
Don't push stories to the manager if there is no channel
Jan 10, 2019
c635ef5
Proptypes check doesn't work with memo component.
Jan 10, 2019
f8923c0
More storyshots
Jan 10, 2019
0015fb7
Sort out propTypes for desktop
Jan 10, 2019
ed3ab9a
FIX small issues with localstorage
Jan 10, 2019
60ee494
FIX failure to pass location
Jan 10, 2019
9076340
Fix merge issue with addons/a11y
Jan 10, 2019
50b9dc6
Format version info with markdown
Jan 10, 2019
e3f227c
Export core events constants as named exports
Jan 8, 2019
a5cb9db
PropTypes fix
Jan 10, 2019
5549c05
Add a tsconfig for `lib/ui`
Jan 10, 2019
6f8bbf2
can bootstrap again
Jessica-Koch Jan 10, 2019
331b92b
Update preact kitchen sink config to new format
Jan 10, 2019
6630dfc
Sort out image snapshot tests
Jan 10, 2019
b6cc504
Fix failing links tests
shilman Jan 10, 2019
6ada520
Decouple addon-links from emotion (which requires React 16.x)
shilman Jan 10, 2019
ac7346b
Fix failing addon-links tests
shilman Jan 10, 2019
3bb9606
Merge pull request #5205 from storybooks/5198-fix-links
Jan 11, 2019
9f5affc
Comment out story that fails in Chromatic
Jan 11, 2019
5039e67
Lots of props / linting fixes
Jan 11, 2019
646202f
Missed this in linting
Jan 11, 2019
30228fa
Fix versions test by mocking package.json
Jan 11, 2019
fe4ab61
This propType was wrong
Jan 11, 2019
abf5744
fix shortcut tests
Jessica-Koch Jan 11, 2019
c26e577
Updated snapshots for links and about page
Jan 11, 2019
cc3056a
Deprecate onStory
shilman Jan 11, 2019
4f1ec36
Restore functionality to puppeteer URL + FIX tests
Jan 11, 2019
c8d1af3
Simplify knobs panel logic
shilman Jan 11, 2019
916bf0c
Fixup start tests
Jan 11, 2019
eb1212a
Support knob query parameters
shilman Jan 11, 2019
e99909c
Fix linting on preact files
Jan 11, 2019
2a5904f
Get knobs tests passing
shilman Jan 11, 2019
97ae293
Merge branch 'release/5.0' into 5196-fix-knobs
shilman Jan 11, 2019
6ed78f0
Fix anglurshots snapshots
shilman Jan 11, 2019
053e07b
Fix cra storyshots
shilman Jan 11, 2019
44856ff
Merge pull request #5219 from storybooks/5196-fix-knobs
Jan 11, 2019
f0217c1
Merge branch 'release/5.0' into 5.0-update-from-next
shilman Jan 12, 2019
3e5f07c
Update yarn.lock
shilman Jan 12, 2019
93a8723
Fix package versions
shilman Jan 12, 2019
fd996bb
Update webpack for 5.0
shilman Jan 12, 2019
c97e5a7
Merge pull request #5195 from storybooks/5.0-update-from-next
shilman Jan 12, 2019
7d7fcb3
v5.0.0-debug.2
shilman Jan 12, 2019
598ce9a
Merge branch 'release/5.0' of github.com:storybooks/storybook into re…
shilman Jan 12, 2019
b52822a
Update versions?
shilman Jan 12, 2019
7e9669a
v5.0.0-debug.3
shilman Jan 12, 2019
01f4b88
Merge branch 'next' into release/5.0
shilman Jan 13, 2019
96a484c
Move keyboard utils - shouldn't import from src
shilman Jan 13, 2019
407a542
Fix bad merge
shilman Jan 13, 2019
8bec7e4
Try to fix storyshots
shilman Jan 13, 2019
05f771b
Fix broken smoke test
shilman Jan 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 6 additions & 4 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ module.exports = {
'@babel/preset-flow',
],
plugins: [
'babel-plugin-emotion',
'babel-plugin-macros',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-syntax-dynamic-import',
['@babel/plugin-proposal-class-properties', { loose: true }],
'babel-plugin-add-react-displayname',
'babel-plugin-macros',
['emotion', { sourceMap: true, autoLabel: true }],
],
env: {
test: {
Expand Down
68 changes: 17 additions & 51 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const error = 2;
const warn = 1;
const ignore = 0;

module.exports = {
root: true,
extends: [
Expand All @@ -11,37 +10,18 @@ module.exports = {
'prettier',
'prettier/react',
],
plugins: ['prettier', 'jest', 'import', 'react', 'jsx-a11y', 'json'],
plugins: ['prettier', 'jest', 'import', 'react', 'jsx-a11y', 'json', 'html'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 8,
sourceType: 'module',
},
env: {
es6: true,
node: true,
'jest/globals': true,
},
parserOptions: { ecmaVersion: 8, sourceType: 'module' },
env: { es6: true, node: true, 'jest/globals': true },
settings: {
'import/core-modules': ['enzyme'],
'import/ignore': ['node_modules\\/(?!@storybook)'],
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
'import/resolver': { node: { extensions: ['.js', '.ts'] } },
'html/html-extensions': ['.html'],
},
rules: {
'prettier/prettier': [
warn,
{
printWidth: 100,
tabWidth: 2,
bracketSpacing: true,
trailingComma: 'es5',
singleQuote: true,
},
],
'prettier/prettier': [warn],
'no-debugger': process.env.NODE_ENV === 'production' ? error : ignore,
'class-methods-use-this': ignore,
'import/extensions': [
Expand Down Expand Up @@ -91,6 +71,7 @@ module.exports = {
allowBind: true,
},
],
'jsx-a11y/accessible-emoji': ignore,
'jsx-a11y/label-has-associated-control': [
warn,
{
Expand All @@ -101,46 +82,31 @@ module.exports = {
},
],
'react/no-unescaped-entities': ignore,
'jsx-a11y/label-has-for': [
error,
{
required: {
some: ['nesting', 'id'],
},
},
],
'jsx-a11y/label-has-for': [error, { required: { some: ['nesting', 'id'] } }],
'jsx-a11y/anchor-is-valid': [
error,
{
components: ['RoutedLink', 'MenuLink', 'LinkTo', 'Link'],
components: ['A', 'LinkTo', 'Link'],
specialLink: ['overrideParams', 'kind', 'story', 'to'],
},
],
'no-underscore-dangle': [
error,
{
allow: ['__STORYBOOK_CLIENT_API__', '__STORYBOOK_ADDONS_CHANNEL__'],
},
{ allow: ['__STORYBOOK_CLIENT_API__', '__STORYBOOK_ADDONS_CHANNEL__'] },
],
},
overrides: [
{
files: ['**/__tests__/**', '**/*.test.js/**'],
files: [
'**/__tests__/**',
'**/*.test.js/**',
'**/*.stories.js',
'**/storyshots/**/stories/**',
],
rules: {
'import/no-extraneous-dependencies': ignore,
},
},
{
files: ['**/react-native*/**', '**/REACT_NATIVE*/**', '**/crna*/**'],
rules: {
'jsx-a11y/accessible-emoji': ignore,
},
},
{
files: '**/.storybook/config.js',
rules: {
'global-require': ignore,
},
},
{ files: '**/.storybook/config.js', rules: { 'global-require': ignore } },
],
};
8 changes: 1 addition & 7 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ HMR
Redux
storybook-ui
react-komposer
redux
serializable
params
- addons/actions/node_modules/@storybook/addons/README.md
README.md
storybooks.js.org
- addons/actions/node_modules/asap/README.md
YuzuJS
setImmediate
Malte
Expand All @@ -78,15 +76,11 @@ Katić
Domenic
Kowal
Zakas
- addons/actions/node_modules/balanced-match/README.md
Gruber
julian
juliangruber.com
- addons/actions/node_modules/brace-expansion/README.md
Schlueter
- addons/links/README.md
linkTo
- lib/ui/README.md
setOptions
setStories
onStory
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ First we are going to install storybook, then we are going to link `@storybook/r

#### Verify your local version is working

You should now have a working storybook dev environment up and running. To verify this you can make changes to the following file:
You should now have a working storybook dev environment up and running.

`open app/react/src/client/manager/preview.js`
> TODO: update this section (is already incorrect)

Save and go to `http://localhost:9009` (or wherever storybook is running)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
Expand Down
8 changes: 4 additions & 4 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ Also read on if you're using `addon-knobs`: we advise an update to your code for

This affects you if you don't use babel in your project. You may need to add `babel-core` as dev dependency:

```
npm install --save-dev babel-core
```sh
yarn add babel-core --dev
```

This was done to support different major versions of babel.
Expand Down Expand Up @@ -276,7 +276,7 @@ In the case of Angular: `import { ... } from '@storybook/addon-knobs/angular';`
TypeScript users: we've moved the rest of our addons type definitions into [DefinitelyTyped](http://definitelytyped.org/). Starting in 3.2.0 make sure to use the right addons types:

```sh
npm install @types/storybook__addon-notes @types/storybook__addon-options @types/storybook__addon-knobs @types/storybook__addon-links --save-dev
yarn add @types/storybook__addon-notes @types/storybook__addon-options @types/storybook__addon-knobs @types/storybook__addon-links --dev
```

See also [TypeScript definitions in 3.1.x](#moved-typescript-definitions).
Expand Down Expand Up @@ -309,7 +309,7 @@ It's not beautiful, but we'll be adding a more convenient/idiomatic way of using
TypeScript users: we are in the process of moving our typescript definitions into [DefinitelyTyped](http://definitelytyped.org/). If you're using TypeScript, starting in 3.1.0 you need to make sure your type definitions are installed:

```sh
npm install @types/node @types/react @types/storybook__react --save-dev
yarn add @types/node @types/react @types/storybook__react --dev
```

### Deprecated head.html
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,16 @@ If you're looking for material to use in your presentation about storybook, like

## Contributing

[![Good First Issue](https://img.shields.io/github/issues/storybooks/storybook/good%20first%20issue.svg)](https://github.com/storybooks/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)

We welcome contributions to Storybook!

- Pull requests and Stars are always welcome.
- 📥 Pull requests and 🌟 Stars are always welcome.
- Read our [contributing guide](CONTRIBUTING.md) to get started.
or find us on [Discord](https://discord.gg/sMFvFsG), we're will take the time to guide you

Looking for a first issue to tackle?

- We tag issues with [![Good First Issue](https://img.shields.io/github/issues/storybooks/storybook/good%20first%20issue.svg)](https://github.com/storybooks/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) when we think they are well suited for people who are new to the codebase or OSS in general.
- [Talk to us](https://discord.gg/sMFvFsG), we'll find something to suits your skills and learning interest.

### Development scripts

Expand Down
55 changes: 19 additions & 36 deletions addons/a11y/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This storybook addon can be helpful to make your UI components more accessible.
First, install the addon.

```sh
$ npm install -D @storybook/addon-a11y
$ yarn add @storybook/addon-a11y --dev
```

Add this line to your `addons.js` file (create this file inside your storybook config directory if needed).
Expand All @@ -20,16 +20,18 @@ Add this line to your `addons.js` file (create this file inside your storybook c
import '@storybook/addon-a11y/register';
```

import the `'checkA11y'` decorator to check your stories for violations within your components.
import the `withA11Y` decorator to check your stories for violations within your components.

```js
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withA11Y } from '@storybook/addon-a11y';

import { checkA11y } from '@storybook/addon-a11y';
// should only be added once
// best place is in config.js
addDecorator(withA11Y)

storiesOf('button', module)
.addDecorator(checkA11y)
.add('Accessible', () => (
<button>
Accessible button
Expand All @@ -42,60 +44,41 @@ storiesOf('button', module)
));
```

For more customizability. Use the `'configureA11y'` function to configure [aXe options](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure).
For more customizability. Use the `addParameters` function to configure [aXe options](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure).
You can override these options at story level too.

```js
import React from 'react';
import { storiesOf } from '@storybook/react';

import { checkA11y, configureA11y } from '@storybook/addon-a11y';
import { storiesOf, addDecorator, addParameters } from '@storybook/react';

// axe options
const whateverOptionsYouWant = {};
import { withA11Y } from '@storybook/addon-a11y';

// optional element id for axe context
const contextElementId = '';
addDecorator(withA11Y)
addParameters({
a11y: {
// ... axe options
element: '#root', // optional selector which element to inspect
},
});

configureA11y(whateverOptionsYouWant, contextElementId);

storiesOf('button', module)
.addDecorator(checkA11y)
.add('Accessible', () => (
<button>
<button style={{ backgroundColor: 'black', color: 'white', }}>
Accessible button
</button>
))
.add('Inaccessible', () => (
<button style={{ backgroundColor: 'red', color: 'darkRed', }}>
<button style={{ backgroundColor: 'black', color: 'black', }}>
Inaccessible button
</button>
));
```

If you want to add a11y globally to your stories, you can use the global Storybook decorator in your *.storybook/config.js* file:

```js
import { configure, addDecorator } from '@storybook/react';
import { checkA11y } from '@storybook/addon-a11y';

// pick all stories.js files within the src/ folder
const req = require.context('../src', true, /stories\.js$/);

addDecorator(checkA11y);

function loadStories() {
req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
```

## Roadmap

* Make UI accessibile
* Add color blindness filters ([Example](http://lowvision.support/))
* Show in story where violations are.
* Make it configurable
* Add more example tests
* Add tests
* Make CI integration possible
1 change: 0 additions & 1 deletion addons/a11y/manager.js

This file was deleted.

24 changes: 12 additions & 12 deletions addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "4.2.0-alpha.11",
"version": "5.0.0-debug.3",
"description": "a11y addon for storybook",
"keywords": [
"a11y",
Expand All @@ -25,19 +25,19 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.2.0-alpha.11",
"@storybook/client-logger": "4.2.0-alpha.11",
"@storybook/components": "4.2.0-alpha.11",
"@storybook/core-events": "4.2.0-alpha.11",
"@emotion/styled": "^10.0.5",
"@storybook/addons": "5.0.0-debug.3",
"@storybook/client-logger": "5.0.0-debug.3",
"@storybook/components": "5.0.0-debug.3",
"@storybook/core-events": "5.0.0-debug.3",
"axe-core": "^3.1.2",
"core-js": "^2.5.7",
"core-js": "^2.6.1",
"global": "^4.3.2",
"prop-types": "^15.6.2"
},
"peerDependencies": {
"react": "*",
"react-dom": "*"
"memoizerific": "^1.11.3",
"prop-types": "^15.6.2",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"util-deprecate": "^1.0.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion addons/a11y/register.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./manager');
require('./dist/register');
Loading