refactor: rename overlay CommandPalette → QuickPick#2285
Closed
merchako wants to merge 2 commits into
Closed
Conversation
…ilwind 4, new components) (#2207) * Upgraded to React 19, Tailwind 4, new shadcn, build themes.data.json from index.css, cleaned up index.css, fonts.css, clarified data provider errors, added scripts to prepare for changing shadcn preset * Apply shadcn preset via `npx shadcn apply --preset b6rt8cvlC` to re-add shadcn components from latest version as a new baseline * chore: propagate shadcn preset CSS and package changes to extensions * chore: re-apply project customizations to upgraded shadcn components Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Adjust platform to upgraded shadcn chore: rebuild platform-bible-react dist and themes after shadcn upgrade Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> docs: add SKIPPED-CUSTOMIZATIONS.md for shadcn upgrade review Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Fixed rtl:tw: to tw:rtl:, fixed a few bugs with the shadcn components, fixed theme color stories not showing all the colors Cleaned up radix imports, added spacing theme variable, fixed radius css variable usage Moved new theme preset to Paratext theme, fixed borders wrongly applying, misc cleanup docs: add design spec for legacy HSL color var backwards compat docs: add per-pass and total timing to legacy color var compat spec docs: add React 19 backwards compatibility design spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> feat: add transformLegacyColorVars helper for backwards-compat hsl→var transform Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> feat: apply legacy hsl color var transform to WebView styles and content on load Attempt to make React 19 and Tailwind 4 backwards-compatible with old extensions Clean up, fix core storybook Reverted skipLibCheck to false, applied lots of fixes accordingly Fixed yalc messing up package-lock.json fix: address review findings from /review-paratext - Re-export public types `SelectTriggerProps` and `DropdownMenu*Props` (9 type aliases) that were dropped by the upstream shadcn baseline - Fix `handleDataProviderSubscriptionError` log regression: discriminate three contexts ('retrieve-after-update' | 'retrieve-immediate' | 'callback') with a switch + exhaustiveness check; restores per-path log messages - Remove unused `sheet.tsx` + the just-scaffolded story (YAGNI; arrived as a side effect of the shadcn preset apply, not exposed in index.ts) - Remove stale AI-generated `CUSTOMIZATIONS.md`; update upgrade-shadcn workflow to require regeneration via `/shadcn-customizations` if missing - Add 48 tests for `apply-shadcn-preset.ts` helpers + 6 fixture-based end-to-end pipeline tests; fix latent regex bug in `processLayerBase` (`\s+$` → `\s*$`) that produced `}}` instead of `}\n}` in the common case - Add 6 tests for new `platform-dock-layout-storage.util.ts` exports (`findFirstWebViewDefinitionByType`, `loadLayout`) - Fix pre-existing typo'd Tailwind classes in `tabs-vertical.tsx` (`tw:flex-fit`, `tw:mlk-items-center`, bare `overflow-clip`) - Rename `util.test.ts` → `utils.test.ts` to match implementation filename - Remove unused `yjs` and `scheduler` devDependencies; refresh lockfile - Add storybook variants for badge ghost/link/blueIndicator/mutedIndicator - Rebuild platform-bible-react dist artifacts Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat: add /add-shadcn-component command and supporting script - Extract shared shadcn file-transform helpers into shadcn-transform-utils.ts (used by both apply-shadcn-preset.ts and the new add-shadcn-component.ts) - Add scripts/add-shadcn-component.ts: adds a single shadcn component, applies standard file transforms, runs format and lint-fix, and auto-commits the baseline (matches apply-shadcn-preset.ts pattern). Takes <component> <preset> as args. - Add npm 'add-shadcn-component' script - Fix get-latest-preset - Add fast path to cn() compat shim: when the resolved class string contains no `tw-` prefix (the dominant all-TW4 case), skip the per-token normalize/restore round-trip and call extendTailwindMerge({ prefix: 'tw' }) directly. Brings the all-TW4 case from ~8x slower than baseline to within ~1.5x; TW3-containing strings still take the full slow path so dedup remains correct. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
The existing "command palette" overlay is a per-WebView generic
searchable picker (currently used by hello-rock3 to pick USFM
markers), not a global command-launcher. The CommandPalette name
was misleading from day one — the original type comment even
hinted at the conflation ("marker code like 'ft' or command
name") — and it conflicted with the broader Action Palette
concept proposed separately (see PR #2284 and
docs/plans/2026-05-15-action-palette-proposal.md).
This overlay is the cross-iframe analog of the in-tree `ComboBox`
component in `platform-bible-react` — both are built on shadcn's
`Command` (which wraps cmdk). cmdk explicitly positions its
`Command` primitive as serving both command palettes and
accessible comboboxes; aligning the overlay's name with `ComboBox`
puts the right breadcrumb for extension authors.
Renames:
- Types: CommandPaletteItem → ComboBoxItem,
CommandPaletteRequest → ComboBoxRequest
- Service method: showCommandPalette → showComboBox
- Component files: overlay-command-palette.* → overlay-combo-box.*
(matches pbr's combo-box.component.tsx kebab-case)
- Internal symbols: validateCommandPaletteRequest, OverlayCommandPalette*,
localizeCommandPaletteItems, etc.
- Overlay discriminator: 'commandPalette' → 'comboBox'
- Data attributes: data-overlay-command-palette* → data-overlay-combo-box*
- LocalizeKeys: %overlay_commandPalette_*% → %overlay_comboBox_*%,
%overlay_aria_commandPaletteOpened% → ...comboBoxOpened%
Public PAPI surface preserves CommandPaletteItem,
CommandPaletteRequest, and showCommandPalette as @deprecated
aliases so out-of-repo extensions keep working.
Capitalization note: cmdk's preferred spelling for non-command-palette
uses of `Command` is `Combobox` (lowercase b). pbr uses `ComboBox`
(capital B); this overlay matches pbr for consistency. Harmonizing
toward cmdk's spelling is out of scope here — a future refactor
could rename pbr's `ComboBox` → `Combobox`, pbr's
`MultiSelectComboBox` → `ComboboxMulti`, and the overlay
correspondingly. Flagged for a follow-up PR.
Localization values updated:
- en: 'Command palette opened' → 'Combo box opened'
- es: 'Paleta de comandos abierta' → 'Cuadro combinado abierto'
(flag for localizer review)
167 overlay tests pass; ESLint clean; papi.d.ts regenerated.
6fc2b8e to
c1e032c
Compare
Contributor
Author
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.
Companion to #2284 (Action Palette / Command vs. Action vocabulary proposal). Please read that PR first — this one only makes sense in its context.
What this is
Renames the existing `overlay-command-palette` code to `overlay-quick-pick`. The existing overlay is a per-WebView generic searchable picker (currently used by `hello-rock3` to pick USFM markers), not a global command-launcher. Naming it "Command Palette" was misleading from day one — the original type comment even hinted at it: `label: 'marker code like "ft" or command name'`.
Why this isn't "Action Palette"
I was originally going to rename this to `ActionPalette` as part of the Action Palette proposal, then realized the existing overlay isn't the Action Palette — it's a primitive that the future Action Palette would probably be built on top of. Naming it `ActionPalette` would just swap one overload for another. `QuickPick` is precise (it's a quick-pick dialog for selecting one item from a list), has VS Code precedent, and avoids the "palette" word so it doesn't collide with the future Action Palette concept.
Why two PRs
These two decisions are independent and I want them reviewable independently:
Even if #2284 is rejected in its entirety, this rename still seems worth doing on its own merits: the current name doesn't describe what the code does.
What changed
Backward compatibility
Public PAPI surface keeps `CommandPaletteItem`, `CommandPaletteRequest`, and `showCommandPalette` as `@deprecated` aliases so out-of-repo extensions don't break.
Verification
Status
Draft, pending @tjcouch-sil's read on the companion proposal #2284 and on this rename specifically. Happy to land this independently if the broader proposal is deferred, or hold it indefinitely if you'd rather not touch the public API right now.
This change is