Skip to content

Commit

Permalink
Merge branch 'master' into fix-rn-ws
Browse files Browse the repository at this point in the history
  • Loading branch information
danielduan authored Feb 20, 2018
2 parents f46a637 + 9250e98 commit 2a9e3f1
Show file tree
Hide file tree
Showing 263 changed files with 4,223 additions and 1,883 deletions.
82 changes: 50 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ jobs:
key: core-dependencies-{{ checksum "yarn.lock" }}
paths:
- node_modules
- example/cra-kitchen-sink/node_modules
- example/vue-kitchen-sink/node_modules
- examples/angular-cli/node_modules
- examples/cra-kitchen-sink/node_modules
- examples/official-storybook/node_modules
- examples/polymer-cli/node_modules
- examples/vue-kitchen-sink/node_modules
- save_cache:
name: "Cache core dist"
key: core-dist-{{ .Revision }}
Expand All @@ -54,18 +57,9 @@ jobs:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- run:
name: "Link packages"
command: |
yarn install
- run:
name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
command: sh ./scripts/workaround-puppeteer-issue-290.sh
- run:
name: "Build official-storybook"
command: |
cd examples/official-storybook
yarn build-storybook
- run:
name: "Build react kitchen-sink"
command: |
Expand All @@ -87,20 +81,10 @@ jobs:
cd examples/polymer-cli
yarn build-storybook
- run:
name: "Run react kitchen-sink (smoke test)"
command: |
cd examples/cra-kitchen-sink
yarn storybook --smoke-test
- run:
name: "Run vue kitchen-sink (smoke test)"
command: |
cd examples/vue-kitchen-sink
yarn storybook --smoke-test
- run:
name: "Run angular-cli (smoke test)"
name: "Build official-storybook"
command: |
cd examples/angular-cli
yarn storybook --smoke-test
cd examples/official-storybook
yarn build-storybook
- run:
name: "Visually test storybook"
command: |
Expand All @@ -117,6 +101,44 @@ jobs:
- store_artifacts:
path: examples/official-storybook/image-snapshots/__image_snapshots__
destination: official_storybook_image_snapshots
smoke-tests:
<<: *defaults
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- core-dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}

- run:
name: "Run react kitchen-sink (smoke test)"
command: |
cd examples/cra-kitchen-sink
yarn storybook --smoke-test
- run:
name: "Run vue kitchen-sink (smoke test)"
command: |
cd examples/vue-kitchen-sink
yarn storybook --smoke-test
- run:
name: "Run angular-cli (smoke test)"
command: |
cd examples/angular-cli
yarn storybook --smoke-test
- run:
name: "Run polymer-cli (smoke test)"
command: |
cd examples/polymer-cli
yarn storybook --smoke-test
- run:
name: "Run official-storybook (smoke test)"
command: |
cd examples/official-storybook
yarn storybook --smoke-test
react-native:
<<: *defaults
steps:
Expand Down Expand Up @@ -187,10 +209,6 @@ jobs:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- run:
name: "Link packages"
command: |
yarn install
- run:
name: "Lint"
command: |
Expand All @@ -207,10 +225,6 @@ jobs:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- run:
name: "Link packages"
command: |
yarn install
- run:
name: "Run unit tests"
command: |
Expand Down Expand Up @@ -271,12 +285,16 @@ workflows:
- example-kitchen-sinks:
requires:
- build
- smoke-tests:
requires:
- build
- react-native:
requires:
- build
- docs
- lint:
requires:
- docs
- build
- unit-test:
requires:
Expand Down
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ dist
build
coverage
node_modules
addons/**/example/**
app/**/demo/**
docs/public
lib/cli/test
*.bundle.js
Expand All @@ -13,3 +11,4 @@ lib/cli/test
!.eslintrc.js
!.eslintrc-markdown.js
!.jest.config.js
!.storybook
58 changes: 39 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ const ignore = 0;

module.exports = {
root: true,
extends: ['eslint-config-airbnb', 'plugin:jest/recommended', 'prettier'],
extends: [
'eslint-config-airbnb',
'plugin:jest/recommended',
'plugin:import/react-native',
'prettier',
'prettier/react',
],
plugins: ['prettier', 'jest', 'react', 'json'],
parser: 'babel-eslint',
parserOptions: {
Expand All @@ -25,7 +31,6 @@ module.exports = {
},
},
rules: {
strict: [error, 'never'],
'prettier/prettier': [
warn,
{
Expand All @@ -37,16 +42,13 @@ module.exports = {
},
],
'no-debugger': process.env.NODE_ENV === 'production' ? error : ignore,
quotes: [warn, 'single', { avoidEscape: true }],
'class-methods-use-this': ignore,
'arrow-parens': [warn, 'as-needed'],
'space-before-function-paren': ignore,
'import/no-unresolved': error,
'import/extensions': [
error,
'always',
{
js: 'never',
json: 'always',
ts: 'never',
},
],
'import/no-extraneous-dependencies': [
Expand All @@ -61,6 +63,7 @@ module.exports = {
'**/scripts/*.js',
'**/stories/**/*.js',
'**/__tests__/**/*.js',
'**/.storybook/**/*.js',
],
peerDependencies: true,
},
Expand All @@ -69,24 +72,41 @@ module.exports = {
'import/default': error,
'import/named': error,
'import/namespace': error,
'react/jsx-wrap-multilines': ignore,
'react/jsx-indent': ignore,
'react/jsx-indent-props': ignore,
'react/jsx-closing-bracket-location': ignore,
'react/jsx-uses-react': error,
'react/jsx-uses-vars': error,
'react/react-in-jsx-scope': error,
'react/jsx-filename-extension': [
warn,
{
extensions: ['.js', '.jsx'],
},
],
'jsx-a11y/accessible-emoji': ignore,
'jsx-a11y/href-no-hash': ignore,
'jsx-a11y/label-has-for': ignore,
'jsx-a11y/click-events-have-key-events': error,
'jsx-a11y/anchor-is-valid': [warn, { aspects: ['invalidHref'] }],
'react/no-unescaped-entities': ignore,
'jsx-a11y/label-has-for': [
error,
{
required: {
some: ['nesting', 'id'],
},
},
],
'jsx-a11y/anchor-is-valid': [
error,
{
components: ['RoutedLink', 'MenuLink', 'LinkTo', 'Link'],
specialLink: ['overrideParams', 'kind', 'story', 'to'],
},
],
},
overrides: [
{
files: ['**/react-native*/**', '**/REACT_NATIVE*/**', '**/crna*/**'],
rules: {
'jsx-a11y/accessible-emoji': ignore,
},
},
{
files: '**/.storybook/config.js',
rules: {
'global-require': ignore,
},
},
],
};
1 change: 1 addition & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ exemptLabels:
- 'do not merge'
- 'needs review'
- 'high priority'
- dependencies:update

