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

WIP Tech/overhaul ui #4086

Merged
merged 421 commits into from
Jan 8, 2019
Merged
Changes from all commits
Commits
Show all changes
421 commits
Select commit Hold shift + click to select a range
ab1db54
ADD support for cyclic objects in channel && CLEANUP
ndelangen Oct 19, 2018
51c6abb
capture keypress and render key on screen as well as fix the UI for keys
Jessica-Koch Oct 20, 2018
be2f4ab
add ability to render keyboard shortcuts and set state to new state
Jessica-Koch Oct 22, 2018
31c9f3d
ADD decycling & support for functions, infinity, regex, instanced obj…
ndelangen Oct 22, 2018
651ca3e
IMPLEMENT API V2 && MIGRATE actions to use it && CLEANUP actions to m…
ndelangen Oct 22, 2018
727cfcf
CLEANUP
ndelangen Oct 22, 2018
375e6a6
CLEANUP async addition of stories (still needs a proper api to work w…
ndelangen Oct 22, 2018
6c27512
FIX panels && FIX a few missing key warnings
ndelangen Oct 22, 2018
b7a4686
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
ndelangen Oct 22, 2018
d4fd159
REFACTOR stringify & parse & isJSON into a separate lib
ndelangen Oct 22, 2018
16c3724
MOVE code to separate package (telejson)
ndelangen Oct 22, 2018
554d805
#3984 add tests to key parsing functions
Jessica-Koch Oct 23, 2018
723309e
fix test
Jessica-Koch Oct 23, 2018
91b20fd
Fix issues with notes addon loading
chinchiheather Oct 24, 2018
f905a5b
Set selected state of tab according to route
chinchiheather Oct 24, 2018
2fa8912
Remove mobx in favor of custom store with React context
alexandrebodin Oct 22, 2018
9a53c03
Split manager into more readable modules
alexandrebodin Oct 25, 2018
37bfeda
#3984 keys now appear in the modal
Jessica-Koch Oct 26, 2018
31cf0df
Merge branch 'tech/overhaul-ui' of https://github.com/storybooks/stor…
Jessica-Koch Oct 26, 2018
936705e
#3984 add tests and utiltity function to verify uniqueness of key sho…
Jessica-Koch Oct 27, 2018
ba707f9
#3984 add default props to the keyboard , ability to clear input and…
Jessica-Koch Oct 30, 2018
f4282e5
#3984 consolidate buttons into one button with a case statemnet
Jessica-Koch Oct 31, 2018
71368d2
#3984 add ability to restore defaults, determine who changed the shor…
Jessica-Koch Oct 31, 2018
13781c3
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 8, 2018
fd5c863
FIX versions
ndelangen Nov 8, 2018
35a2728
FIX syntaxhighlighting ( I think v10 is broken release )
ndelangen Nov 8, 2018
e31e90f
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 8, 2018
0e38b7b
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 8, 2018
dbc7d86
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 8, 2018
ce8d306
Merge branch 'tech/overhaul-ui' of https://github.com/storybooks/stor…
Jessica-Koch Nov 9, 2018
313e741
#3984 reduce number of keys and now input sets state, correctly throw…
Jessica-Koch Nov 9, 2018
8b33fe8
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 9, 2018
17b555b
ADD toolbar hotkey
ndelangen Oct 29, 2018
a97ae81
FIX panel selection
ndelangen Nov 9, 2018
57ee1f4
FIX treeview sorting (not sort stories, only groups and roots)
ndelangen Nov 9, 2018
98c2d84
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 9, 2018
de53d2e
#3984 add tests to shortcuts file
Jessica-Koch Nov 10, 2018
d9a6bd4
#3984 save keyboard shortcuts to localstorage
Jessica-Koch Nov 12, 2018
da5cb07
#3984 nav menu changes when local storage items change
Jessica-Koch Nov 12, 2018
e6e2149
#3984 update tests and localstorage mock
Jessica-Koch Nov 12, 2018
4eb4f36
#3984 fix error in restore defaults
Jessica-Koch Nov 12, 2018
bd17cde
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 12, 2018
392f478
Merge branch 'tech/overhaul-ui' of github.com:storybooks/storybook in…
ndelangen Nov 12, 2018
749eeb4
FIX missing keyboard shortcuts on first init
ndelangen Nov 12, 2018
3e9fd24
FIX SafeTab and REFACTOR panelSelection
ndelangen Nov 12, 2018
a6b5506
FIX routing & layout
ndelangen Nov 12, 2018
a91b9be
CLEANUP
ndelangen Nov 14, 2018
bae5a23
FIX issue with knobs and possibly more addons
ndelangen Nov 14, 2018
06dbef4
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 14, 2018
82553f0
FIX babel options for manager, unsure why it's suddenly broken here..
ndelangen Nov 14, 2018
11e173a
FIX mobile viewport
ndelangen Nov 14, 2018
fe0eb14
CHANGE build & dev-serve so both webpack compilation happen in the sa…
ndelangen Nov 14, 2018
38f6f1f
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 15, 2018
c36873c
REFACTOR dev-serve to output less noise
ndelangen Nov 15, 2018
84dd84d
CLEANUP
ndelangen Nov 15, 2018
4c8e7b7
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 15, 2018
db855ec
FIX issues with legacy support of urls && REFACTOR stories api
ndelangen Nov 15, 2018
e25388e
FIX backgrounds addon
ndelangen Nov 15, 2018
628412a
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 16, 2018
bf45f06
Treeview fixes (very un-optimised)
ndelangen Nov 19, 2018
3230164
#3984 add toggle toolbar state
Jessica-Koch Nov 24, 2018
efbf470
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 28, 2018
63a9ac6
Merge branch 'tech/overhaul-ui' of https://github.com/storybooks/stor…
Jessica-Koch Nov 29, 2018
aab7aa2
Merge branch 'next' into tech/overhaul-ui
ndelangen Nov 30, 2018
d2e74b9
CLEANUP babelrc
ndelangen Nov 30, 2018
5f05fe9
CLEANUP manager.context & root component
ndelangen Nov 30, 2018
ad7a379
FIX lockfile
ndelangen Nov 30, 2018
7a41be7
ADD memoization in router for parsing componentParams
ndelangen Nov 30, 2018
ff383c5
WIP - CHANGE dependencies on react & react-dom to regular dependencies
ndelangen Nov 30, 2018
180b5fb
OPTIMIZE the ui
ndelangen Nov 30, 2018
362623c
OPTIMIZE treeview & explorer more
ndelangen Nov 30, 2018
7e52277
OPTIMIZE more treeview & explorer
ndelangen Nov 30, 2018
fe7b28c
#3984 fix linting errors
Jessica-Koch Dec 3, 2018
330a16c
#3984 fix linting errors
Jessica-Koch Dec 3, 2018
b806539
REFACTOR addon-cssresources
ndelangen Dec 4, 2018
4ef4c23
Upgrade emotion@10.0.2
lifeiscontent Dec 5, 2018
efc9e21
Update dependencies for knobs
lifeiscontent Dec 5, 2018
b8be2f4
fix build
lifeiscontent Dec 5, 2018
7c3b15d
CLEANUP && FIX issue if there are no cssresources
ndelangen Dec 5, 2018
3b2aaa6
CLEANUP
ndelangen Dec 5, 2018
f940f87
REFACTOR viewports to use addParameters & only render tool
ndelangen Dec 6, 2018
1ee249f
REFACTOR addon-background
ndelangen Dec 6, 2018
a9ee8a5
Merge branch 'next' into tech/overhaul-ui
ndelangen Dec 6, 2018
b189e7b
FIX lockfile
ndelangen Dec 6, 2018
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
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
ad16519
Merge branch '5.0.0' into tech/overhaul-ui
ndelangen Dec 27, 2018
15fc398
RENAME Link to link
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
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
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
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
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
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
@@ -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: {
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: [
@@ -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': [
@@ -91,6 +71,7 @@ module.exports = {
allowBind: true,
},
],
'jsx-a11y/accessible-emoji': ignore,
'jsx-a11y/label-has-associated-control': [
warn,
{
@@ -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
@@ -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
@@ -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
@@ -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)

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -228,8 +228,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.
@@ -261,7 +261,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).
@@ -294,7 +294,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
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

55 changes: 19 additions & 36 deletions addons/a11y/README.md
Original file line number Diff line number Diff line change
@@ -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).
@@ -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
@@ -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.

14 changes: 7 additions & 7 deletions addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -25,19 +25,19 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@emotion/styled": "^0.10.6",
"@emotion/styled": "^10.0.5",
"@storybook/addons": "4.2.0-alpha.10",
"@storybook/client-logger": "4.2.0-alpha.10",
"@storybook/components": "4.2.0-alpha.10",
"@storybook/core-events": "4.2.0-alpha.10",
"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"
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