Skip to content

fix(combobox): refactor forwardRef body under 70-line lint limit#292

Merged
bntvllnt merged 1 commit into
mainfrom
fix/combobox-lint-max-lines
May 10, 2026
Merged

fix(combobox): refactor forwardRef body under 70-line lint limit#292
bntvllnt merged 1 commit into
mainfrom
fix/combobox-lint-max-lines

Conversation

@bntvllnt
Copy link
Copy Markdown
Collaborator

@bntvllnt bntvllnt commented May 10, 2026

Problem

PR #288 (the #266 a11y fix) added aria-controls, aria-haspopup, and a React.useId() hook to the combobox. Those additions pushed the forwardRef arrow function from 70 → 71 lines, tripping the project's max-lines-per-function rule (limit 70). Every PR branched from main after #288 inherits the lint failure on Quality Gates → Lint — currently blocking #290 (#233 robots) and #291 (#234 sitemap).

Fix

Extract the <PopoverContent> + <Command> + <CommandList> JSX into a local ComboboxListPanel component. Pure structural refactor — no runtime behavior change. Both consumers (packages/ui source and apps/registry/registry/default copy) kept aligned per #266 / #269.

Metric Before After
forwardRef arrow body 71 lines 52 lines
Block including signature + closing 73 lines 62 lines

Validation

  • Refactor preserves all ARIA attributes, refs, and event wiring.
  • Both files stay byte-identical in semantic structure.
  • Local wc -l: forwardRef block now 62 lines.

Test plan

Related to #266
Part of #233
Part of #234

The aria-controls / aria-haspopup / listboxId additions from #266
pushed the forwardRef arrow body to 71 lines (limit 70), breaking
lint on every PR branched from main after that merge. PRs #290 #291
are blocked behind this.

Extract the PopoverContent + Command + CommandList JSX into a new
local component ComboboxListPanel. Pure structural refactor — no
runtime behavior change. Both consumers (packages/ui source and
apps/registry/registry/default copy) are kept aligned.

After:
  forwardRef arrow body: 62 lines (was 73, limit 70).

Refs #266
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

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

Project Deployment Actions Updated (UTC)
storybook Ready Ready Preview, Comment May 10, 2026 1:55pm
ui.vllnt.ai Ready Ready Preview, Comment May 10, 2026 1:55pm

Request Review

@bntvllnt bntvllnt merged commit 95faa10 into main May 10, 2026
9 of 10 checks passed
@bntvllnt bntvllnt deleted the fix/combobox-lint-max-lines branch May 10, 2026 13:55
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