Skip to content

Commit e408d88

Browse files
committed
remove more chip related comments
1 parent 85b8ecc commit e408d88

7 files changed

Lines changed: 21 additions & 195 deletions

File tree

packages/design-system/src/components/ds-comments-drawer/ds-comments-drawer.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ Interactive story demonstrating the filter functionality.
465465
- **Date range**: Filter by creation date
466466
- **Labels**: Filter by tags (Bug, High Priority, Feature Request, Documentation, Enhancement, Question)
467467
3. Click **Apply** to see the filtered results
468-
4. Selected filters appear as chips below the toolbar
469-
5. Click on a chip to remove that filter, or use **Clear all** to remove all filters
468+
4. Selected filters appear as tags below the toolbar
469+
5. Click on a tag to remove that filter, or use **Clear all** to remove all filters
470470
471471
**Current mock data:**
472472
- 4 unresolved comments with various authors and labels

packages/design-system/src/components/ds-select/ds-select.stories.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,14 @@ export const MultiSelect: Story = {
256256
const allOption = screen.getByRole('option', { name: 'All' });
257257
await userEvent.click(allOption);
258258

259-
// Click the "+7" chip to expand and show all selected items
260-
const expandChip = screen.getByRole('button', { name: /^\+\d+$/ });
261-
await userEvent.click(expandChip);
259+
// Click the "+7" tag to expand and show all selected items
260+
const expandTag = screen.getByRole('button', { name: /^\+\d+$/ });
261+
await userEvent.click(expandTag);
262262

263-
// Verify all options from mockOptions are displayed as chips
263+
// Verify all options from mockOptions are displayed as tags
264264
for (const option of mockOptions) {
265-
const chip = screen.getByRole('button', { name: option.label });
266-
await expect(chip).toBeInTheDocument();
265+
const tag = screen.getByRole('button', { name: option.label });
266+
await expect(tag).toBeInTheDocument();
267267
}
268268

269269
// Close the dropdown by clicking the trigger
@@ -279,12 +279,12 @@ export const MultiSelect: Story = {
279279

280280
// Delete the first option by clicking its delete button
281281
const firstOption = mockOptions[0] as DsSelectOption;
282-
const firstOptionChip = screen.getByRole('button', { name: firstOption.label });
283-
const deleteButton = within(firstOptionChip).getByRole('button', { name: 'Delete tag' });
282+
const firstOptionTag = screen.getByRole('button', { name: firstOption.label });
283+
const deleteButton = within(firstOptionTag).getByRole('button', { name: 'Delete tag' });
284284
await userEvent.click(deleteButton);
285285

286286
// Verify deleted option is no longer visible
287-
await expect(firstOptionChip).not.toBeInTheDocument();
287+
await expect(firstOptionTag).not.toBeInTheDocument();
288288

289289
// Click the "Clear All" button
290290
const clearAllButton = screen.getByRole('button', { name: 'Clear All' });
@@ -454,11 +454,11 @@ export const CustomRenderOptionMultiSelect: Story = {
454454
const gbOption = screen.getByRole('option', { name: /United Kingdom/ });
455455
await userEvent.click(gbOption);
456456

457-
const usChip = screen.getByRole('button', { name: 'United States' });
458-
await expect(usChip).toBeInTheDocument();
457+
const usTag = screen.getByRole('button', { name: 'United States' });
458+
await expect(usTag).toBeInTheDocument();
459459

460-
const gbChip = screen.getByRole('button', { name: 'United Kingdom' });
461-
await expect(gbChip).toBeInTheDocument();
460+
const gbTag = screen.getByRole('button', { name: 'United Kingdom' });
461+
await expect(gbTag).toBeInTheDocument();
462462
},
463463
};
464464

packages/design-system/src/components/ds-select/ds-select.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import styles from './ds-select.module.scss';
66
import type { DsSelectOption, DsSelectProps } from './ds-select.types';
77
import { DsIcon } from '../ds-icon';
88
import { type DsCheckboxProps, DsCheckbox } from '../ds-checkbox';
9-
import { SelectItemsChips } from './select-items-chips';
9+
import { SelectItemsTags } from './select-items-tags.tsx';
1010
import { DsTypography } from '../ds-typography';
1111
import { DsTextInput } from '../ds-text-input';
1212
import { SELECT_ALL_VALUE, getUserSelectedItems } from './utils';
@@ -202,7 +202,7 @@ const DsSelect = ({
202202
)}
203203

204204
{multiselectProps.multiple && (
205-
<SelectItemsChips
205+
<SelectItemsTags
206206
onValueChange={multiselectProps.onValueChange}
207207
showAll={showAllItems}
208208
onShowAll={() => setShowAllItems(true)}

packages/design-system/src/components/ds-select/ds-select.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export type DsSelectProps = {
6060
/**
6161
* Custom render function for dropdown options.
6262
* When provided, replaces the default label text inside each dropdown item.
63-
* The string `label` is still used for search, trigger text, chips, and accessibility.
63+
* The string `label` is still used for search, trigger text, tags, and accessibility.
6464
*/
6565
renderOption?: (option: DsSelectOption) => ReactNode;
6666
} & (

packages/design-system/src/components/ds-select/select-items-chips.tsx renamed to packages/design-system/src/components/ds-select/select-items-tags.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { DsButton } from '../ds-button';
44
import { DsTag } from '../ds-tag';
55
import type { DsSelectOption, SelectOptionValue } from './ds-select.types';
66

7-
type SelectItemsChipsProps = {
7+
type SelectItemsTagsProps = {
88
showAll: boolean;
99
onValueChange?: (value: SelectOptionValue[]) => void;
1010
onShowAll: () => void;
1111
count: number;
1212
};
1313

14-
export function SelectItemsChips({ showAll, onShowAll, onValueChange, count }: SelectItemsChipsProps) {
14+
export function SelectItemsTags({ showAll, onShowAll, onValueChange, count }: SelectItemsTagsProps) {
1515
const { collection, value: selectedItems } = useSelectContext() as UseSelectContext<DsSelectOption>;
1616

1717
if (!selectedItems.length) {

packages/design-system/src/components/ds-table/filters/adapters/create-checkbox-filter-adapter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface CheckboxFilterAdapterConfig<TData, TValue> {
2626
renderer?: (item: CheckboxFilterItem<TValue>) => ReactNode;
2727

2828
/**
29-
* Optional custom chip label generator
29+
* Optional custom tag label generator
3030
* @default (item) => `${label}: ${item.label}`
3131
*/
3232
tagLabelTemplate?: (item: CheckboxFilterItem<TValue>) => string;

packages/eslint-plugin-internal/src/rules/__tests__/consistent-deprecated-stories.test.ts

Lines changed: 0 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,6 @@ ruleTester.run('consistent-deprecated-stories', consistentDeprecatedStories, {
4040
`,
4141
},
4242

43-
{
44-
name: 'inline deprecated component with correct suffix and tag',
45-
code: `
46-
/** @deprecated */
47-
function DsChip() { return null; }
48-
49-
const meta = {
50-
title: 'Design System/Chip (Deprecated)',
51-
component: DsChip,
52-
tags: ['autodocs', 'deprecated'],
53-
};
54-
55-
export default meta;
56-
`,
57-
},
58-
5943
{
6044
name: 'imported deprecated component with correct suffix and tag',
6145
code: `
@@ -175,88 +159,6 @@ ruleTester.run('consistent-deprecated-stories', consistentDeprecatedStories, {
175159
],
176160

177161
invalid: [
178-
{
179-
name: 'missing both suffix and tags prop - fixes both',
180-
code: `
181-
/** @deprecated */
182-
function DsChip() { return null; }
183-
184-
const meta = {
185-
title: 'Design System/Chip',
186-
component: DsChip,
187-
};
188-
189-
export default meta;
190-
`,
191-
output: `
192-
/** @deprecated */
193-
function DsChip() { return null; }
194-
195-
const meta = {
196-
title: 'Design System/Chip (Deprecated)',
197-
component: DsChip,\n\ttags: ['deprecated'],
198-
};
199-
200-
export default meta;
201-
`,
202-
errors: [
203-
{
204-
messageId: 'missingDeprecatedTag',
205-
data: { component: 'DsChip' },
206-
line: 5,
207-
column: 18,
208-
endLine: 8,
209-
endColumn: 6,
210-
},
211-
{
212-
messageId: 'missingDeprecatedSuffix',
213-
data: { component: 'DsChip' },
214-
line: 6,
215-
column: 13,
216-
endLine: 6,
217-
endColumn: 33,
218-
},
219-
],
220-
},
221-
222-
{
223-
name: 'has suffix but missing tag - appends to existing tags',
224-
code: `
225-
/** @deprecated */
226-
function DsChip() { return null; }
227-
228-
const meta = {
229-
title: 'Design System/Chip (Deprecated)',
230-
component: DsChip,
231-
tags: ['autodocs'],
232-
};
233-
234-
export default meta;
235-
`,
236-
output: `
237-
/** @deprecated */
238-
function DsChip() { return null; }
239-
240-
const meta = {
241-
title: 'Design System/Chip (Deprecated)',
242-
component: DsChip,
243-
tags: ['autodocs', 'deprecated'],
244-
};
245-
246-
export default meta;
247-
`,
248-
errors: [
249-
{
250-
messageId: 'missingDeprecatedTag',
251-
data: { component: 'DsChip' },
252-
line: 8,
253-
column: 6,
254-
endLine: 8,
255-
endColumn: 24,
256-
},
257-
],
258-
},
259-
260162
{
261163
name: 'has tag but missing label - appends suffix',
262164
code: `
@@ -342,82 +244,6 @@ ruleTester.run('consistent-deprecated-stories', consistentDeprecatedStories, {
342244
],
343245
},
344246

345-
{
346-
name: 'suffix in the middle - moves suffix to the end',
347-
code: `
348-
/** @deprecated */
349-
function DsChip() { return null; }
350-
351-
const meta = {
352-
title: 'Design System/Chip (Deprecated) Old',
353-
component: DsChip,
354-
tags: ['deprecated'],
355-
};
356-
357-
export default meta;
358-
`,
359-
output: `
360-
/** @deprecated */
361-
function DsChip() { return null; }
362-
363-
const meta = {
364-
title: 'Design System/Chip Old (Deprecated)',
365-
component: DsChip,
366-
tags: ['deprecated'],
367-
};
368-
369-
export default meta;
370-
`,
371-
errors: [
372-
{
373-
messageId: 'missingDeprecatedSuffix',
374-
data: { component: 'DsChip' },
375-
line: 6,
376-
column: 13,
377-
endLine: 6,
378-
endColumn: 50,
379-
},
380-
],
381-
},
382-
383-
{
384-
name: 'suffix has multiple spaces - removes extra spaces',
385-
code: `
386-
/** @deprecated */
387-
function DsChip() { return null; }
388-
389-
const meta = {
390-
title: 'Design System/Chip (Deprecated)',
391-
component: DsChip,
392-
tags: ['deprecated'],
393-
};
394-
395-
export default meta;
396-
`,
397-
output: `
398-
/** @deprecated */
399-
function DsChip() { return null; }
400-
401-
const meta = {
402-
title: 'Design System/Chip (Deprecated)',
403-
component: DsChip,
404-
tags: ['deprecated'],
405-
};
406-
407-
export default meta;
408-
`,
409-
errors: [
410-
{
411-
messageId: 'unformattedDeprecatedSuffix',
412-
data: { component: 'DsChip' },
413-
line: 6,
414-
column: 13,
415-
endLine: 6,
416-
endColumn: 49,
417-
},
418-
],
419-
},
420-
421247
{
422248
name: 'inline default export without suffix and tags prop - fixes both',
423249
code: `

0 commit comments

Comments
 (0)