Skip to content

Commit d3506b0

Browse files
fix(swatch,swatchgroup,table,tabs): disabled Chromatic snapshot
for new stories, disabled the snapshot since the default group should encompass all stories
1 parent c6f7deb commit d3506b0

File tree

4 files changed

+126
-0
lines changed

4 files changed

+126
-0
lines changed

components/swatch/stories/swatch.stories.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ Sizing.parameters = {
171171
*/
172172
export const Disabled = DisabledGroup.bind({});
173173
Disabled.tags = ["!dev"];
174+
Disabled.parameters = {
175+
chromatic: { disableSnapshot: true },
176+
};
174177

175178
/**
176179
* Default rounding and full rounding are usually used when a swatch is presented by itself near other components. A rounding of “none” is used in a swatch group to help minimize the Hermann grid illusion that happens at the intersections of white space in the group.
@@ -189,6 +192,9 @@ Selected.args = {
189192
isSelected: true,
190193
};
191194
Selected.tags = ["!dev"];
195+
Selected.parameters = {
196+
chromatic: { disableSnapshot: true },
197+
};
192198

193199
/**
194200
* By default, swatches have a border. However, when swatches are used within a swatch group, there are additional border considerations.
@@ -197,6 +203,9 @@ Selected.tags = ["!dev"];
197203
*/
198204
export const Border = BorderGroup.bind({});
199205
Border.tags = ["!dev"];
206+
Border.parameters = {
207+
chromatic: { disableSnapshot: true },
208+
};
200209

201210
/**
202211
* Swatches can have a square or a rectangle shape with an aspect ratio of 2:1. The square shape is the default and is used in swatch groups (e.g., a palette of colors).
@@ -206,10 +215,16 @@ Rectangle.args = {
206215
isRectangle: true,
207216
};
208217
Rectangle.tags = ["!dev"];
218+
Rectangle.parameters = {
219+
chromatic: { disableSnapshot: true },
220+
};
209221

210222
export const Nothing = NothingGroup.bind({});
211223
Nothing.args = {};
212224
Nothing.tags = ["!dev"];
225+
Nothing.parameters = {
226+
chromatic: { disableSnapshot: true },
227+
};
213228

214229
/**
215230
* When a swatch represents multiple values that are not identical, the preview shows a `gray-50` fill and a dash UI icon.
@@ -219,20 +234,29 @@ MixedValue.args = {
219234
isMixedValue: true,
220235
};
221236
MixedValue.tags = ["!dev"];
237+
MixedValue.parameters = {
238+
chromatic: { disableSnapshot: true },
239+
};
222240

223241
export const Gradient = Template.bind({});
224242
Gradient.args = {
225243
isGradient: true,
226244
gradient: "linear-gradient(to right, rgba(0, 0, 0, 88%), rgb(174, 216, 230))",
227245
};
228246
Gradient.tags = ["!dev"];
247+
Gradient.parameters = {
248+
chromatic: { disableSnapshot: true },
249+
};
229250

230251
export const Image = Template.bind({});
231252
Image.args = {
232253
isImage: true,
233254
imageUrl: "example-ava@2x.png",
234255
};
235256
Image.tags = ["!dev"];
257+
Image.parameters = {
258+
chromatic: { disableSnapshot: true },
259+
};
236260

237261
// ********* VRT ONLY ********* //
238262
export const WithForcedColors = SwatchGroup.bind({});

components/swatchgroup/stories/swatchgroup.stories.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,26 +131,38 @@ Compact.args = {
131131
density: "compact",
132132
};
133133
Compact.tags = ["!dev"];
134+
Compact.parameters = {
135+
chromatic: { disableSnapshot: true },
136+
};
134137

135138
export const Spacious = Template.bind({});
136139
Spacious.args = {
137140
density: "spacious",
138141
};
139142
Spacious.tags = ["!dev"];
143+
Spacious.parameters = {
144+
chromatic: { disableSnapshot: true },
145+
};
140146

141147
/**
142148
* Only use rounded swatches if there is a single row.
143149
*/
144150
export const Rounding = RoundingTemplate.bind({});
145151
Rounding.args = {};
146152
Rounding.tags = ["!dev"];
153+
Rounding.parameters = {
154+
chromatic: { disableSnapshot: true },
155+
};
147156

148157
/**
149158
* Use any size swatches as necessary. The medium size is the default option. This only affects the size of each individual swatch, not the spacing between them.
150159
*/
151160
export const Sizing = SizingTemplate.bind({});
152161
Sizing.args = {};
153162
Sizing.tags = ["!dev"];
163+
Sizing.parameters = {
164+
chromatic: { disableSnapshot: true },
165+
};
154166

155167
/**
156168
* In this example, the lower contrast swatches properly utilize the `.spectrum-Swatch--lightBorder` class.
@@ -180,6 +192,9 @@ WithLightBorder.args = {
180192
};
181193
WithLightBorder.tags = ["!dev"];
182194
WithLightBorder.storyName = "With light border";
195+
WithLightBorder.parameters = {
196+
chromatic: { disableSnapshot: true },
197+
};
183198

184199
// ********* VRT ONLY ********* //
185200
export const WithForcedColors = SwatchgroupGroup.bind({});

components/table/stories/table.stories.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ Default.args = {};
185185
*/
186186
export const Sizing = SizingTemplate.bind({});
187187
Sizing.tags = ["!dev"];
188+
Sizing.parameters = {
189+
chromatic: { disableSnapshot: true },
190+
};
188191

189192
/**
190193
* The compact variant decreases the spacing used within the table.
@@ -195,6 +198,9 @@ Compact.args = {
195198
density: "compact",
196199
};
197200
Compact.tags = ["!dev"];
201+
Compact.parameters = {
202+
chromatic: { disableSnapshot: true },
203+
};
198204

199205
/**
200206
* The spacious variant increases the spacing used within the table.
@@ -205,6 +211,9 @@ Spacious.args = {
205211
density: "spacious",
206212
};
207213
Spacious.tags = ["!dev"];
214+
Spacious.parameters = {
215+
chromatic: { disableSnapshot: true },
216+
};
208217

209218
/**
210219
* The standard multi-select table includes a column of checkboxes used for selecting rows.
@@ -215,6 +224,9 @@ MultiSelect.args = {
215224
rowItems: ExampleRowItems,
216225
};
217226
MultiSelect.tags = ["!dev"];
227+
MultiSelect.parameters = {
228+
chromatic: { disableSnapshot: true },
229+
};
218230

219231
/**
220232
* Excluding the `.spectrum-Table--emphasized` class will change the style of selected rows.
@@ -226,6 +238,9 @@ NonEmphasizedMultiSelect.args = {
226238
rowItems: ExampleRowItems,
227239
};
228240
NonEmphasizedMultiSelect.tags = ["!dev"];
241+
NonEmphasizedMultiSelect.parameters = {
242+
chromatic: { disableSnapshot: true },
243+
};
229244

230245
/**
231246
* The quiet table has a transparent background and no borders on the left and right.
@@ -236,6 +251,9 @@ Quiet.args = {
236251
isQuiet: true,
237252
};
238253
Quiet.tags = ["!dev"];
254+
Quiet.parameters = {
255+
chromatic: { disableSnapshot: true },
256+
};
239257

240258
export const QuietMultiSelect = Template.bind({});
241259
QuietMultiSelect.args = {
@@ -244,6 +262,9 @@ QuietMultiSelect.args = {
244262
};
245263
QuietMultiSelect.tags = ["!dev"];
246264
QuietMultiSelect.storyName = "Quiet multi-select";
265+
QuietMultiSelect.parameters = {
266+
chromatic: { disableSnapshot: true },
267+
};
247268

248269
/**
249270
* The standard table can display column dividers by including the `.spectrum-Table-cell--divider` class with `.spectrum-Table-cell`. Use sparingly to group related content.
@@ -271,6 +292,9 @@ WithColumnDividers.args = {
271292
};
272293
WithColumnDividers.tags = ["!dev"];
273294
WithColumnDividers.storyName = "With column dividers";
295+
WithColumnDividers.parameters = {
296+
chromatic: { disableSnapshot: true },
297+
};
274298

275299
/**
276300
* Tables can have a summary row to show totals, at either the top or the bottom of the table. This example shows both the optional summary row, and a row marked as selected.
@@ -299,6 +323,9 @@ SummaryAndSelected.args = {
299323
};
300324
SummaryAndSelected.tags = ["!dev"];
301325
SummaryAndSelected.storyName = "Summary and selected";
326+
SummaryAndSelected.parameters = {
327+
chromatic: { disableSnapshot: true },
328+
};
302329

303330
/**
304331
* Tables can style one or more rows as section headers.
@@ -333,6 +360,9 @@ SectionHeader.args = {
333360
};
334361
SectionHeader.tags = ["!dev"];
335362
SectionHeader.storyName = "Section header";
363+
SectionHeader.parameters = {
364+
chromatic: { disableSnapshot: true },
365+
};
336366

337367
export const SectionHeaderQuiet = Template.bind({});
338368
SectionHeaderQuiet.args = {
@@ -341,6 +371,9 @@ SectionHeaderQuiet.args = {
341371
};
342372
SectionHeaderQuiet.tags = ["!dev"];
343373
SectionHeaderQuiet.storyName = "Section header, quiet";
374+
SectionHeaderQuiet.parameters = {
375+
chromatic: { disableSnapshot: true },
376+
};
344377

345378
/**
346379
*
@@ -382,6 +415,9 @@ Scrollable.args = {
382415
],
383416
};
384417
Scrollable.tags = ["!dev"];
418+
Scrollable.parameters = {
419+
chromatic: { disableSnapshot: true },
420+
};
385421

386422
/**
387423
* A table can also be made up of `div` tags if needed, instead of a `<table>`. This example uses both the div markup, and the scrollable wrapper.
@@ -394,6 +430,9 @@ DivsScrollable.args = {
394430
rowItems: ExampleRowItems,
395431
};
396432
DivsScrollable.tags = ["!dev"];
433+
DivsScrollable.parameters = {
434+
chromatic: { disableSnapshot: true },
435+
};
397436

398437
/**
399438
* In a table with collapsible rows, all child items must have columns that match the parent items. If they don’t, consider using multiple drill-in tables, [Miller columns](/docs/components-miller-columns--docs), or [breadcrumbs](/docs/components-breadcrumbs--docs) instead.
@@ -458,6 +497,9 @@ Collapsible.args = {
458497
],
459498
};
460499
Collapsible.tags = ["!dev"];
500+
Collapsible.parameters = {
501+
chromatic: { disableSnapshot: true },
502+
};
461503

462504
export const CollapsibleMultiSelect = Template.bind({});
463505
CollapsibleMultiSelect.storyName = "Collapsible multi-select";
@@ -527,6 +569,9 @@ CollapsibleMultiSelect.args = {
527569
],
528570
};
529571
CollapsibleMultiSelect.tags = ["!dev"];
572+
CollapsibleMultiSelect.parameters = {
573+
chromatic: { disableSnapshot: true },
574+
};
530575

531576
/**
532577
* Thumbnails can be used in the table content, with some additional markup and classes for alignment.
@@ -554,6 +599,9 @@ Thumbnails.args = {
554599
],
555600
};
556601
Thumbnails.tags = ["!dev"];
602+
Thumbnails.parameters = {
603+
chromatic: { disableSnapshot: true },
604+
};
557605

558606
/**
559607
* The thumbnail table variant can also be combined with collapsible rows.
@@ -600,6 +648,9 @@ ThumbnailsCollapsible.args = {
600648
};
601649
ThumbnailsCollapsible.tags = ["!dev"];
602650
ThumbnailsCollapsible.storyName = "Thumbnails, collapsible";
651+
ThumbnailsCollapsible.parameters = {
652+
chromatic: { disableSnapshot: true },
653+
};
603654

604655
/**
605656
* The table body can accept dropped content.
@@ -610,6 +661,9 @@ DropzoneBody.args = {
610661
};
611662
DropzoneBody.tags = ["!dev"];
612663
DropzoneBody.storyName = "Dropzone, body";
664+
DropzoneBody.parameters = {
665+
chromatic: { disableSnapshot: true },
666+
};
613667

614668
/**
615669
* In addition to the overall table, individual rows can be designated as a drop target to accept dropped content. Only one dropzone row should show at a time, but this example sets multiple at different parts of the table to test that they all display the same.
@@ -642,6 +696,9 @@ DropzoneRow.args = {
642696
};
643697
DropzoneRow.tags = ["!dev"];
644698
DropzoneRow.storyName = "Dropzone, row";
699+
DropzoneRow.parameters = {
700+
chromatic: { disableSnapshot: true },
701+
};
645702

646703
export const DropzoneRowQuiet = Template.bind({});
647704
DropzoneRowQuiet.args = {
@@ -650,6 +707,9 @@ DropzoneRowQuiet.args = {
650707
};
651708
DropzoneRowQuiet.tags = ["!dev"];
652709
DropzoneRowQuiet.storyName = "Dropzone, row, quiet";
710+
DropzoneRowQuiet.parameters = {
711+
chromatic: { disableSnapshot: true },
712+
};
653713

654714
// ********* VRT ONLY ********* //
655715
export const WithForcedColors = TableGroup.bind({});

0 commit comments

Comments
 (0)