Skip to content

feat: [command] use base ui empty and status - #960

Open
ravisuhag wants to merge 1 commit into
mainfrom
feat/command-empty-status
Open

ravisuhag wants to merge 1 commit into
mainfrom
feat/command-empty-status

Conversation

@ravisuhag

Copy link
Copy Markdown
Member

Summary

  • Rebuild Command.Empty on Base UI Autocomplete.Empty. The element stays mounted as a polite live region and shows its children only when no items match. With the items prop, Base UI's filtered items decide. Without it, each Command.Item registers in a small count context, because Command filters its own children.

  • Add Command.Status, a visually hidden live region on Base UI Autocomplete.Status that announces the match count while the input has text. Its children can be a function of the count. It has the command-status data-slot.

  • Add tests, update props, demos, and the Slots table. The docs search hides its empty-state min-height when the element is empty.

  • Why it's like this: Command.Empty was built as a plain div and hidden with a CSS :has() rule. The move to Base UI (feat: migrate command to Base UI #748) kept it.

  • Breaking: small. Command.Empty now shows and hides on its own. The element is always in the DOM, so custom styles with a fixed size need an :empty rule.

  • I have followed the pull request section of the contributing guide.

@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
apsara Ready Ready Preview Oct 8, 2026 1:07am UTC

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ce27273d-0897-4909-8440-ffad2ac162ba
📥 Commits

Reviewing files that changed from the base of the PR and between 86eb92b and 88b7589.

📒 Files selected for processing (13)
  • apps/www/src/components/docs/search.module.css
  • apps/www/src/content/docs/components/command/demo.ts
  • apps/www/src/content/docs/components/command/index.mdx
  • apps/www/src/content/docs/components/command/props.ts
  • packages/react/components/command/__tests__/command.test.tsx
  • packages/react/components/command/__tests__/data-slots.test.tsx
  • packages/react/components/command/command-empty.tsx
  • packages/react/components/command/command-item.tsx
  • packages/react/components/command/command-root.tsx
  • packages/react/components/command/command.module.css
  • packages/react/components/command/command.tsx
  • packages/react/shared/item-count/index.ts
  • packages/react/shared/item-count/item-count.tsx
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@raystack/apsara@960

commit: 88b7589

This branch was successfully deployed

1 active deployment
Preview — 88b75896 Deployed Oct 8, 2026 by vercel[bot]
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.

1 participant