Skip to content

Commit 67b96c8

Browse files
authored
Merging dev to master (it's happening) (#1158)
New animation interaction pattern
1 parent 1c1f42e commit 67b96c8

File tree

434 files changed

+23318
-15920
lines changed

Some content is hidden

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

434 files changed

+23318
-15920
lines changed

Diff for: .circleci/config.yml

+40-22
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
- restore_cache:
1212
keys:
1313
# Restore cached node_modules
14-
- v1-dependencies-{{ checksum "yarn.lock" }}
14+
- v3-dependencies-{{ checksum "yarn.lock" }}
1515
# fallback to using the latest cache if no exact match is found
16-
- v1-dependencies-
16+
- v3-dependencies-
1717

1818
- run:
1919
name: Add CI global modules
@@ -43,7 +43,7 @@ jobs:
4343
- save_cache:
4444
paths:
4545
- node_modules
46-
key: v1-dependencies-{{ checksum "yarn.lock" }}
46+
key: v3-dependencies-{{ checksum "yarn.lock" }}
4747
validate:
4848
docker:
4949
- image: circleci/node:8.11.3-browsers
@@ -53,7 +53,7 @@ jobs:
5353

5454
- restore_cache:
5555
keys:
56-
- v1-dependencies-{{ checksum "yarn.lock" }}
56+
- v3-dependencies-{{ checksum "yarn.lock" }}
5757

5858
- run:
5959
# PR's from forks cannot use the dependency cache for performance reasons
@@ -63,7 +63,7 @@ jobs:
6363
- run:
6464
name: Lint + Typecheck
6565
command: yarn validate
66-
test:
66+
test-unit:
6767
docker:
6868
- image: circleci/node:8.11.3-browsers
6969
working_directory: ~/repo
@@ -72,7 +72,7 @@ jobs:
7272

7373
- restore_cache:
7474
keys:
75-
- v1-dependencies-{{ checksum "yarn.lock" }}
75+
- v3-dependencies-{{ checksum "yarn.lock" }}
7676

7777
- run:
7878
# PR's from forks cannot use the dependency cache for performance reasons
@@ -87,18 +87,7 @@ jobs:
8787

8888
- store_test_results:
8989
path: test-reports/junit
90-
91-
- run:
92-
name: Browser Suite
93-
command: node browser-test-harness.js yarn test:browser
94-
95-
- store_test_results:
96-
path: test-reports/browser
97-
98-
- store_artifacts:
99-
path: .storybook-out
100-
destination: storybook-out
101-
bundle-test:
90+
test-bundle:
10291
docker:
10392
- image: circleci/node:8.11.3-browsers
10493
working_directory: ~/repo
@@ -107,17 +96,43 @@ jobs:
10796

10897
- restore_cache:
10998
keys:
110-
- v1-dependencies-{{ checksum "yarn.lock" }}
99+
- v3-dependencies-{{ checksum "yarn.lock" }}
111100

101+
# PR's from forks cannot use the dependency cache for performance reasons
112102
- run:
113-
# PR's from forks cannot use the dependency cache for performance reasons
114103
name: 'Forked PR dependency install'
115104
command: yarn
116105

117106
- run:
118107
name: Check Bundle Size
119108
command: yarn run bundle-size:check
109+
test-browser:
110+
docker:
111+
# Single Docker container with Node 8 and Cypress dependencies
112+
# https://github.com/cypress-io/circleci-orb/blob/master/src/orb.yml
113+
- image: cypress/base:8
114+
working_directory: ~/repo
115+
steps:
116+
- checkout
117+
118+
- restore_cache:
119+
keys:
120+
- v3-dependencies-{{ checksum "yarn.lock" }}
121+
122+
# PR's from forks cannot use the dependency cache for performance reasons
123+
- run:
124+
name: 'Forked PR dependency install'
125+
command: yarn
120126

127+
- run:
128+
name: 'Run cypress'
129+
command: node browser-test-harness.js yarn test:browser:ci
130+
131+
# store videos and screenshots (if any) as CI artifacts
132+
- store_artifacts:
133+
path: cypress/videos
134+
- store_artifacts:
135+
path: cypress/screenshots
121136
workflows:
122137
version: 2
123138
build:
@@ -126,9 +141,12 @@ workflows:
126141
- validate:
127142
requires:
128143
- install
129-
- test:
144+
- test-unit:
145+
requires:
146+
- install
147+
- test-bundle:
130148
requires:
131149
- install
132-
- bundle-test:
150+
- test-browser:
133151
requires:
134152
- install

Diff for: .eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
dist/
33
flow-typed/
44
site/
5+
coverage/
56
babel.config.js

Diff for: .eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
'plugin:prettier/recommended',
1010
],
1111
parser: 'babel-eslint',
12-
plugins: ['prettier', 'flowtype', 'react', 'import', 'jest'],
12+
plugins: ['prettier', 'flowtype', 'emotion', 'react', 'import', 'jest'],
1313
env: {
1414
es6: true,
1515
browser: true,

Diff for: .flowconfig

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
[ignore]
1+
[untyped]
2+
# Issue with atlaskit/theme typing
3+
.*/node_modules/@atlaskit/theme
4+
5+
[libs]
6+
./flow-typed/custom/
27

38
[options]
49

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ coverage/
2020
# test reports
2121
test-reports/
2222

23+
# test videos
24+
cypress/videos/
25+
2326
# storybook
2427
.storybook.out
2528
.cache/

Diff for: .size-snapshot.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
22
"dist/react-beautiful-dnd.js": {
3-
"bundled": 347275,
4-
"minified": 134225,
5-
"gzipped": 39798
3+
"bundled": 355996,
4+
"minified": 138322,
5+
"gzipped": 40545
66
},
77
"dist/react-beautiful-dnd.min.js": {
8-
"bundled": 295057,
9-
"minified": 109593,
10-
"gzipped": 31944
8+
"bundled": 302438,
9+
"minified": 113232,
10+
"gzipped": 32713
1111
},
1212
"dist/react-beautiful-dnd.esm.js": {
13-
"bundled": 228983,
14-
"minified": 120746,
15-
"gzipped": 30051,
13+
"bundled": 236773,
14+
"minified": 125151,
15+
"gzipped": 31183,
1616
"treeshaked": {
1717
"rollup": {
18-
"code": 81922,
19-
"import_statements": 846
18+
"code": 85436,
19+
"import_statements": 832
2020
},
2121
"webpack": {
22-
"code": 84599
22+
"code": 88124
2323
}
2424
}
2525
}

Diff for: .storybook-out

-3
This file was deleted.

Diff for: .storybook/addons.js

-1
This file was deleted.

Diff for: .storybook/compressed-logo-rbd.svg

+23
Loading

Diff for: .storybook/config.js

+20-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
import React from 'react';
2-
import { configure, addDecorator } from '@storybook/react';
3-
import { withOptions } from '@storybook/addon-options';
4-
import PopIframeDecorator from './decorator/pop-iframe';
2+
import { addParameters, configure, addDecorator } from '@storybook/react';
3+
import { create } from '@storybook/theming';
4+
import GlobalStylesDecorator from './decorator/global-styles';
55
// adding css reset - storybook includes a css loader
66
import '@atlaskit/css-reset';
7+
import { colors } from '@atlaskit/theme';
8+
import logo from './compressed-logo-rbd.svg';
79
import { version } from '../package.json';
810

9-
addDecorator(
10-
withOptions({
11-
name: 'react-beautiful-dnd',
12-
url: 'https://github.com/atlassian/react-beautiful-dnd',
13-
showAddonPanel: false,
14-
}),
15-
);
11+
const theme = create({
12+
brandImage: logo,
13+
brandName: 'react-beautiful-dnd',
14+
brandUrl: 'https://github.com/atlassian/react-beautiful-dnd',
15+
});
1616

17-
addDecorator(PopIframeDecorator);
17+
addParameters({
18+
options: {
19+
// currently not using any addons
20+
showPanel: false,
21+
theme,
22+
},
23+
});
24+
25+
// Using theme would be good for this, but it looks like theme is just for the chrome around the story
26+
addDecorator(GlobalStylesDecorator);
1827

1928
// automatically import all files ending in *.stories.js
2029
const req = require.context('../stories/', true, /.stories.js$/);

Diff for: .storybook/decorator/global-styles.jsx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// @flow
2+
import React from 'react';
3+
import styled from '@emotion/styled';
4+
import { colors } from '@atlaskit/theme';
5+
import { grid } from '../../stories/src/constants';
6+
7+
const GlobalStyles = styled.div`
8+
background-color: ${colors.N0};
9+
min-height: 100vh;
10+
color: ${colors.N900};
11+
`;
12+
13+
const GlobalStylesDecorator = (storyFn: Function) => (
14+
<GlobalStyles>{storyFn()}</GlobalStyles>
15+
);
16+
17+
export default GlobalStylesDecorator;

0 commit comments

Comments
 (0)