Skip to content

Commit e8f8d3d

Browse files
committed
Merge branch 'main' into zoomcontainer
2 parents 1a94e85 + ceb9afb commit e8f8d3d

File tree

123 files changed

+22545
-14446
lines changed

Some content is hidden

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

123 files changed

+22545
-14446
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Bug report 🐞
2+
description: >-
3+
Something is broken and you have a reliable reproduction? Let us know here.
4+
To get help, check out the documentation or contact Chromatic customer support.
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Describe the bug
10+
description: A clear and concise description of what the bug is. Include screenshots if you can.
11+
placeholder: >-
12+
BE AWARE THIS IS A PUBLIC REPOSITORY. DO NOT INCLUDE SENSITIVE INFORMATION.
13+
Contact customer support directly if you need to share sensitive details.
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: reproduce
18+
attributes:
19+
label: To reproduce
20+
description: >-
21+
Explain the steps to reproduce the bug. If you have a public repository with a reproduction, please provide a link to it here.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: environment
26+
attributes:
27+
label: Environment
28+
description: >-
29+
Include as many relevant details about the environment you experienced the bug in.
30+
- Operating system
31+
- Browser
32+
- Storybook version
33+
- Visual Test Addon version
34+
validations:
35+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation 📚
4+
url: https://www.chromatic.com/docs/visual-tests-addon/
5+
about: Check out the official docs for answers to common questions.
6+
- name: Customer support 💬
7+
url: https://www.chromatic.com/start?support
8+
about: Chat with Chromatic customer support for help with your account or technical issues.

.github/workflows/check-labels.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check PR Labels
2+
on:
3+
pull_request:
4+
types: [opened, labeled, unlabeled, synchronize]
5+
6+
jobs:
7+
check-labels:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/setup-node@v4
11+
with:
12+
node-version: 20
13+
- uses: chromaui/pr-label-checker-action@main
14+
with:
15+
one-of: |
16+
major, minor, patch
17+
release, skip-release
18+
none-of: DO NOT MERGE

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fetch-depth: 0
1111

1212
- name: Install dependencies
13-
run: yarn install --ignore-scripts
13+
run: yarn install --immutable
1414

1515
- name: Publish to Chromatic
1616
uses: chromaui/action@v1

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
with:
1313
token: ${{ secrets.GH_TOKEN }}
1414

@@ -17,7 +17,7 @@ jobs:
1717
run: git fetch --unshallow --tags
1818

1919
- name: Install dependencies
20-
run: yarn install --ignore-scripts
20+
run: yarn install --immutable
2121

2222
- name: Create Release
2323
run: yarn run release

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
uses: actions/checkout@v3
99

1010
- name: Install dependencies
11-
run: yarn install --ignore-scripts
11+
run: yarn install --immutable
1212

1313
- name: Lint
1414
run: yarn lint

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ build-storybook.log
88
chromatic.log
99
chromatic-build-*.xml
1010
chromatic-diagnostics.json
11+
12+
**/.pnp.*
13+
**/.yarn/*
14+
!**/.yarn/patches
15+
!**/.yarn/plugins
16+
!**/.yarn/releases
17+
!**/.yarn/sdks
18+
!**/.yarn/versions

