All the changes listed in #9718 require corresponding updates to the AddSelect Storybook stories, MDX documentation, patterns and tests so that patterns shown to consumers stay accurate and runnable.
Scope
Update packages/ibm-products/src/components/AddSelect/next/ :
next/AddSelect.stories.tsx
| Change from parent issue |
Story update required |
Issue 1 — onNavigate removed from root context |
Remove any story that passes onNavigate to root AddSelect; ensure navigation examples wire it through AddSelect.Column only |
Issue 2 — multi removed from root context |
Remove any multi prop set on root AddSelect; move it to the relevant AddSelect.Column instances |
| Issue 3 — search state renamed + JSDoc added |
Update story arg descriptions for onSearch on both Body and Column to reflect their scoped documentation |
Issue 5 — navIndicatorLabel new prop on AddSelectRow |
Add navIndicatorLabel as an argType in the AddSelectRow story with a descriptive default |
Issue 8 — itemDetails type changed to Array<{ label, value }> |
Update all story data (e.g. sampleItems, summaryItems) that use itemDetails from Record<string, unknown> to Array<{ label: string; value: string | number }> |
Issue 10 — SelectionSummary selectedItems + renderItem props removed; selectedItemCount added |
Rewrite the AddSelectSelectionSummary story to use composable AddSelect.SelectionSummaryItem children; replace selectedItems with selectedItemCount prop |
Issue 12 — open prop added to AddSelectItemPanel |
Add open as a boolean argType in the AddSelectItemPanel story; demonstrate show/hide toggle |
next/AddSelect.mdx
- Update all code examples in the MDX docs to reflect the same API changes listed above.
- Add a note under
AddSelectBody and AddSelectColumn clarifying that global search and column search are independent (from issue 3).
- Add a note under
AddSelectSelectionSummary documenting that the component is children-only (from issue 10).
next/AddSelect.test.js
- Update the
ControlledAddSelect test helper if it passes multi or onNavigate to root AddSelect.
- Update any test fixtures that use
itemDetails as a Record to the new Array<{ label, value }> shape.
- Update
SelectionSummary tests that rely on selectedItems or renderItem props.
Acceptance criteria
All the changes listed in #9718 require corresponding updates to the AddSelect Storybook stories, MDX documentation, patterns and tests so that patterns shown to consumers stay accurate and runnable.
Scope
Update
packages/ibm-products/src/components/AddSelect/next/:next/AddSelect.stories.tsxonNavigateremoved from root contextonNavigateto rootAddSelect; ensure navigation examples wire it throughAddSelect.Columnonlymultiremoved from root contextmultiprop set on rootAddSelect; move it to the relevantAddSelect.ColumninstancesonSearchon bothBodyandColumnto reflect their scoped documentationnavIndicatorLabelnew prop onAddSelectRownavIndicatorLabelas an argType in theAddSelectRowstory with a descriptive defaultitemDetailstype changed toArray<{ label, value }>sampleItems,summaryItems) that useitemDetailsfromRecord<string, unknown>toArray<{ label: string; value: string | number }>SelectionSummaryselectedItems+renderItemprops removed;selectedItemCountaddedAddSelectSelectionSummarystory to use composableAddSelect.SelectionSummaryItemchildren; replaceselectedItemswithselectedItemCountpropopenprop added toAddSelectItemPanelopenas a boolean argType in theAddSelectItemPanelstory; demonstrate show/hide togglenext/AddSelect.mdxAddSelectBodyandAddSelectColumnclarifying that global search and column search are independent (from issue 3).AddSelectSelectionSummarydocumenting that the component is children-only (from issue 10).next/AddSelect.test.jsControlledAddSelecttest helper if it passesmultioronNavigateto rootAddSelect.itemDetailsas aRecordto the newArray<{ label, value }>shape.SelectionSummarytests that rely onselectedItemsorrenderItemprops.Acceptance criteria
AddSelect.stories.tsxrun without errors after parent issue changes are appliedAddSelect.mdxcode examples reflect the updated API (no references to removed props)AddSelect.test.jstest fixtures updated; all tests passselectedItemsorrenderItemonSelectionSummarymultioronNavigateto the rootAddSelectnavIndicatorLabelandopenprops are demonstrated in their respective storiesitemDetailssample data usesArray<{ label, value }>shape throughout