Skip to content

feat(CommandTextArea): add component - #1222

Merged
tenphi merged 8 commits into
mainfrom
feat-command-text-area
Jul 3, 2026
Merged

tenphi merged 8 commits into
mainfrom
feat-command-text-area

Conversation

@tenphi

@tenphi tenphi commented Jul 1, 2026 •

Copy link
Copy Markdown
Member

Note

Medium Risk
Refactors ComboBox popover/filtering shared with a new field component; keyboard commit and filtering semantics changed in ways covered by tests but worth regression-testing ComboBox consumers.

Overview
Introduces CommandTextArea, a multiline field that keeps focus in the textarea while showing a virtual-focus list popover for configurable triggers (default line-start / commands or @-style tokens). Options insert their textValue, fire onCommand, and can match/highlight across textValue, plain-text children, and description; the popover is positioned at the caret via a mirror-measurement hook.

ComboBox no longer owns its inline overlay: shared ListBoxPopover (plus useCompositeFocus, list navigation, and filterCollectionNodes) drives the popover for both components. Filtering defaults to textValue only again for ComboBox; CommandTextArea opts into extra fields with matchExtraFields. ListBox / Item gain optionHighlight / description highlighting for search matches.

Follow-up fixes in the same change: virtual focus and Enter/Tab commit stay aligned with the visible filtered list; stable listStateRef hooks; caret resync and defaultValue for uncontrolled mode; docs, stories, tests, and a small bundle size-limit bump.

Reviewed by Cursor Bugbot for commit 8a2c322. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Jul 3, 2026 8:44am

Request Review

@changeset-bot

changeset-bot Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8a2c322

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-7ffd929.

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 402.16 KB (+0.93% 🔺) Yes 🎉
Tree shaking (just a Button) 114.36 KB (+0.02% 🔺) Yes 🎉

Click here if you want to find out what is changed in this build

Comment thread src/components/fields/CommandTextArea/CommandTextArea.tsx
Comment thread src/components/fields/CommandTextArea/CommandTextArea.tsx Outdated
Comment thread src/components/fields/CommandTextArea/CommandTextArea.tsx
Comment thread src/components/fields/ComboBox/ComboBox.tsx
Comment thread src/components/fields/CommandTextArea/CommandTextArea.tsx
Comment thread src/components/fields/CommandTextArea/CommandTextArea.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8a2c322. Configure here.

Comment thread src/components/fields/CommandTextArea/CommandTextArea.tsx
@tenphi
tenphi merged commit 4232aad into main Jul 3, 2026
16 checks passed
@tenphi
tenphi deleted the feat-command-text-area branch July 3, 2026 09:18
@github-actions github-actions Bot mentioned this pull request Jul 3, 2026

This branch was successfully deployed

2 active deployments
Preview — 8a2c3227 Deployed Jul 3, 2026 by vercel[bot]
Chromatic staging — 8a2c3227 Deployed Jul 3, 2026 by tenphi via Prepare Storybook for review & tests #3148
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