.storybook/main.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ const config: StorybookConfig = {
2424
"@storybook/addon-interactions",
2525
"@storybook/addon-designs",
2626
{
27-
name: useDistVersion ? "../dist/index.js" : "../src/dev.ts",
27+
name: useDistVersion ? "../dist/preset.js" : "../src/dev.ts",
2828
options: {
2929
configFile: configFileMap[CHROMATIC_BASE_URL || '"https://www.chromatic.com"'],
3030
},
3131
},
32-
"@storybook/addon-mdx-gfm"
32+
"@storybook/addon-mdx-gfm",
3333
],
3434
docs: {
3535
autodocs: "tag",
@@ -43,8 +43,14 @@ const config: StorybookConfig = {
4343
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
4444
refs: {
4545
"@storybook/components": {
46-
title: "@storybook/components",
47-
url: "https://next--635781f3500dd2c49e189caf.chromatic.com",
46+
title: "Storybook Components",
47+
url: "https://next--635781f3500dd2c49e189caf.chromatic.com/",
48+
expanded: false,
49+
},
50+
"@storybook/icons": {
51+
title: "Storybook Icons",
52+
url: "https://main--64b56e737c0aeefed9d5e675.chromatic.com/",
53+
expanded: false,
4854
},
4955
},
5056
async viteFinal(config, { configType }) {

.storybook/preview.tsx

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ import {
1313
} from "@storybook/theming";
1414
import { HttpResponse, graphql } from "msw";
1515
import { initialize, mswLoader } from "msw-storybook-addon";
16-
import React, { useState } from "react";
16+
import React from "react";
1717

1818
import { AuthProvider } from "../src/AuthContext";
1919
import { baseModes } from "../src/modes";
2020
import { UninstallProvider } from "../src/screens/Uninstalled/UninstallContext";
2121
import { RunBuildProvider } from "../src/screens/VisualTests/RunBuildContext";
2222
import { GraphQLClientProvider } from "../src/utils/graphQLClient";
2323
import { storyWrapper } from "../src/utils/storyWrapper";
24+
import { TelemetryProvider } from "../src/utils/TelemetryContext";
25+
import { useSessionState } from "../src/utils/useSessionState";
2426

2527
// Initialize MSW
2628
initialize({
@@ -64,7 +66,7 @@ const Panel = styled.div<{ orientation: "right" | "bottom" }>(
6466
boxShadow: `0 0 0 1px ${theme.background.content}`,
6567
background: theme.background.content,
6668
color: theme.base === "light" ? theme.color.dark : theme.color.mediumlight,
67-
fontSize: theme.typography.size.s2 - 1,
69+
fontSize: theme.typography.size.s2,
6870
})
6971
);
7072

@@ -73,7 +75,7 @@ const ThemedSetRoot = () => {
7375
React.useEffect(() => {
7476
document.body.style.background = theme.background.content;
7577
document.body.style.color = theme.color.defaultText;
76-
document.body.style.fontSize = `${theme.typography.size.s2 - 1}px`;
78+
document.body.style.fontSize = `${theme.typography.size.s2}px`;
7779
});
7880
return null;
7981
};
@@ -122,6 +124,10 @@ const withTheme = (StoryFn, { globals, parameters }) => {
122124

123125
const withGraphQLClient = storyWrapper(GraphQLClientProvider);
124126

127+
const withTelemetry = storyWrapper(TelemetryProvider, () => ({
128+
value: action("telemetry"),
129+
}));
130+
125131
const withAuth = storyWrapper(AuthProvider, () => ({
126132
value: {
127133
accessToken: "token",
@@ -137,9 +143,12 @@ const withManagerApi = storyWrapper(ManagerContext.Provider, ({ argsByTarget })
137143
}));
138144

139145
const withUninstall: Decorator = (Story) => {
140-
const [addonInstalled, setAddonInstalled] = useState(false);
146+
const [addonUninstalled, setAddonUninstalled] = useSessionState("addonUninstalled", false);
141147
return (
142-
<UninstallProvider addonUninstalled={addonInstalled} setAddonUninstalled={setAddonInstalled}>
148+
<UninstallProvider
149+
addonUninstalled={addonUninstalled}
150+
setAddonUninstalled={setAddonUninstalled}
151+
>
143152
<Story />
144153
</UninstallProvider>
145154
);
@@ -199,7 +208,15 @@ export const graphQLArgLoader: Loader = async ({ argTypes, argsByTarget, paramet
199208
};
200209

201210
const preview: Preview = {
202-
decorators: [withTheme, withGraphQLClient, withAuth, withUninstall, withManagerApi, withRunBuild],
211+
decorators: [
212+
withTheme,
213+
withGraphQLClient,
214+
withTelemetry,
215+
withAuth,
216+
withUninstall,
217+
withManagerApi,
218+
withRunBuild,
219+
],
203220
loaders: [graphQLArgLoader],
204221
parameters: {
205222
actions: {

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"],
2+
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
33
}

0 commit comments

Comments
 (0)