Skip to content

Commit e595ca0

Browse files
committed
Remove Example.args pattern
1 parent e791954 commit e595ca0

File tree

3 files changed

+9
-29
lines changed

3 files changed

+9
-29
lines changed

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,28 +118,24 @@ export const Example: Story = {};
118118

119119
export const HideSSHButton: Story = {
120120
args: {
121-
...Example.args,
122121
hideSSHButton: true,
123122
},
124123
};
125124

126125
export const HideVSCodeDesktopButton: Story = {
127126
args: {
128-
...Example.args,
129127
hideVSCodeDesktopButton: true,
130128
},
131129
};
132130

133131
export const NotShowingApps: Story = {
134132
args: {
135-
...Example.args,
136133
showApps: false,
137134
},
138135
};
139136

140137
export const BunchOfApps: Story = {
141138
args: {
142-
...Example.args,
143139
agent: {
144140
...MockWorkspaceAgent,
145141
apps: [
@@ -160,29 +156,25 @@ export const BunchOfApps: Story = {
160156

161157
export const Connecting: Story = {
162158
args: {
163-
...Example.args,
164159
agent: MockWorkspaceAgentConnecting,
165160
storybookAgentMetadata: [],
166161
},
167162
};
168163

169164
export const Timeout: Story = {
170165
args: {
171-
...Example.args,
172166
agent: MockWorkspaceAgentTimeout,
173167
},
174168
};
175169

176170
export const Starting: Story = {
177171
args: {
178-
...Example.args,
179172
agent: MockWorkspaceAgentStarting,
180173
},
181174
};
182175

183176
export const Started: Story = {
184177
args: {
185-
...Example.args,
186178
agent: {
187179
...MockWorkspaceAgentReady,
188180
logs_length: 1,
@@ -199,42 +191,36 @@ export const StartedNoMetadata: Story = {
199191

200192
export const StartTimeout: Story = {
201193
args: {
202-
...Example.args,
203194
agent: MockWorkspaceAgentStartTimeout,
204195
},
205196
};
206197

207198
export const StartError: Story = {
208199
args: {
209-
...Example.args,
210200
agent: MockWorkspaceAgentStartError,
211201
},
212202
};
213203

214204
export const ShuttingDown: Story = {
215205
args: {
216-
...Example.args,
217206
agent: MockWorkspaceAgentShuttingDown,
218207
},
219208
};
220209

221210
export const ShutdownTimeout: Story = {
222211
args: {
223-
...Example.args,
224212
agent: MockWorkspaceAgentShutdownTimeout,
225213
},
226214
};
227215

228216
export const ShutdownError: Story = {
229217
args: {
230-
...Example.args,
231218
agent: MockWorkspaceAgentShutdownError,
232219
},
233220
};
234221

235222
export const Off: Story = {
236223
args: {
237-
...Example.args,
238224
agent: MockWorkspaceAgentOff,
239225
},
240226
};
@@ -271,7 +257,6 @@ export const ShowingPortForward: Story = {
271257

272258
export const Outdated: Story = {
273259
args: {
274-
...Example.args,
275260
agent: MockWorkspaceAgentOutdated,
276261
workspace: MockWorkspace,
277262
serverVersion: "v99.999.9999+c1cdf14",

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,18 @@ import type { Meta, StoryObj } from "@storybook/react";
55
const meta: Meta<typeof AgentRowPreview> = {
66
title: "components/AgentRowPreview",
77
component: AgentRowPreview,
8+
args: {
9+
agent: MockWorkspaceAgent,
10+
},
811
};
912

1013
export default meta;
1114
type Story = StoryObj<typeof AgentRowPreview>;
1215

13-
export const Example: Story = {
14-
args: {
15-
agent: MockWorkspaceAgent,
16-
},
17-
};
16+
export const Example: Story = {};
1817

1918
export const BunchOfApps: Story = {
2019
args: {
21-
...Example.args,
2220
agent: {
2321
...MockWorkspaceAgent,
2422
apps: [
@@ -37,7 +35,6 @@ export const BunchOfApps: Story = {
3735

3836
export const NoApps: Story = {
3937
args: {
40-
...Example.args,
4138
agent: {
4239
...MockWorkspaceAgent,
4340
apps: [],

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ import type { Meta, StoryObj } from "@storybook/react";
1212
const meta: Meta<typeof ResourceCard> = {
1313
title: "components/ResourceCard",
1414
component: ResourceCard,
15-
};
16-
17-
export default meta;
18-
type Story = StoryObj<typeof ResourceCard>;
19-
20-
export const Example: Story = {
2115
args: {
2216
resource: MockWorkspaceResource,
2317
agentRow: (agent) => (
@@ -52,9 +46,13 @@ export const Example: Story = {
5246
},
5347
};
5448

49+
export default meta;
50+
type Story = StoryObj<typeof ResourceCard>;
51+
52+
export const Example: Story = {};
53+
5554
export const BunchOfMetadata: Story = {
5655
args: {
57-
...Example.args,
5856
resource: {
5957
...MockWorkspaceResource,
6058
metadata: [

0 commit comments

Comments
 (0)