Repository navigation
docs(combobox): restore Storybook coverage lost in TS rewrite - #3221
Merged
Merged
Conversation
The React 19/TS rewrite (#3195) replaced storybook-stories.jsx with Combobox.stories.tsx but dropped coverage for several already-supported props/variants: field-level help tooltip, menu separators, inherited menu width, scrollable menu, custom input, search/add-entity items, controlled open state, async loading, popover (dialog) variant, per-option disabled tooltips, and readonly-variant disabled options/deselect/custom item rendering. No component code changes are needed — this only restores Storybook documentation parity per the gap flagged in review.
…ng it Several stories rendered a removable selection pill but never handled its remove event, so clicking the pill's X did nothing. Pre-existing on master, not introduced by the new stories added in this PR.
Contributor
|
@showerbee Merge conflict is present. As an aside, unlike SLDS blueprints, the purpose of Storybook stories in this codebase is not purely demo but also as a testing environment for HTML snapshot test generation–to know what changes in the DOM render when code changes are made. You mention stories having controls in the description above. Most of the stories in this Storybook do not have controls. |
…-storybook-parity # Conflicts: # components/combobox/__docs__/Combobox.stories.tsx
The story-snapshot suite auto-discovers every story via composeStories, so the 14 stories added in this PR need their own committed snapshots. No existing snapshots changed.
Collaborator
Author
|
@interactivellama thanks — both points fixed:
While resolving the conflict I also found (and fixed) that `BaseWithMenuSubheader` and 8 other pre-existing stories were missing `onRequestRemoveSelectedOption`, so clicking a pill's remove (X) button did nothing — unrelated to the new stories, but in the same file, so fixed it here. |
5 of 15 tasks
interactivellama
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the feedback on #3213 (#3213 (comment)): the React 19/TypeScript rewrite (#3195) replaced
storybook-stories.jsxwithCombobox.stories.tsx, but several stories documenting already-supported props/variants were not carried over. This PR restores that coverage — no component code changes, docs/Storybook only.New stories added:
WithInlineHelpTooltip,WithMenuSeparator,WithInheritedMenuWidth,WithScrollableMenu,WithCustomInputComponentSearchAndAddEntities,ControlledOpenState,InlineMultipleLoadingReadonlyWithDisabledOption,ReadonlyMultipleWithDeselect,ReadonlyWithCustomMenuItemPopoverVariantWithDisabledOptionTooltip,WithCustomMenuItemDisabledOptionPure selection-state permutations of an already-covered prop combo (e.g. picking a different option in a story that already demonstrates that variant) were intentionally skipped rather than restoring all ~34 original stories 1:1, since each story here uses a custom
renderclosure rather thanargs, so exercising a different selection just means interacting with the running story directly.Also fixed while in here:
BaseWithMenuSubheaderand 8 other stories were missingonRequestRemoveSelectedOptionin theirevents, so the pill's remove (X) button was a dead click — pre-existing on master, unrelated to the new stories.Test plan
eslintpasses on the modified file (0 errors; one pre-existing unrelated warning)vitest run components/combobox components/pill components/pill-container components/__tests__/story-snapshots.test.jsx— 511 passed, including 14 new HTML snapshots for the added stories (no existing snapshots changed)combobox.tsx/menu.tsxchanges — confirmed all new stories exercise already-supported propsmaster(which landed fix(combobox): restore selected-pill focus & multi-selection semantics (#3211) #3213's pill-focus/multi-selection fix) to resolve the conflict inCombobox.stories.tsx