fix(playgrounds): add the InputMenu autocomplete-mode row both are missing - #520
Merged
Conversation
…ssing Upstream's `2799fa6f` — the commit that renamed InputMenu's `autocomplete` boolean to `mode: 'combobox' | 'autocomplete'` — added a row exercising the new mode to its own playground. The port (#68) dropped that line, and nothing has added one since, so the mode has never been reachable by hand in either playground: no snapshot covers it either, since the render is identical and only the prop spelling differs. The row needs its own ref rather than reusing one above it. In autocomplete mode `modelValue` is the input text, a string, where every other row on the page holds a selected item — which is the whole point of the mode and the thing a person is there to look at. Found by backfilling that commit's `.sync/log/` entry in #518, which is also where the omission is recorded; the log's "neither playground has one" is updated to say it was closed here. Gate: lint, typecheck (both playgrounds among the four projects it types), build (3.86 MB), test (322 files, 7502 passed).
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.
Closes the one finding #518 recorded but did not fix.
What was missing
Upstream's
2799fa6f— the commit that renamed InputMenu'sautocompleteboolean tomode: 'combobox' | 'autocomplete'— added a row exercising the new mode to its own playground:The port (#68,
081a9799) dropped that line, and nothing has added one since. Somode="autocomplete"has never been reachable by hand in either playground.Nothing else covers it, either. The unit tests exercise the prop, but no snapshot pins the mode — the render is byte-identical and only the prop spelling changes, which is exactly why
081a9799could say "snapshots unchanged" and be right. A person looking at the component was the only way to see the mode behave, and that path did not exist.The change
One row in each of
playgrounds/nuxtandplaygrounds/demo, placed identically (before the virtualized row) so the two pages stay aligned:It takes its own ref rather than reusing one of the refs above it, and that is the substance of the change rather than boilerplate: in autocomplete mode
modelValueis the input text — astring— where every other row on the page binds a selected item. Binding it tovalueMultipleorvalueForAddwould have typechecked in some shapes and shown the wrong thing in all of them. The comment on the declaration says so, since the reason is not visible from the row itself.Deliberately not added:
:content="{ hideWhenEmpty: true }", which the docs example carries. The playground's job is to show default behaviour; hiding the empty panel is a separate prop with its own row elsewhere.Bookkeeping
.sync/log/2799fa6f….md— written in #518 — said "neitherplaygrounds/nuxtnorplaygrounds/demohas an autocomplete-mode row". That is now false, so the log is updated to record that the gap was closed here rather than left standing as a stale claim.Verification
Full gate:
lint·typecheck·build(3.86 MB) ·test— 322 files, 7502 passed, 6 skipped.typecheckis the one that carries weight here: it runsnuxt typecheckover four projects, two of them these playgrounds, so a wrongly-typedv-modelon the new row fails the gate rather than the eye.Generated by Claude Code