# Label to use when marking an issue as stale
staleLabel: inactive
Expand Down
17 changes: 17 additions & 0 deletions ADDONS_SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Addon / Framework Support Table

| |[React](app/react)|[React Native](app/react-native)|[Vue](app/vue)|[Angular](app/angular)| [Polymer](app/polymer)|
| ----------- |:-------:|:-------:|:-------:|:-------:|:-------:|
|[a11y](addons/a11y) |+| | | | |
|[actions](addons/actions) |+|+|+|+|+|
|[background](addons/background)|+| | | | |
|[centered](addons/centered) |+| |+| | |
|[events](addons/events) |+| | | | |
|[graphql](addons/graphql) |+| | | | |
|[info](addons/info) |+| | | | |
|[jest](addons/jest) |+| | | | |
|[knobs](addons/knobs) |+|+|+|+|+|
|[links](addons/links) |+|+|+|+| |
|[notes](addons/notes) |+| |+|+|+|
|[storyshots](addons/storyshots)|+|+|+|+| |
|[viewport](addons/viewport) |+| | | | |
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ In addition to the changes listed here, also contains fixes from [3.3.5](#335) a

#### Bug Fixes

- [app:angular] Fixed dependency injection for components [#2566](https://github.com/storybooks/storybook/pull/2566)
- `app:angular` Fixed dependency injection for components [#2566](https://github.com/storybooks/storybook/pull/2566)
- Revert "Move everything from lodash to lodash-es" [#2591](https://github.com/storybooks/storybook/pull/2591)

#### Maintenance
Expand Down Expand Up @@ -1037,7 +1037,7 @@ We'll do a better job of getting out smaller releases next time around. ;-)
- Added type annotation to helpers, added ts declaration files for angu… [#2459](https://github.com/storybooks/storybook/pull/2459)
- Adding extra metadata to module/components [#2526](https://github.com/storybooks/storybook/pull/2526)
- Fix ng component prop output override [#2456](https://github.com/storybooks/storybook/pull/2456)
- [WIP] Angular versions support [#2467](https://github.com/storybooks/storybook/pull/2467)
- `WIP` Angular versions support [#2467](https://github.com/storybooks/storybook/pull/2467)
- Angular Add custom pipes support [#2518](https://github.com/storybooks/storybook/pull/2518)
- Add angular support: Storybook for Angular [#1474](https://github.com/storybooks/storybook/pull/1474)
- Fix addon Knobs: add array in Object PropTypes [#2227](https://github.com/storybooks/storybook/pull/2227)
Expand Down Expand Up @@ -1294,7 +1294,7 @@ We'll do a better job of getting out smaller releases next time around. ;-)
- Added type annotation to helpers, added ts declaration files for angu… [#2459](https://github.com/storybooks/storybook/pull/2459)
- Adding extra metadata to module/components [#2526](https://github.com/storybooks/storybook/pull/2526)
- Fix ng component prop output override [#2456](https://github.com/storybooks/storybook/pull/2456)
- [WIP] Angular versions support [#2467](https://github.com/storybooks/storybook/pull/2467)
- `WIP` Angular versions support [#2467](https://github.com/storybooks/storybook/pull/2467)
- Angular Add custom pipes support [#2518](https://github.com/storybooks/storybook/pull/2518)

#### Bug Fixes
Expand Down Expand Up @@ -1610,7 +1610,7 @@ We'll do a better job of getting out smaller releases next time around. ;-)
#### Bug Fixes

- Number knob: apply default min/max/step values only in range mode [#2437](https://github.com/storybooks/storybook/pull/2437)
- [addon-actions] Check result of getPropertyDescriptor for IE11 [#2428](https://github.com/storybooks/storybook/pull/2428)
- `addon-actions` Check result of getPropertyDescriptor for IE11 [#2428](https://github.com/storybooks/storybook/pull/2428)
- Edited template of search box result item to fix overflow text in row [#2419](https://github.com/storybooks/storybook/pull/2419)
- Fix missing supported extension check in case when asset is a string [#2468](https://github.com/storybooks/storybook/pull/2468)

Expand Down Expand Up @@ -2654,7 +2654,7 @@ Minor bug fixes and documentation updates post 3.0.0 release.

- Fixed typo in react-native browser instructions [#1189](https://github.com/storybooks/storybook/pull/1189)
- Add instruction for npm install with -D for development dependency [#1168](https://github.com/storybooks/storybook/pull/1168)
- Fix broken link for [addons] in README [#1167](https://github.com/storybooks/storybook/pull/1167)
- Fix broken link for `addons` in README [#1167](https://github.com/storybooks/storybook/pull/1167)
- Refreshed logo in docs [#1149](https://github.com/storybooks/storybook/pull/1149)
- fix addon broken links in documentation [#1165](https://github.com/storybooks/storybook/pull/1165)
- start-storybook cli - expand commands descriptions [#1161](https://github.com/storybooks/storybook/pull/1161)
Expand Down
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ Storybook comes with a lot of [addons](https://storybook.js.org/addons/introduct

- [Getting Started](#getting-started)
- [Projects](#projects)
- [Main Projects](#main-projects)
- [Supported Frameworks](#supported-frameworks)
- [Sub Projects](#sub-projects)
- [Addons](#addons)
- [Live Examples](#live-examples) 💪
- [Contributing](#contributing)
- [Development scripts](#development-scripts)
- [Backers](#backers)
Expand Down Expand Up @@ -64,12 +65,13 @@ For additional help, join us [in our Slack](https://now-examples-slackin-rrirkqo

## Projects

### Main Projects
### Supported Frameworks

- [Storybook for react](app/react) - Storybook for React components
- [Storybook for vue](app/vue) - Storybook for Vue components
- [Storybook for angular](app/angular) - Storybook for Angular components
- [Storybook for react-native](app/react-native) - Storybook for React-Native components
- [React](app/react)
- [React Native](app/react-native)
- [Vue](app/vue)
- [Angular](app/angular)
- [Polymer](app/angular) <sup>alpha</sup>

### Sub Projects

Expand All @@ -88,6 +90,23 @@ For additional help, join us [in our Slack](https://now-examples-slackin-rrirkqo
- [notes](addons/notes/) - Annotate storybook stories with notes
- [options](addons/options/) - Customize the storybook UI in code

See [Addon / Framework Support Table](ADDONS_SUPPORT.md)

## Live Examples

### 3.4.alpha
> Note, this is an Alpha version. Some of the features still might not be released
- [React Official](https://storybooks-official.netlify.com)
- [Vue](https://storybooks-vue.netlify.com/)
- [Angular](https://storybooks-angular.netlify.com/)
- [Polymer](https://storybooks-polymer.netlify.com/)

### 3.3
- [React Official](https://release-3-3--storybooks-official.netlify.com)
- [Vue](https://release-3-3--storybooks-vue.netlify.com/)
- [Angular](https://release-3-3--storybooks-angular.netlify.com/)

## Contributing

We welcome contributions to Storybook!
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ That way you can write your stories how they are best, and preview them how you

We believe in the power of react, and think it's the right choice for a lot of projects.
But it's up to you and your team to decide your stack.
Unfortunately if you choose anything other then React or React-Native you can not use storybook.
Unfortunately if you choose anything not from the list of [supported frameworks](README.md#supported-frameworks) you can not use storybook.

We want you to be able to use storybook with the framework / library of your choice.

Expand Down
Loading

0 comments on commit 2a9e3f1

Please sign in to comment.