Skip to content

Commit

Permalink
Remove percy. Adjust old percy stuff for chromatic (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
xdrdak authored Jun 29, 2020
1 parent d296d6d commit 5e20ebd
Show file tree
Hide file tree
Showing 21 changed files with 44 additions and 83 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/percy-snapshot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class FlameStyling extends React.Component {
/>
<FlameTheme themeName={this.state.selectedTheme}>
<Box p={3}>
<Box mb={2} width="200px" className="hide-in-percy">
<Box mb={2} width="200px" className="hide-in-percy chromatic-ignore">
<Select
value={this.state.selectedTheme}
onChange={e => {
Expand Down
3 changes: 1 addition & 2 deletions packages/flame/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"build:private-to-public": "node ./scripts/private-to-public.js",
"build": "yarn build:icons && yarn build:flags && yarn build:themes && yarn build:cjs && yarn build:esm && yarn build:copy-files && yarn build:types && yarn build:types:esm && yarn build:private-to-public && node ../../scripts/validate-build",
"release": "yarn build && yarn build:docgen && npm publish dist --quiet",
"release:dryrun": "npm publish dist --dry-run",
"percy": "build-storybook -c .storybook && percy-storybook --widths=1280"
"release:dryrun": "npm publish dist --dry-run"
},
"peerDependencies": {
"@emotion/core": "^10.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/flame/src/Alert/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Alerts = () => (
title={`${type[0].toUpperCase().concat(type.slice(1))}`}
mb={2}
>
Description of an alert.
Description of alert.
</Alert>
);
})}
Expand All @@ -40,7 +40,7 @@ const Alerts = () => (
mb={2}
noCloseBtn
>
Description of an alert with no close button.
Description of alert with no close button.
</Alert>
);
})}
Expand Down
4 changes: 2 additions & 2 deletions packages/flame/src/Autocomplete/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ stories.add(
/>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add('States', () => (
Expand Down Expand Up @@ -210,5 +210,5 @@ stories.add(
/>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
2 changes: 1 addition & 1 deletion packages/flame/src/Bone/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ stories.add(
</div>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
2 changes: 1 addition & 1 deletion packages/flame/src/Checkbox/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,5 @@ stories.add(
</TextContent>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
12 changes: 6 additions & 6 deletions packages/flame/src/Core/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const Colours = withTheme(({ theme }) => {
);
});
export const colors = () => <Colours />;
colors.story = { percy: { skip: true } };
colors.story = { chromatic: { disable: true } };

const TypographyExample: React.FC<{ output: React.ReactNode; example: React.ReactNode }> = ({
output,
Expand Down Expand Up @@ -200,7 +200,7 @@ const Typography = withTheme(({ theme }) => {
);
});
export const typography = () => <Typography />;
typography.story = { percy: { skip: true } };
typography.story = { chromatic: { disable: true } };

const BoxExample: React.FC<{ box: React.ReactNode; sample: React.ReactNode }> = ({
box,
Expand Down Expand Up @@ -287,7 +287,7 @@ const Spacing = withTheme(({ theme }) => {
);
});
export const spacing = () => <Spacing />;
spacing.story = { percy: { skip: true } };
spacing.story = { chromatic: { disable: true } };

const Shadows = withTheme(({ theme }) => {
const { shadows, innerShadows, innerShadowsN, borderShadows } = theme;
Expand Down Expand Up @@ -412,7 +412,7 @@ const Shadows = withTheme(({ theme }) => {
});

export const shadows = () => <Shadows />;
shadows.story = { percy: { skip: true } };
shadows.story = { chromatic: { disable: true } };

const BorderRadii = withTheme(({ theme }) => {
const { radii } = theme;
Expand Down Expand Up @@ -450,7 +450,7 @@ const BorderRadii = withTheme(({ theme }) => {
);
});
export const radii = () => <BorderRadii />;
radii.story = { percy: { skip: true } };
radii.story = { chromatic: { disable: true } };

const Transitions = withTheme(({ theme }) => {
const { transition } = theme;
Expand Down Expand Up @@ -495,4 +495,4 @@ const Transitions = withTheme(({ theme }) => {
);
});
export const transitions = () => <Transitions />;
transitions.story = { percy: { skip: true } };
transitions.story = { chromatic: { disable: true } };
2 changes: 1 addition & 1 deletion packages/flame/src/Dialog/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class DialogStoryHelper extends React.Component<{}, State> {
}
}

stories.add('Story', () => <DialogStoryHelper />, { percy: { skip: true } });
stories.add('Story', () => <DialogStoryHelper />, { chromatic: { disable: true } });

stories.add('Percy story', () => (
<Dialog
Expand Down
6 changes: 3 additions & 3 deletions packages/flame/src/Divider/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ stories.add(
</Divider>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand Down Expand Up @@ -153,7 +153,7 @@ stories.add(
</Box>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand All @@ -166,5 +166,5 @@ stories.add(
<Divider color="#F42069" />
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
2 changes: 1 addition & 1 deletion packages/flame/src/Dropdown/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ stories.add(
</div>
);
},
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add('Story for Percy', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/flame/src/Icon/examples/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ stories.add(
</div>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add('Sprite', () => (
Expand Down
2 changes: 1 addition & 1 deletion packages/flame/src/Input/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,5 @@ stories.add(
</Box>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
6 changes: 3 additions & 3 deletions packages/flame/src/Modal/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ class ModalStoryHelper extends React.Component<Props, State> {
}
}

stories.add('Header', () => <ModalStoryHelper header />, { percy: { skip: true } });
stories.add('Header', () => <ModalStoryHelper header />, { chromatic: { disable: true } });

stories.add('Footer', () => <ModalStoryHelper footer />, { percy: { skip: true } });
stories.add('Footer', () => <ModalStoryHelper footer />, { chromatic: { disable: true } });

stories.add('Options', () => <ModalStoryHelper options />, { percy: { skip: true } });
stories.add('Options', () => <ModalStoryHelper options />, { chromatic: { disable: true } });
10 changes: 5 additions & 5 deletions packages/flame/src/Popover/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ stories.add(
/>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand Down Expand Up @@ -235,7 +235,7 @@ stories.add(
</div>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand All @@ -253,7 +253,7 @@ stories.add(
</div>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand All @@ -274,7 +274,7 @@ stories.add(
<Input label="I should be behind the popover" />
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

const RerenderingPopover = () => {
Expand Down Expand Up @@ -307,7 +307,7 @@ stories.add(
</div>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add('Percy Placement', () => (
Expand Down
4 changes: 2 additions & 2 deletions packages/flame/src/Radio/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ stories.add(
</Box>
</TextContent>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand Down Expand Up @@ -216,5 +216,5 @@ stories.add(
</Box>
</TextContent>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
2 changes: 1 addition & 1 deletion packages/flame/src/Switch/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ stories.add(
</Box>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
6 changes: 3 additions & 3 deletions packages/flame/src/Tag/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ stories.add(
</Box>
</TextContent>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand All @@ -90,7 +90,7 @@ stories.add(
<Text size="small">(See action logger)</Text>
</TextContent>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand All @@ -105,5 +105,5 @@ stories.add(
<Text size="small">(Click label or remove icon)</Text>
</TextContent>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
12 changes: 6 additions & 6 deletions packages/flame/src/Text/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ stories.add(
))}
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand All @@ -157,7 +157,7 @@ stories.add(
<Heading4>Heading 4</Heading4>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand All @@ -178,7 +178,7 @@ stories.add(
</Text>
</TextContent>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand Down Expand Up @@ -208,7 +208,7 @@ stories.add(
</TextContent>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand All @@ -219,7 +219,7 @@ stories.add(
<Text fontFamily="monospace">Monospaced fonts</Text>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add(
Expand Down Expand Up @@ -253,5 +253,5 @@ stories.add(
</tbody>
</table>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
4 changes: 2 additions & 2 deletions packages/flame/src/Toaster/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ stories.add(
</div>
</ToasterProvider>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add('percy snapshots', () => {
Expand Down Expand Up @@ -201,5 +201,5 @@ stories.add(
</Modal>
</ToasterProvider>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);
2 changes: 1 addition & 1 deletion packages/flame/src/Tooltip/story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ stories.add(
</Tooltip>
</div>
),
{ percy: { skip: true } },
{ chromatic: { disable: true } },
);

stories.add('Directions', () => (
Expand Down

0 comments on commit 5e20ebd

Please sign in to comment.