feat(SelectDropdown): isCreateable support, removes SearchIcon, styling fixes#3371
feat(SelectDropdown): isCreateable support, removes SearchIcon, styling fixes#3371dreamwasp wants to merge 6 commits into
isCreateable support, removes SearchIcon, styling fixes#3371Conversation
|
View your CI Pipeline Execution ↗ for commit cd2dc5a ☁️ Nx Cloud last updated this comment at |
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Pull request overview
Adds “creatable” support to the Gamut SelectDropdown (single + multi), updates dropdown indicator icon behavior (removes the search icon), and reorganizes/expands Styleguide documentation and examples to cover controlled/uncontrolled + creatable patterns.
Changes:
- Implement
isCreatablesupport (includingformatCreateLabel,isValidNewOption,onCreateOption, andvalidationMessage) and route rendering throughreact-select/creatable. - Update dropdown visuals/behavior (remove searchable SearchIcon indicator, tweak menu/option styling).
- Expand and reorder Storybook docs/stories (new creatable stories + new docs tables) and add corresponding unit tests.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/SelectDropdown.stories.tsx | Reorders stories and adds new creatable examples (single, multi, validation). |
| packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/SelectDropdown.mdx | Restructures docs and adds creatable + controlled/uncontrolled guidance and tables. |
| packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/creatablePropsTable.tsx | Adds a props table documenting creatable-specific API surface. |
| packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/controlledModeTable.tsx | Adds a table clarifying controlled vs uncontrolled patterns across modes. |
| packages/gamut/src/Form/SelectDropdown/types/styles.ts | Extends option-state typing to support creatable “Add” row metadata. |
| packages/gamut/src/Form/SelectDropdown/types/component-props.ts | Adds new creatable-related props and a TS constraint tying isCreatable to isSearchable. |
| packages/gamut/src/Form/SelectDropdown/styles.ts | Styling updates for menu shadow/no-options text and creatable “Add” row styling. |
| packages/gamut/src/Form/SelectDropdown/SelectDropdown.tsx | Wires new creatable props into the SelectDropdown implementation and forwards new callbacks. |
| packages/gamut/src/Form/SelectDropdown/elements/options.tsx | Avoids rendering selection checkmark on the creatable “Add” row. |
| packages/gamut/src/Form/SelectDropdown/elements/controls.tsx | Removes SearchIcon indicator selection logic; always uses chevron indicator. |
| packages/gamut/src/Form/SelectDropdown/elements/containers.tsx | Switches underlying implementation to CreatableSelect when isCreatable is set. |
| packages/gamut/src/Form/SelectDropdown/elements/constants.ts | Removes SearchIcon and searchable indicator variants. |
| packages/gamut/src/Form/tests/SelectDropdown.test.tsx | Adds/extends tests for creatable behavior and validationMessage. |
| packages/gamut/agent-tools/skills/gamut-select-dropdown/SKILL.md | Adds a SelectDropdown-specific agent skill documenting patterns/pitfalls. |
| packages/gamut/agent-tools/skills/gamut-forms/SKILL.md | Links forms skill to the new SelectDropdown skill for dropdown-specific guidance. |
| if (actionMeta.action === 'create-option') { | ||
| onCreateOption?.(actionMeta.option?.value ?? ''); | ||
| } |
|
📬 Published Alpha Packages:
|
|
🚀 Styleguide deploy preview ready! Preview URL: https://6a2c6c300b2903e22b8bc831--gamut-preview.netlify.app |
Overview
Adds
isCreatablesupport toSelectDropdownfor single + multi-select, letting users type and add options not already in the list. Also removes theSearchIconfrom searchable dropdowns (replaced with arrow). I also added a SelectDropdown agent skill (referenced in the form skill), made some styling fixes, and rearranged Storybook documentation to have a better flow.PR Checklist
Testing Instructions
PR Links and Envs