feat(InputMenu)!: rename autocomplete prop to mode - #68
Merged
Conversation
Aligns with nuxt/ui v4.8.0. The boolean `autocomplete` prop becomes `mode?: 'combobox' | 'autocomplete'` (default `'combobox'`), which frees the native HTML `autocomplete` attribute to be forwarded again. - InputMenu: add `mode` prop + internal `isAutocomplete` computed; stop omitting the native `autocomplete` attribute from InputHTMLAttributes - docs + autocomplete example use `mode="autocomplete"` - tests use `mode: 'autocomplete'` (snapshots unchanged — render is identical) Closes #61 BREAKING CHANGE: InputMenu's `autocomplete` prop is renamed to `mode`. Migrate `:autocomplete="true"` to `mode="autocomplete"`.
…mplete Review follow-ups for the autocomplete->mode port: - Wrap the rootProps source in computed() so switching mode at runtime recomputes the forwarded props (matches nuxt/ui v4 upstream; b24ui useForwardProps already accepts a ref, as in NavigationMenu). - Add a test asserting the freed native autocomplete attribute now reaches the <input>.
This was referenced Jun 7, 2026
IgorShevchik
added a commit
that referenced
this pull request
Jun 9, 2026
…render (#76) Port of nuxt/ui efd7b8ec. Re-highlights the first CommandPalette item after the debounced results re-render via watch(filteredGroups) + nextTick -> rootRef.highlightFirstItem(). Applied 1:1 (framework-level, no b24ui divergence). Also starts per-port ledger maintenance: .sync/nuxt-ui.json cursor -> efd7b8ec with processed backfilled for #68-#72, plus a .sync/log entry. Upstream: efd7b8ecc9fdbc75077c3ee6076f94fa4fa753f1
This was referenced Jun 9, 2026
This was referenced Aug 30, 2026
IgorShevchik
added a commit
that referenced
this pull request
Aug 31, 2026
…#518) The ledger's log convention starts one entry in, at `d50c121c`, so the four commits before it — `2799fa6f`, `631f5dc5`, `6102a87b`, `007b136a` (#68-#72) — had a `processed` entry and no `.sync/log/<sha>.md`. #515 deferred both these and the guard that would have caught them, on the grounds that writing a rationale months later is reconstruction rather than record. The record turned out to still exist. Both commits are readable on both sides, and three of the four fork commits carry contemporaneous reasoning in their own messages, so each log is derived from `git show` on the upstream commit and on ours, and says at the top that it was backfilled and from what. Re-deriving them surfaced an omission nobody had recorded: `2799fa6f` added an autocomplete-mode row to upstream's InputMenu playground, the port dropped it, and neither playground has one today. It also made two ports legible that the one-line summaries had flattened — `631f5dc5` must NOT copy upstream's prop list verbatim, because ours omits `loadingIcon` on purpose, and `007b136a` had to move a cap between slots rather than add one, which is why it is breaking here and is not upstream. The guard asserts the pairing in both directions plus a floor on file size: a missing log is the obvious failure, an orphaned log is what a mistyped SHA in a filename looks like, and an empty file satisfies pairing while documenting nothing. Three mutations verified. The heading format is deliberately not guarded — it varies across the 280 files, and a rule there would be invented rather than enforced.
IgorShevchik
added a commit
that referenced
this pull request
Aug 31, 2026
…ssing (#520) 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: the render is identical and only the prop spelling differs, which is why the port could report "snapshots unchanged" and be right. The row takes 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 binds a selected item — which is the 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 is updated to say the gap was closed here rather than leave a claim that is no longer true.
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.
Summary
Ports the one remaining API divergence from upstream: nuxt/ui v4.8.0 renamed
InputMenu'sautocompleteprop tomode. This applies the same change to b24ui.autocomplete?: boolean→mode?: 'combobox' | 'autocomplete'(default'combobox').autocompleteattribute is no longer omitted fromInputHTMLAttributes, so it can be forwarded to the input again (the whole reason upstream made the change).isAutocomplete = computed(() => props.mode === 'autocomplete')replaces the old boolean checks (script usesisAutocomplete.value, template usesisAutocomplete).Faithfulness to upstream
Matches nuxt/ui v4 exactly:
modevalues'combobox' | 'autocomplete', defaultcombobox,isAutocompleteselects the reka-uiAutocompletevsComboboxcomponent, native attribute freed.Changed files
src/runtime/components/InputMenu.vue— prop + internal refs +Omitlistdocs/content/docs/2.components/input-menu.md— "Use themodeprop set toautocomplete…"docs/app/components/content/examples/input-menu/InputMenuAutocompleteExample.vue—mode="autocomplete"test/components/InputMenu.spec.ts—mode: 'autocomplete'Validation (run locally)
eslinton changed filesvue-tsc --noEmit(types)vitest run InputMenu— 152 passed, snapshots unchanged (the rename produces identical rendered output)InputMenu'sautocompleteprop is renamed tomode. Consumers migrate:autocomplete="true"→mode="autocomplete". The commit carries aBREAKING CHANGE:footer so it surfaces in the changelog.Note: other
autocompletereferences in the codebase (Select,SelectMenu,Input,Editor,html.ts) are the native HTML attribute and were intentionally left untouched.Closes #61
https://claude.ai/code/session_01Qz7EXMncvEGiCj4WbmYgJo
Generated by Claude Code