Skip to content

Comments

[CommandPalette] Add Storybook stories#211

Open
Rohitgautam02 wants to merge 1 commit intortCamp:developfrom
Rohitgautam02:docs/commandpalette-add-storybook-stories
Open

[CommandPalette] Add Storybook stories#211
Rohitgautam02 wants to merge 1 commit intortCamp:developfrom
Rohitgautam02:docs/commandpalette-add-storybook-stories

Conversation

@Rohitgautam02
Copy link

Description

Added Storybook stories for the CommandPalette component which was missing documentation.

Relevant Technical Choices

Added 5 stories covering all component features:

  • Default - Basic command palette with navigation items and search filtering
  • MultipleGroups - Multiple grouped sections (Pages, Actions, Settings)
  • WithDisabledItems - Demonstrates disabled item behavior
  • HiddenGroupTitle - Uses hideTitle: true to hide group headers
  • KeyboardShortcut - Demonstrates the Ctrl+K keyboard shortcut to open the palette

Followed existing story patterns from other components (Dialog, Combobox, Badge).

Testing Instructions

  1. Run pnpm storybook
  2. Navigate to Components → CommandPalette
  3. Verify all 5 stories render correctly
  4. Test search filtering in each story
  5. Test the Ctrl+K keyboard shortcut in the KeyboardShortcut story

Additional Information

This is a documentation improvement. All checks pass:

  • pnpm lint:types - clean
  • pnpm lint:js - no errors from new file
  • pnpm build-storybook - builds successfully

Copilot AI review requested due to automatic review settings February 9, 2026 08:05
Copy link
Contributor

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

Adds Storybook documentation coverage for the CommandPalette component by introducing a dedicated stories file demonstrating key variants and behaviors.

Changes:

  • Added a new commandPalette.stories.tsx with 5 story variants (default, multiple groups, disabled items, hidden group title, keyboard shortcut).
  • Implemented per-story state for show and searchQuery, plus basic client-side filtering of groups/items.

@b1ink0
Copy link
Collaborator

b1ink0 commented Feb 9, 2026

@Rohitgautam02 important thing all commits must be signed with GPG so they show the "Verified" badge on GitHub. PRs with unsigned commits will not be accepted.

Follow GitHub's official guide: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

@Rohitgautam02 Rohitgautam02 force-pushed the docs/commandpalette-add-storybook-stories branch from 29e6dee to c6d2d89 Compare February 9, 2026 08:54
@Rohitgautam02
Copy link
Author

Addressed all review feedback from Copilot:

  • Replaced alert() with action("onSelect") from storybook/actions — selections now appear in the Storybook Actions panel without blocking the UI
  • Extracted filterGroups() helper to eliminate duplicated filtering logic across all stories
  • Updated keyboard shortcut text from "Ctrl" to "Ctrl/Cmd" to match the component's support for both ctrlKey and metaKey
  • Moved inline data in HiddenGroupTitle story to a top-level constant for consistency

Commit is now GPG-signed and verified.

@Rohitgautam02
Copy link
Author

  • @b1ink0 can you review it so that I proceed further

@b1ink0 b1ink0 changed the base branch from main to develop February 12, 2026 11:14
@b1ink0
Copy link
Collaborator

b1ink0 commented Feb 12, 2026

@Rohitgautam02, could you please create a branch from the latest develop branch and force-push it here? There is currently a commit in this PR that does not belong to it.

@b1ink0
Copy link
Collaborator

b1ink0 commented Feb 12, 2026

Also, please resolve the Copilot review yourself if you have addressed it.

@Rohitgautam02 Rohitgautam02 force-pushed the docs/commandpalette-add-storybook-stories branch from c6d2d89 to ee0eaac Compare February 16, 2026 09:06
@Rohitgautam02
Copy link
Author

Rohitgautam02 commented Feb 16, 2026

@b1ink0 Rebased the branch onto the latest develop — the extra merge commit is removed. Now only 1 commit in this PR.

Also resolved all Copilot review threads (all feedback was already addressed in the previous force-push).

@Rohitgautam02
Copy link
Author

@b1ink0 @mohdsayed sir please check this out and review me something so that I can proceed ahead and learn and contribute more also I am actively looking for opportunities and work so if you can guide and assist me that will be really helpful

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