Repository navigation
fix(admin): replace raw <select> and <input type="search"> with Kumo components - #950
Conversation
…Select / Input Migrates 11 raw <select> elements (marketplace filters/sort, redirects, sections filter, content editor byline picker, content picker modal, field editor type, repeater sub-field, plugin block fields, WordPress import user mapping, bylines routes) to Kumo Select. Where a paired <label> existed, drop it and use Select's label prop. Where options come from plugin/runtime data, use <Select.Option> children to preserve flexibility; where they're a fixed translatable set, use the items prop with t-wrapped labels. Also migrates 2 marketplace search inputs (<input type="search">) to Kumo Input with type="search". Drops redundant border/bg/padding classes that Kumo provides automatically. LocaleSwitcher.tsx is intentionally custom (size variants don't fit the Select API) and stays as a raw <select>.
🦋 Changeset detectedLatest commit: d14ea32 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | d14ea32 | May 08 2026, 01:37 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | d14ea32 | May 08 2026, 01:36 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-i18n | d14ea32 | May 08 2026, 01:36 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | d14ea32 | May 08 2026, 01:37 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | d14ea32 | May 08 2026, 01:37 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
Pull request overview
Migrates multiple admin UI form controls from raw HTML <select> and <input type="search"> elements to Kumo’s Select and Input components to standardize styling, focus/disabled states, and accessibility behavior through the design system.
Changes:
- Replaced raw
<select>elements across admin pages/components withSelect(mix ofitemsandSelect.Optionpatterns). - Replaced raw search inputs in marketplace browse views with Kumo
Input. - Added a changeset for
@emdash-cms/admindocumenting the migration.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/admin/src/routes/bylines.tsx | Migrates byline filters and linked-user selector to Kumo Select. |
| packages/admin/src/components/WordPressImport.tsx | Migrates per-author mapping <select> to Kumo Select. |
| packages/admin/src/components/ThemeMarketplaceBrowse.tsx | Migrates search input + sort dropdown to Kumo Input/Select. |
| packages/admin/src/components/Sections.tsx | Migrates source filter dropdown to Kumo Select using items. |
| packages/admin/src/components/RepeaterField.tsx | Migrates repeater “select” sub-field renderer to Kumo Select. |
| packages/admin/src/components/Redirects.tsx | Migrates redirect status/type filters and status-code field to Kumo Select. |
| packages/admin/src/components/PortableTextEditor.tsx | Migrates plugin-driven dynamic select field to Kumo Select. |
| packages/admin/src/components/MarketplaceBrowse.tsx | Migrates marketplace search input + capability/sort dropdowns to Kumo components. |
| packages/admin/src/components/FieldEditor.tsx | Migrates repeater sub-field type dropdown to Kumo Select. |
| packages/admin/src/components/ContentPickerModal.tsx | Migrates collection picker dropdown to Kumo Select. |
| packages/admin/src/components/ContentEditor.tsx | Migrates byline picker dropdown to Kumo Select. |
| packages/admin/src/components/BlockKitFieldWidget.tsx | Migrates block-kit select element renderer to Kumo Select. |
| .changeset/tall-oranges-appear.md | Adds a patch changeset describing the UI control migrations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Visual testing revealed that <Select> with only <Select.Option> children
displays the raw value in the trigger (not the label). Kumo's <Select>
needs the items prop (or a renderValue callback) to resolve trigger
labels.
Affected:
- routes/bylines.tsx: filter type select showed raw 'all', linked-user
select was empty/zero-width
- WordPressImport.tsx: per-user mapping select would show raw user IDs
Both now use items={...} for the label map. Also wraps the bylines
filter Select in a flex-1 container so it grows to fill the row.
- Convert CAPABILITY_LABELS in lib/api/marketplace.ts from plain strings
to MessageDescriptor map; describeCapability resolves via i18n._(...).
Fixes the i18n bug where t`${label}` couldn't be extracted by Lingui.
Updates PluginManager consumers to call t(label) on the descriptor.
- Convert ThemeMarketplaceBrowse SORT_LABELS to MessageDescriptor too,
matching MarketplaceBrowse pattern.
- Restore w-48 width class on WordPressImport user-mapping Select to
prevent layout shift in the per-user mapping list.
- Restore empty placeholder option ('Select...') on RepeaterField,
PortableTextEditor DynamicSelect, and BlockKitFieldWidget select
renderers so users can clear the field.
- Update e2e/tests/bylines.spec.ts to use combobox + option click
pattern instead of Playwright's native selectOption (Kumo Select is
a custom button + popover, not a native select).
What does this PR do?
Migrates 11 raw
<select>elements and 2<input type="search">elements across the admin UI to Kumo'sSelectandInput. These were using hand-rolled Tailwind classes (rounded-md border bg-kumo-base px-3 py-2 ...) that duplicated and sometimes conflicted with what Kumo provides automatically — including focus rings, label association via the Field wrapper, dark-mode tokens, and disabled states.Files migrated
Selects:
MarketplaceBrowse.tsx— capability filter + sort dropdownThemeMarketplaceBrowse.tsx— sort dropdownSections.tsx— source filter (re-uses existingsourceLabelsMessageDescriptor map)Redirects.tsx— status code form select (paired<Label>removed in favour ofSelect'slabelprop), status filter, type filterContentEditor.tsx— byline pickerContentPickerModal.tsx— collection pickerFieldEditor.tsx— sub-field type pickerRepeaterField.tsx— repeater sub-field renderer (dynamic options from field def)PortableTextEditor.tsx(DynamicSelect) — plugin field renderer (plugin-supplied labels passed through, not `t``-wrapped)BlockKitFieldWidget.tsx— block-kitselectelement renderer (same)WordPressImport.tsx— per-user mapping select (one rendered per WP user being imported)routes/bylines.tsx— filter type + linked-user form selectSearch inputs:
MarketplaceBrowse.tsxandThemeMarketplaceBrowse.tsxApproach decisions
itemsprop vsSelect.Optionchildren: useditemsfor fixed translatable option sets (e.g. sort modes), andSelect.Optionchildren for dynamic data (user lists, plugin-supplied options) where each option needs runtime values rather than a static map.<label>elements: removed where a<Select>could carry the label via itslabelprop, dropping the<div>wrapper noise.LocaleSwitcher.tsxis intentionally custom — its small/medium size variants don't map cleanly to Kumo'sSelectAPI. Left as-is per the original audit recommendation.What's not in this PR
~20 <input type="checkbox">elements (some better asSwitch) — design pass first, separate PR.MediaPickerModal,MediaLibrary,Redirectsfilter tabs) — separate refactor.Closes #
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (admin: 858/858)pnpm formathas been runAI-generated code disclosure
simple-taskssub-agents) via OpenCodeScreenshots / test output
Visual change is minor: focus rings, hover states, and label rendering now go through Kumo's tokens. The selects and search inputs render at the same physical sizes (existing width classes preserved).
Stack:
main→ #934 (merged) → #937 (merged) → #940 (merged) → #949 (merged) → this PR → (next: checkboxes/switches) → (next: aria-labels) → (next: RTL safety) → (next: semantic tokens) → (last: ESLint enforcement)