Skip to content

fix(Select/SelectMenu): add responsive text size - #6903

Merged
benjamincanac merged 1 commit into
v4from
fix/select-fixed-variant
Aug 31, 2026
Merged

fix(Select/SelectMenu): add responsive text size#6903
benjamincanac merged 1 commit into
v4from
fix/select-fixed-variant

Conversation

@benjamincanac

@benjamincanac benjamincanac commented Aug 31, 2026

Copy link
Copy Markdown
Member

🔗 Linked issue

Resolves #6892 (related: #4117, where selects were already called out but #6074 only covered inputs)

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Select and SelectMenu were left out of the responsive text size treatment added in #6074, so they render text-sm at every width while Input, Textarea, InputNumber and PinInput step from text-base on mobile down to md:text-sm. This made a select visibly smaller than the input next to it on mobile, and SelectMenu was inconsistent with itself since its search field is a real UInput that can't drop to 14px on mobile without triggering iOS zoom.

The theme already inherits the fixed variant and its compound variants from input, they were just neutered by re-pinned base classes. This removes those overrides so the responsive sizes flow through, adds the fixed prop to both components like the other form controls, and forwards it to the SelectMenu search input so trigger and search field always agree.

Padding and line-heights are untouched, so control heights stay the same next to buttons.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@github-actions github-actions Bot added the v4 #4488 label Aug 31, 2026
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 26f5e439-c72c-4c57-95e9-9426fee6ee56

📥 Commits

Reviewing files that changed from the base of the PR and between 20c1954 and e53fc37.

⛔ Files ignored due to path filters (4)
  • test/components/__snapshots__/Select-vue.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/Select.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/SelectMenu-vue.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/SelectMenu.spec.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • src/runtime/components/Select.vue
  • src/runtime/components/SelectMenu.vue
  • src/theme/select.ts
💤 Files with no reviewable changes (1)
  • src/theme/select.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Select and SelectMenu now expose a fixed boolean prop. Select passes the prop to its theme variant configuration. SelectMenu forwards the prop to its search input and theme variant configuration. The select theme removes size-specific base class definitions while retaining the other size-specific styles.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to e53fc

This localized change aligns Select and SelectMenu text sizing across breakpoints and keeps the trigger and search field consistent; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address issue #6892 by removing blocking base-class overrides, adding the fixed prop, and forwarding it to the SelectMenu search input. The changes support responsive sizing and consistenc…
Out of Scope Changes check ✅ Passed All reviewed changes support the linked issue objectives. No unrelated code changes are shown.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Title check ✅ Passed The title clearly identifies the affected components and the responsive text-size fix.
Description check ✅ Passed The description directly explains the responsive sizing issue, the implementation, and the affected components.
Full details: Linked Issues check

Explanation

The changes address issue #6892 by removing blocking base-class overrides, adding the fixed prop, and forwarding it to the SelectMenu search input. The changes support responsive sizing and consistency between the trigger and search input.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/select-fixed-variant

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.

@benjamincanac benjamincanac changed the title fix(components): add responsive text size to Select and SelectMenu fix(Select/SelectMenu): add responsive text size Aug 31, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 31, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/ui@6903

commit: e53fc37

@codspeed-hq

codspeed-hq Bot commented Aug 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing fix/select-fixed-variant (e53fc37) with v4 (20c1954)

Open in CodSpeed

@benjamincanac
benjamincanac merged commit e791d30 into v4 Aug 31, 2026
27 checks passed
@benjamincanac
benjamincanac deleted the fix/select-fixed-variant branch August 31, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Select and SelectMenu miss the responsive font-size treatment that Input, Textarea, InputNumber and PinInput have

1 participant