Skip to content

Commit c22a879

Browse files
committed
next round
1 parent e81f23a commit c22a879

File tree

6 files changed

+20
-19
lines changed

6 files changed

+20
-19
lines changed

site/src/components/Resources/AgentRow.stories.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { Meta, StoryObj } from "@storybook/react";
2+
import { chromatic } from "testHelpers/chromatic";
13
import {
24
MockPrimaryWorkspaceProxy,
35
MockWorkspaceProxies,
@@ -21,7 +23,6 @@ import {
2123
} from "testHelpers/entities";
2224
import { AgentRow, LineWithID } from "./AgentRow";
2325
import { ProxyContext, getPreferredProxy } from "contexts/ProxyContext";
24-
import type { Meta, StoryObj } from "@storybook/react";
2526

2627
const defaultAgentMetadata = [
2728
{
@@ -102,6 +103,7 @@ const storybookLogs: LineWithID[] = [
102103

103104
const meta: Meta<typeof AgentRow> = {
104105
title: "components/AgentRow",
106+
parameters: { chromatic },
105107
component: AgentRow,
106108
args: {
107109
storybookLogs,

site/src/components/RichParameterInput/RichParameterInput.stories.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { TemplateVersionParameter } from "api/typesGenerated";
2-
import { RichParameterInput } from "./RichParameterInput";
31
import type { Meta, StoryObj } from "@storybook/react";
2+
import type { TemplateVersionParameter } from "api/typesGenerated";
3+
import { chromatic } from "testHelpers/chromatic";
4+
import { RichParameterInput } from "./RichParameterInput";
45

56
const meta: Meta<typeof RichParameterInput> = {
67
title: "components/RichParameterInput",
8+
parameters: { chromatic },
79
component: RichParameterInput,
810
};
911

site/src/pages/AuditPage/AuditLogRow/AuditLogRow.stories.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import TableCell from "@mui/material/TableCell";
44
import TableContainer from "@mui/material/TableContainer";
55
import TableHead from "@mui/material/TableHead";
66
import TableRow from "@mui/material/TableRow";
7+
import type { Meta, StoryObj } from "@storybook/react";
8+
import { chromatic } from "testHelpers/chromatic";
79
import {
810
MockAuditLog,
911
MockAuditLog2,
@@ -12,7 +14,6 @@ import {
1214
MockAuditLogGitSSH,
1315
} from "testHelpers/entities";
1416
import { AuditLogRow } from "./AuditLogRow";
15-
import type { Meta, StoryObj } from "@storybook/react";
1617

1718
const meta: Meta<typeof AuditLogRow> = {
1819
title: "pages/AuditPage/AuditLogRow",
@@ -48,13 +49,15 @@ export const NoDiff: Story = {
4849
};
4950

5051
export const WithDiff: Story = {
52+
parameters: { chromatic },
5153
args: {
5254
auditLog: MockAuditLog2,
5355
defaultIsDiffOpen: true,
5456
},
5557
};
5658

5759
export const WithLongDiffRow: Story = {
60+
parameters: { chromatic },
5861
args: {
5962
auditLog: {
6063
...MockAuditLog2,

site/src/pages/AuditPage/AuditPageView.stories.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { Meta, StoryObj } from "@storybook/react";
2+
import { type ComponentProps } from "react";
3+
import { chromaticWithTablet } from "testHelpers/chromatic";
24
import { MockAuditLog, MockAuditLog2, MockUser } from "testHelpers/entities";
3-
import { AuditPageView } from "./AuditPageView";
4-
import { ComponentProps } from "react";
55
import {
66
mockInitialRenderResult,
77
mockSuccessResult,
88
} from "components/PaginationWidget/PaginationContainer.mocks";
99
import { type UsePaginatedQueryResult } from "hooks/usePaginatedQuery";
10+
import { AuditPageView } from "./AuditPageView";
1011

1112
import {
1213
MockMenu,
@@ -43,6 +44,7 @@ export default meta;
4344
type Story = StoryObj<typeof AuditPageView>;
4445

4546
export const AuditPage: Story = {
47+
parameters: { chromatic: chromaticWithTablet },
4648
args: {
4749
auditsQuery: mockSuccessResult,
4850
},
@@ -84,12 +86,3 @@ export const NotVisible: Story = {
8486
auditsQuery: mockInitialRenderResult,
8587
},
8688
};
87-
88-
export const AuditPageSmallViewport: Story = {
89-
args: {
90-
auditsQuery: mockSuccessResult,
91-
},
92-
parameters: {
93-
chromatic: { viewports: [600] },
94-
},
95-
};

site/src/pages/WorkspaceSettingsPage/WorkspaceSchedulePage/WorkspaceScheduleForm.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ import {
2525
defaultSchedule,
2626
emptySchedule,
2727
} from "pages/WorkspaceSettingsPage/WorkspaceSchedulePage/schedule";
28-
import { ChangeEvent, FC } from "react";
28+
import { type ChangeEvent, type FC } from "react";
2929
import * as Yup from "yup";
3030
import { getFormHelpers } from "utils/formUtils";
3131
import { timeZones } from "utils/timeZones";
3232
import { Pill } from "components/Pill/Pill";
3333
import Tooltip from "@mui/material/Tooltip";
3434
import { formatDuration, intervalToDuration } from "date-fns";
35+
import { DisabledBadge } from "components/Badges/Badges";
3536

3637
// REMARK: some plugins depend on utc, so it's listed first. Otherwise they're
3738
// sorted alphabetically.
@@ -290,7 +291,7 @@ export const WorkspaceScheduleForm: FC<
290291
</div>
291292
{!enableAutoStart && (
292293
<Tooltip title="This option can be enabled in the template settings">
293-
<Pill text="Disabled" />
294+
<DisabledBadge />
294295
</Tooltip>
295296
)}
296297
</>
@@ -378,7 +379,7 @@ export const WorkspaceScheduleForm: FC<
378379
</div>
379380
{!enableAutoStop && (
380381
<Tooltip title="This option can be enabled in the template settings">
381-
<Pill text="Disabled" />
382+
<DisabledBadge />
382383
</Tooltip>
383384
)}
384385
</>

site/src/theme/dark/experimental.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default {
6969
error: {
7070
background: colors.red[950],
7171
outline: colors.red[500],
72-
fill: colors.red[600],
72+
fill: colors.red[400],
7373
text: colors.red[50],
7474
},
7575
warning: {

0 commit comments

Comments
 (0)