Skip to content

Commit 5fcf200

Browse files
committed
Merge remote-tracking branch 'origin/master' into angular-storyshots
# Conflicts: # .editorconfig # addons/storyshots/package.json # examples/angular-cli/package.json # examples/vue-kitchen-sink/package.json # yarn.lock
2 parents d5b30aa + 20af34a commit 5fcf200

File tree

132 files changed

+3142
-569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+3142
-569
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ root = true
33
[*]
44
end_of_line = lf
55

6-
[*.{js,json,ts,vue}]
6+
[*.{js,json,ts,vue,html}]
77
indent_style = space
88
indent_size = 2

CHANGELOG.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,102 @@
1+
# 3.4.0-alpha.4
2+
3+
2018-January-13
4+
5+
Republish `3.4.0-alpha.3` due to potential publishing errors
6+
7+
# 3.4.0-alpha.3
8+
9+
2018-January-13
10+
11+
#### Features
12+
13+
- Polymer 2 support [#2225](https://github.com/storybooks/storybook/pull/2225)
14+
- Add image snapshots to addon-storyshots [#2413](https://github.com/storybooks/storybook/pull/2413)
15+
- Angular template support for Storybook [#2690](https://github.com/storybooks/storybook/pull/2690)
16+
17+
#### Bug Fixes
18+
19+
- Remove polymer-cli dependency [#2741](https://github.com/storybooks/storybook/pull/2741)
20+
- Add scss for components in angular apps by default. [#2703](https://github.com/storybooks/storybook/pull/2703)
21+
22+
#### Maintenance
23+
24+
- Change ng stories dir [#2672](https://github.com/storybooks/storybook/pull/2672)
25+
26+
#### Dependency Upgrades
27+
28+
<details>
29+
<summary>
30+
54 Upgrades
31+
</summary>
32+
33+
- Upgraded `jest-image-snapshot` in `/` from "2.2.1" to "2.3.0" [#2740](https://github.com/storybooks/storybook/pull/2740)
34+
- Upgraded `polymer-webpack-loader` in `app/polymer` from "2.0.0" to "2.0.1" [#2740](https://github.com/storybooks/storybook/pull/2740)
35+
- Upgraded `jest-image-snapshot` in `addons/storyshots` from "2.2.1" to "2.3.0" [#2740](https://github.com/storybooks/storybook/pull/2740)
36+
- Upgraded `shelljs` in `/` from "0.7.8" to "0.8.0" [#2734](https://github.com/storybooks/storybook/pull/2734)
37+
- Upgraded `shelljs` in `addons/links` from "0.7.8" to "0.8.0" [#2734](https://github.com/storybooks/storybook/pull/2734)
38+
- Upgraded `autoprefixer` in `app/react` from "7.2.4" to "7.2.5" [#2734](https://github.com/storybooks/storybook/pull/2734)
39+
- Upgraded `shelljs` in `app/react` from "0.7.8" to "0.8.0" [#2734](https://github.com/storybooks/storybook/pull/2734)
40+
- Upgraded `autoprefixer` in `app/angular` from "7.2.4" to "7.2.5" [#2734](https://github.com/storybooks/storybook/pull/2734)
41+
- Upgraded `shelljs` in `app/angular` from "0.7.8" to "0.8.0" [#2734](https://github.com/storybooks/storybook/pull/2734)
42+
- Upgraded `autoprefixer` in `app/react-native` from "7.2.4" to "7.2.5" [#2734](https://github.com/storybooks/storybook/pull/2734)
43+
- Upgraded `shelljs` in `app/react-native` from "0.7.8" to "0.8.0" [#2734](https://github.com/storybooks/storybook/pull/2734)
44+
- Upgraded `autoprefixer` in `app/vue` from "7.2.4" to "7.2.5" [#2734](https://github.com/storybooks/storybook/pull/2734)
45+
- Upgraded `shelljs` in `app/vue` from "0.7.8" to "0.8.0" [#2734](https://github.com/storybooks/storybook/pull/2734)
46+
- Upgraded `shelljs` in `lib/cli` from "0.7.8" to "0.8.0" [#2734](https://github.com/storybooks/storybook/pull/2734)
47+
- Update gatsby in /docs from 1.9.153 to 1.9.154 [#2733](https://github.com/storybooks/storybook/pull/2733)
48+
- Update @angular/cli in examples/angular-cli from 1.6.3 to 1.6.4 [#2726](https://github.com/storybooks/storybook/pull/2726)
49+
- Upgraded `commander` in `/` from "2.12.2" to "2.13.0" [#2724](https://github.com/storybooks/storybook/pull/2724)
50+
- Upgraded `jest` in `/` from "22.0.5" to "22.0.6" [#2724](https://github.com/storybooks/storybook/pull/2724)
51+
- Upgraded `jest-cli` in `/` from "22.0.5" to "22.0.6" [#2724](https://github.com/storybooks/storybook/pull/2724)
52+
- Upgraded `jest-config` in `/` from "22.0.5" to "22.0.6" [#2724](https://github.com/storybooks/storybook/pull/2724)
53+
- Upgraded `jest-diff` in `/` from "22.0.5" to "22.0.6" [#2724](https://github.com/storybooks/storybook/pull/2724)
54+
- Upgraded `jest-environment-jsdom` in `/` from "22.0.5" to "22.0.6" [#2724](https://github.com/storybooks/storybook/pull/2724)
55+
- Upgraded `jest-jasmine2` in `/` from "22.0.5" to "22.0.6" [#2724](https://github.com/storybooks/storybook/pull/2724)
56+
- Upgraded `nodemon` in `/` from "1.14.10" to "1.14.11" [#2724](https://github.com/storybooks/storybook/pull/2724)
57+
- Upgraded `prettier` in `/` from "1.9.2" to "1.10.2" [#2724](https://github.com/storybooks/storybook/pull/2724)
58+
- Upgraded `tslint` in `/` from "5.8.0" to "5.9.1" [#2724](https://github.com/storybooks/storybook/pull/2724)
59+
- Upgraded `commander` in `app/react` from "2.12.2" to "2.13.0" [#2724](https://github.com/storybooks/storybook/pull/2724)
60+
- Upgraded `common-tags` in `app/react` from "1.7.0" to "1.7.2" [#2724](https://github.com/storybooks/storybook/pull/2724)
61+
- Upgraded `nodemon` in `app/react` from "1.14.10" to "1.14.11" [#2724](https://github.com/storybooks/storybook/pull/2724)
62+
- Upgraded `commander` in `app/angular` from "2.12.2" to "2.13.0" [#2724](https://github.com/storybooks/storybook/pull/2724)
63+
- Upgraded `common-tags` in `app/angular` from "1.7.0" to "1.7.2" [#2724](https://github.com/storybooks/storybook/pull/2724)
64+
- Upgraded `zone.js` in `app/angular` from "0.8.19" to "0.8.20" [#2724](https://github.com/storybooks/storybook/pull/2724)
65+
- Upgraded `nodemon` in `app/angular` from "1.14.10" to "1.14.11" [#2724](https://github.com/storybooks/storybook/pull/2724)
66+
- Upgraded `commander` in `app/react-native` from "2.12.2" to "2.13.0" [#2724](https://github.com/storybooks/storybook/pull/2724)
67+
- Upgraded `commander` in `app/vue` from "2.12.2" to "2.13.0" [#2724](https://github.com/storybooks/storybook/pull/2724)
68+
- Upgraded `common-tags` in `app/vue` from "1.7.0" to "1.7.2" [#2724](https://github.com/storybooks/storybook/pull/2724)
69+
- Upgraded `nodemon` in `app/vue` from "1.14.10" to "1.14.11" [#2724](https://github.com/storybooks/storybook/pull/2724)
70+
- Upgraded `babel-jest` in `examples/cra-kitchen-sink` from "22.0.4" to "22.0.6" [#2724](https://github.com/storybooks/storybook/pull/2724)
71+
- Upgraded `jest` in `examples/cra-kitchen-sink` from "22.0.5" to "22.0.6" [#2724](https://github.com/storybooks/storybook/pull/2724)
72+
- Upgraded `commander` in `lib/cli` from "2.12.2" to "2.13.0" [#2724](https://github.com/storybooks/storybook/pull/2724)
73+
- Upgraded `zone.js` in `examples/angular-cli` from "0.8.19" to "0.8.20" [#2724](https://github.com/storybooks/storybook/pull/2724)
74+
- Upgraded `@storybook/addon-actions` in `/docs` from "3.3.7" to "3.3.8" [#2722](https://github.com/storybooks/storybook/pull/2722)
75+
- Upgraded `@storybook/addon-links` in `/docs` from "3.3.7" to "3.3.8" [#2722](https://github.com/storybooks/storybook/pull/2722)
76+
- Upgraded `@storybook/addons` in `/docs` from "3.3.7" to "3.3.8" [#2722](https://github.com/storybooks/storybook/pull/2722)
77+
- Upgraded `@storybook/react` in `/docs` from "3.3.7" to "3.3.8" [#2722](https://github.com/storybooks/storybook/pull/2722)
78+
- Upgraded `gatsby-transformer-remark` in `/docs` from "1.7.27" to "1.7.28" [#2722](https://github.com/storybooks/storybook/pull/2722)
79+
- Upgraded `gatsby` in `/docs` from "1.9.151" to "1.9.153" [#2722](https://github.com/storybooks/storybook/pull/2722)
80+
- Upgraded `@storybook/addon-actions` in `/docs` from "3.3.6" to "3.3.7" [#2710](https://github.com/storybooks/storybook/pull/2710)
81+
- Upgraded `@storybook/addon-links` in `/docs` from "3.3.6" to "3.3.7" [#2710](https://github.com/storybooks/storybook/pull/2710)
82+
- Upgraded `@storybook/addons` in `/docs` from "3.3.6" to "3.3.7" [#2710](https://github.com/storybooks/storybook/pull/2710)
83+
- Upgraded `@storybook/react` in `/docs` from "3.3.6" to "3.3.7" [#2710](https://github.com/storybooks/storybook/pull/2710)
84+
- Upgraded `gatsby-link` in `/docs` from "1.6.33" to "1.6.34" [#2710](https://github.com/storybooks/storybook/pull/2710)
85+
- Upgraded `gatsby-transformer-remark` in `/docs` from "1.7.26" to "1.7.27" [#2710](https://github.com/storybooks/storybook/pull/2710)
86+
- Upgraded `gatsby` in `/docs` from "1.9.150" to "1.9.151" [#2710](https://github.com/storybooks/storybook/pull/2710)
87+
88+
</details>
89+
90+
# 3.3.9
91+
92+
2018-January-13
93+
94+
#### Bug Fixes
95+
96+
- Start haul/react-native using named binaries instead of cli.js [#2715](https://github.com/storybooks/storybook/pull/2715)
97+
- Reflect the new peer dependencies in docs and CLI templates [#2714](https://github.com/storybooks/storybook/pull/2714)
98+
- Don't mangle function names for production builds [#2705](https://github.com/storybooks/storybook/pull/2705)
99+
1100
# 3.4.0-alpha.2
2101

3102
2018-January-11

addons/a11y/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-a11y",
3-
"version": "3.4.0-alpha.1",
3+
"version": "3.4.0-alpha.4",
44
"description": "a11y addon for storybook",
55
"keywords": [
66
"a11y",
@@ -25,8 +25,9 @@
2525
"prepare": "node ../../scripts/prepare.js"
2626
},
2727
"dependencies": {
28-
"@storybook/components": "^3.4.0-alpha.1",
28+
"@storybook/components": "^3.4.0-alpha.4",
2929
"axe-core": "^2.6.1",
30+
"glamorous": "^4.11.2",
3031
"prop-types": "^15.6.0"
3132
},
3233
"peerDependencies": {

addons/a11y/src/components/Panel.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import Report from './Report';
66

77
const styles = {
88
passes: {
9-
color: '#2ecc71',
9+
color: '#0D6731',
1010
},
1111
violations: {
12-
color: '#e74c3c',
12+
color: '#AC2300',
1313
},
1414
};
1515

@@ -47,11 +47,11 @@ class Panel extends Component {
4747
<Tabs
4848
tabs={[
4949
{
50-
label: <span style={styles.violations}>Violations</span>,
50+
label: <span style={styles.violations}>{violations.length} Violations</span>,
5151
panel: <Report passes={false} items={violations} empty="No a11y violations found." />,
5252
},
5353
{
54-
label: <span style={styles.passes}>Passes</span>,
54+
label: <span style={styles.passes}>{passes.length} Passes</span>,
5555
panel: <Report passes items={passes} empty="No a11y check passed" />,
5656
},
5757
]}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import glamorous from 'glamorous';
2+
3+
const RerunButton = glamorous.button({
4+
position: 'absolute',
5+
bottom: 0,
6+
right: 0,
7+
border: 'none',
8+
borderTop: 'solid 1px rgba(0, 0, 0, 0.2)',
9+
borderLeft: 'solid 1px rgba(0, 0, 0, 0.2)',
10+
background: 'rgba(255, 255, 255, 0.5)',
11+
padding: '5px 10px',
12+
borderRadius: '4px 0 0 0',
13+
color: 'rgba(0, 0, 0, 0.5)',
14+
textTransform: 'uppercase',
15+
});
16+
17+
export default RerunButton;

addons/a11y/src/components/Report/index.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import React from 'react';
1+
import React, { Fragment } from 'react';
22
import PropTypes from 'prop-types';
3-
3+
import addons from '@storybook/addons';
4+
import RerunButton from './RerunButton';
45
import Item from './Item';
56

67
const styles = {
@@ -17,17 +18,23 @@ const styles = {
1718
},
1819
};
1920

20-
function Report({ items, empty, passes }) {
21-
if (items.length) {
22-
return (
21+
function onRerunClick() {
22+
const channel = addons.getChannel();
23+
channel.emit('addon:a11y:rerun');
24+
}
25+
26+
const Report = ({ items, empty, passes }) => (
27+
<Fragment>
28+
{items.length ? (
2329
<div style={styles.container}>
2430
{items.map(item => <Item passes={passes} item={item} key={item.id} />)}
2531
</div>
26-
);
27-
}
28-
29-
return <span style={styles.empty}>{empty}</span>;
30-
}
32+
) : (
33+
<span style={styles.empty}>{empty}</span>
34+
)}
35+
<RerunButton onClick={onRerunClick}>Re-run tests</RerunButton>
36+
</Fragment>
37+
);
3138

3239
Report.propTypes = {
3340
items: PropTypes.arrayOf(

addons/a11y/src/components/Tabs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { baseFonts } from '@storybook/components';
55
const styles = {
66
container: {
77
width: '100%',
8+
position: 'relative',
89
...baseFonts,
910
},
1011
tabs: {

addons/a11y/src/components/WrapStory.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,24 @@ class WrapStory extends Component {
1515
channel: {},
1616
};
1717

18-
/* eslint-disable react/no-find-dom-node */
18+
constructor(props) {
19+
super(props);
20+
this.runA11yCheck = this.runA11yCheck.bind(this);
21+
}
22+
1923
componentDidMount() {
24+
const { channel } = this.props;
25+
channel.on('addon:a11y:rerun', this.runA11yCheck);
26+
this.runA11yCheck();
27+
}
28+
29+
componentWillUnmount() {
30+
const { channel } = this.props;
31+
channel.removeListener('addon:a11y:rerun', this.runA11yCheck);
32+
}
33+
34+
/* eslint-disable react/no-find-dom-node */
35+
runA11yCheck() {
2036
const { channel } = this.props;
2137
const wrapper = findDOMNode(this);
2238

addons/actions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-actions",
3-
"version": "3.4.0-alpha.1",
3+
"version": "3.4.0-alpha.4",
44
"description": "Action Logger addon for storybook",
55
"keywords": [
66
"storybook"

addons/background/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-backgrounds",
3-
"version": "3.4.0-alpha.1",
3+
"version": "3.4.0-alpha.4",
44
"description": "A storybook addon to show different backgrounds for your preview",
55
"keywords": [
66
"addon",

0 commit comments

Comments
 (0)