fix(combobox): refactor forwardRef body under 70-line lint limit#292
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #288 (the #266 a11y fix) added
aria-controls,aria-haspopup, and aReact.useId()hook to the combobox. Those additions pushed theforwardRefarrow function from 70 → 71 lines, tripping the project'smax-lines-per-functionrule (limit 70). Every PR branched from main after #288 inherits the lint failure onQuality Gates → Lint— currently blocking #290 (#233 robots) and #291 (#234 sitemap).Fix
Extract the
<PopoverContent>+<Command>+<CommandList>JSX into a localComboboxListPanelcomponent. Pure structural refactor — no runtime behavior change. Both consumers (packages/uisource andapps/registry/registry/defaultcopy) kept aligned per #266 / #269.Validation
wc -l: forwardRef block now 62 lines.Test plan
Quality Gates → Lintpasses on this PR.Related to #266
Part of #233
Part of #234