diff --git a/src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap b/src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap index e44e2402e1..0319a897a1 100644 --- a/src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap +++ b/src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap @@ -5217,20 +5217,24 @@ You must set the current value in the \`preferences.contentDensity\` property.", "type": "CollectionPreferencesProps.ContentDensityPreference", }, { - "description": "Configures the built-in content display preference for order and visibility of columns in a table. -Once set, the component displays this preference in the modal. + "description": "Configures the built-in content display preference for order and visibility of the table columns. +Recommended for table and not applicable for cards. + Cannot be used together with \`visibleContentPreference\`. +If you set it, the component displays this preference in the modal. + It contains the following: - \`title\` (string) - Specifies the text displayed at the top of the preference. - \`description\` (string) - Specifies the description displayed below the title. +- \`options\` - Specifies an array of options for reordering and visible content selection. +- \`enableColumnFiltering\` (boolean) - Adds a columns filter. - \`liveAnnouncementDndStarted\` ((position: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an option is picked. - \`liveAnnouncementDndDiscarded\` (string) - (Optional) Adds a message to be announced by screen readers when a reordering action is canceled. - \`liveAnnouncementDndItemReordered\` ((initialPosition: number, currentPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an item is being moved. - \`liveAnnouncementDndItemCommitted\` ((initialPosition: number, finalPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when a reordering action is committed. - \`dragHandleAriaDescription\` (string) - (Optional) Adds an ARIA description for the drag handle. - \`dragHandleAriaLabel\` (string) - (Optional) Adds an ARIA label for the drag handle. -- \`options\` - Specifies an array of options for reordering and visible content selection. Each option contains the following: - \`id\` (string) - Corresponds to a table column \`id\`. @@ -5451,8 +5455,8 @@ of the most recent getModalRoot call as an argument.", "type": "(rootElement: HTMLElement) => void", }, { - "description": "Configures the sticky columns preference. -You can set it for both left and right columns. + "description": "Configures the sticky columns preference that can be set for both left and right columns. +If you set it, the component displays this preference in the modal. It contains the following: - \`label\` (string) - Specifies the label for each radio group. @@ -5518,17 +5522,20 @@ You must set the current value in the \`preferences.stripedRows\` property.", "type": "string", }, { - "description": "Configures the built-in "visible content selection" preference (for example, visible sections in cards). -If you set it, the component displays this preference in the modal. + "description": "Configures the built-in visible sections preference for cards or visible columns for table. +Recommended for cards. For table use \`contentDisplayPreference\` instead. + Cannot be used together with \`contentDisplayPreference\`. +If you set it, the component displays this preference in the modal. + It contains the following: - \`title\` (string) - Specifies the text displayed at the top of the preference. - \`options\` - Specifies an array of groups of options for visible content selection. Each group of options contains the following: - \`label\` (string) - The text to display as a title for the options group. -- \`options\` - Specifies an aray of options in the group. Each option contains the following: +- \`options\` - Specifies an array of options in the group. Each option contains the following: - \`id\` (string) - Corresponds to a column \`id\` for tables or to a section \`id\` for cards. - \`label\` (string) - Specifies a short description of the content. - \`editable\` (boolean) - (Optional) Determines whether the user is able to toggle its visibility. This is \`true\` by default. diff --git a/src/collection-preferences/interfaces.ts b/src/collection-preferences/interfaces.ts index 726d5b3b91..246a75b3cf 100644 --- a/src/collection-preferences/interfaces.ts +++ b/src/collection-preferences/interfaces.ts @@ -79,9 +79,9 @@ export interface CollectionPreferencesProps extends */ contentDensityPreference?: CollectionPreferencesProps.ContentDensityPreference; /** - * Configures the sticky columns preference. + * Configures the sticky columns preference that can be set for both left and right columns. * - * You can set it for both left and right columns. + * If you set it, the component displays this preference in the modal. * * It contains the following: * - `label` (string) - Specifies the label for each radio group. @@ -91,21 +91,25 @@ export interface CollectionPreferencesProps extends */ stickyColumnsPreference?: CollectionPreferencesProps.StickyColumnsPreference; /** - * Configures the built-in content display preference for order and visibility of columns in a table. + * Configures the built-in content display preference for order and visibility of the table columns. + * + * Recommended for table and not applicable for cards. * - * Once set, the component displays this preference in the modal. * Cannot be used together with `visibleContentPreference`. * + * If you set it, the component displays this preference in the modal. + * * It contains the following: * - `title` (string) - Specifies the text displayed at the top of the preference. * - `description` (string) - Specifies the description displayed below the title. + * - `options` - Specifies an array of options for reordering and visible content selection. + * - `enableColumnFiltering` (boolean) - Adds a columns filter. * - `liveAnnouncementDndStarted` ((position: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an option is picked. * - `liveAnnouncementDndDiscarded` (string) - (Optional) Adds a message to be announced by screen readers when a reordering action is canceled. * - `liveAnnouncementDndItemReordered` ((initialPosition: number, currentPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when an item is being moved. * - `liveAnnouncementDndItemCommitted` ((initialPosition: number, finalPosition: number, total: number) => string) - (Optional) Adds a message to be announced by screen readers when a reordering action is committed. * - `dragHandleAriaDescription` (string) - (Optional) Adds an ARIA description for the drag handle. * - `dragHandleAriaLabel` (string) - (Optional) Adds an ARIA label for the drag handle. - * - `options` - Specifies an array of options for reordering and visible content selection. * * Each option contains the following: * - `id` (string) - Corresponds to a table column `id`. @@ -117,18 +121,21 @@ export interface CollectionPreferencesProps extends */ contentDisplayPreference?: CollectionPreferencesProps.ContentDisplayPreference; /** - * Configures the built-in "visible content selection" preference (for example, visible sections in cards). + * Configures the built-in visible sections preference for cards or visible columns for table. + * + * Recommended for cards. For table use `contentDisplayPreference` instead. * - * If you set it, the component displays this preference in the modal. * Cannot be used together with `contentDisplayPreference`. * + * If you set it, the component displays this preference in the modal. + * * It contains the following: * - `title` (string) - Specifies the text displayed at the top of the preference. * - `options` - Specifies an array of groups of options for visible content selection. * * Each group of options contains the following: * - `label` (string) - The text to display as a title for the options group. - * - `options` - Specifies an aray of options in the group. Each option contains the following: + * - `options` - Specifies an array of options in the group. Each option contains the following: * - `id` (string) - Corresponds to a column `id` for tables or to a section `id` for cards. * - `label` (string) - Specifies a short description of the content. * - `editable` (boolean) - (Optional) Determines whether the user is able to toggle its visibility. This is `true` by default.