Skip to content

fix(CommandPalette): add Storybook controls for component props#51

Merged
garrity-miepub merged 2 commits intomainfrom
feature/command-palette-updates
Feb 2, 2026
Merged

fix(CommandPalette): add Storybook controls for component props#51
garrity-miepub merged 2 commits intomainfrom
feature/command-palette-updates

Conversation

@garrity-miepub
Copy link
Copy Markdown
Contributor

  • Add comprehensive argTypes configuration for CommandPalette props
  • Add text controls for placeholder and className
  • Add boolean control for isLoading
  • Disable controls for complex props (emptyState, renderItem, footer)
  • Add action handler for onSelect callback
  • Add default args at meta level for initial control values
  • Add Playground story with wrapper component that:
    • Properly uses useCommandPalette hook within provider context
    • Passes all args through to CommandPalette component
    • Syncs placeholder with CommandPaletteTrigger
  • Preserve all existing stories (Default, OpenByDefault, TriggerButton, CustomTrigger, Loading, Empty) unchanged

The Playground story enables dynamic manipulation of placeholder and isLoading props via the Storybook Controls panel while maintaining proper hook usage within the CommandPaletteProvider context.

command-palette-update.mov

- Add comprehensive argTypes configuration for CommandPalette props
- Add text controls for placeholder and className
- Add boolean control for isLoading
- Disable controls for complex props (emptyState, renderItem, footer)
- Add action handler for onSelect callback
- Add default args at meta level for initial control values
- Add Playground story with wrapper component that:
  - Properly uses useCommandPalette hook within provider context
  - Passes all args through to CommandPalette component
  - Syncs placeholder with CommandPaletteTrigger
- Preserve all existing stories (Default, OpenByDefault, TriggerButton,
  CustomTrigger, Loading, Empty) unchanged

The Playground story enables dynamic manipulation of placeholder and
isLoading props via the Storybook Controls panel while maintaining
proper hook usage within the CommandPaletteProvider context.
Copilot AI review requested due to automatic review settings February 2, 2026 23:48
@garrity-miepub garrity-miepub marked this pull request as ready for review February 2, 2026 23:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the CommandPalette Storybook documentation by adding comprehensive controls for interactive prop manipulation.

Changes:

  • Added argTypes configuration with controls for simple props (placeholder, isLoading, className) and disabled controls for complex props (emptyState, renderItem, footer)
  • Added default args at meta level for placeholder and isLoading
  • Created a new Playground story with a wrapper component that properly uses the useCommandPalette hook within provider context and syncs the placeholder prop between CommandPalette and CommandPaletteTrigger

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Args are inherited from meta-level configuration, so duplicating them
in the story is unnecessary.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 2, 2026

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6f93273
Status: ✅  Deploy successful!
Preview URL: https://d43e87f8.ui-6d0.pages.dev
Branch Preview URL: https://feature-command-palette-upda.ui-6d0.pages.dev

View logs

@garrity-miepub garrity-miepub merged commit c647237 into main Feb 2, 2026
10 checks passed
@garrity-miepub garrity-miepub deleted the feature/command-palette-updates branch February 2, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants