fix(Select,SelectMenu): add the fixed prop to hold the mobile text size - #525
Merged
Conversation
Ports `e791d302`, the last of the four upstream commits in this queue. `Input` and `InputMenu` carry a `fixed` prop; `Select` and `SelectMenu` did not, so their text size could not be held at the mobile value. The feature exists for iOS Safari, which zooms the page when a text control under 16px takes focus — the mobile size is the larger one and `md:` steps it back down, and `fixed` opts out of that step. The component half applies exactly: both files carried upstream's pre-image, so the prop, the `tv()` argument and SelectMenu's `searchInputProps` forwarding land as written. Upstream's doc comment is taken without this fork's "(Left for backward compatibility.)" parenthetical, which is true of `fixed` on Input but would be false of a prop that is new here. The theme half is deliberately not taken. Upstream deletes `base` from all five size variants so sizing falls through to the `input` theme; ours already inherits the responsive part through `defuFn`, verified by reading rendered output rather than theme source — the committed Select snapshots carry `md:text-(length:…)` in 44 places and SelectMenu in 96, before this change. What our `base` lines add on top is explicit heights and this fork's own font scale, plus an `xss` size upstream has no equivalent of, so deleting them would change the height of every Select in the library. Tests assert behaviour rather than snapshot it, because the prop's whole effect is a class that is absent and no snapshot moves: the responsive override is present by default, gone with `fixed`, and the un-prefixed size class survives both ways — the last guarding the wrong fix of dropping the base size instead of the override. Removing the port turns 2 red; inverting it turns 101 red. Recorded in the log and not fixed here: `fixed` on Input and InputMenu has no test at all and has been shipping uncovered since it was introduced. Gate: lint, typecheck, build (3.86 MB), test (340 files, 7706 passed), test:module.
IgorShevchik
added a commit
that referenced
this pull request
Sep 1, 2026
The four entries written during this run carried `pending-merge` in both `pr` and `b24ui_sha`, because the entry goes in with the port before its PR has a number or a squash SHA. Both PRs have now merged: - `9c99bf16`, `9d46fc7e`, `20c1954d` → #524 / `1e33c0a2` - `e791d302` → #525 / `0a8c87ca` Bookkeeping only — no entry is added, the cursor does not move, and no decision changes. This is also the first run through the corrected ordering guard from #524: its previous form forbade `pending-merge` outright and would have blocked this exact sequence, while the corrected form allowed the four-entry tail during the port and now sees it emptied.
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.
Ports
e791d302— the last of the four upstream commits in this queue, after #524 took the other three. Cursor moves toe791d302, which isnuxt/uiv4HEAD, so the sync is caught up again.What the prop is for
InputandInputMenucarry afixedprop;SelectandSelectMenudid not, so their text size could not be held at the mobile value.The mechanism is easy to read backwards. iOS Safari zooms the page when a text control under 16px takes focus, so the mobile size is the larger one and a
md:override steps it back down above the breakpoint.fixeddrops that override, and the mobile size holds everywhere.Component half — applies exactly
Both files carried upstream's pre-image (
highlight?: booleanwith nofixedafter it; atv()call withhighlight: highlight.valueand nofixed), so all three hunks land as written, includingSelectMenuforwardingfixedintosearchInputPropsso the field inside the menu follows the same setting.One deliberate wording change: this fork documents
fixedonInput.vueandInputMenu.vueas "Keep the mobile text size on all breakpoints. (Left for backward compatibility.)". The parenthetical is not copied — onSelectthe prop is new rather than inherited, and carrying that note across would say something false about it.Theme half — not taken, and taking it would be a regression
Upstream deletes
basefrom all five size variants inselect.tsso the base sizing falls through to theinputtheme it extends. Here that would break sizing, for two reasons established by measurement rather than by reading the theme:We already inherit the responsive part.
theme/select.tsextendsinputthroughdefuFn, and the compound variants pairingfixed: falsewith each size come with it. The committed snapshots say so directly —Selectcarriesmd:text-(length:…)in 44 places andSelectMenuin 96, before this change. So the fork was never missing the responsive rule; it was missing the lever to switch it off, which is exactly what the component half adds.Our
baselines are not upstream's. They readh-[28px] gap-1.5 text-(length:--ui-font-size-xs)/[normal]— explicit heights and this fork's own font scale, one step offinput's at several sizes — plus anxsssize upstream has no equivalent of. Deleting them would change the height of every Select in the library.Tests assert, rather than snapshot
The prop's whole effect is a class that is absent, and no snapshot moves:
fixeddefaults to unset, so the default render is unchanged. A snapshot case would pin the classes without stating what the prop is for, and would keep passing if the responsive rule stopped reachingSelectaltogether.Three assertions per component instead:
md:text-(length:…)matchesfixedMutation-checked rather than assumed:
fixed: props.fixedfrom bothtv()calls — i.e. reverting the port — turns 2 red, exactly the two that pin the new behaviour;!props.fixedturns 101 red, snapshots included, which confirms the wiring reaches rendered output rather than stopping at the props object.Recorded, not fixed here
fixedonInputandInputMenuhas no test at all and has been shipping uncovered since it was introduced. Out of scope for a port of a Select commit, but it is the same prop and the same mechanism, and the assertions above transfer directly. Written into.sync/log/e791d302….mdso it is not lost.Verification
lint·typecheck·build(3.86 MB) ·test— 340 files, 7706 passed, 6 skipped ·test:module.Generated by Claude Code