Repository navigation
feat(fields): make document type selectors searchable - #256
Conversation
Enable the shared Select search mode for configured composer types and authorized native document categories in compose and upload workflows. Include type codes with display labels so both are searchable without changing stored codes or MIME types. Preserve fixed and existing native types, workflow filtering, draft contents, and explicit free-text fallback behavior. Cover long catalogs, unavailable choices, keyboard selection, and selection persistence with regression tests. Supports mieweb/eCase#124.
There was a problem hiding this comment.
🟡 Changes recommended
Both searchable selectors have unresolved focus and modal-accessibility issues, and an empty-result keyboard sequence can crash the shared Select.
3 open issues
What changed in this PR
Makes document type selection searchable in compose and upload workflows, supporting the consuming applications without changing stored type codes or MIME types.
Changes:
- Enables shared Select search for configured document types and authorized native categories.
- Includes configured type codes in display labels so users can search by label or code.
- Adds tests for filtering, keyboard selection, no-match behavior, draft retention, and long catalogs.
| File | Description |
|---|---|
packages/fields-documents/src/DocumentListWorkflows.tsx |
Enables searchable selectors and displays configured type codes alongside labels. |
packages/fields-documents/src/DocumentListWorkflows.spec.tsx |
Adds search regression coverage for compose and upload workflows. |
Review effort: Balanced
| value={value} | ||
| onValueChange={setSelected} | ||
| placeholder={loading ? config.loading : config.placeholder} | ||
| searchable |
There was a problem hiding this comment.
Fixed in ff184f5, with shared source corrections in mieweb/ui#752. The documents package and workspace now consume published @mieweb/ui@0.11.0-dev.66, with a locked pnpm backport of the focus correction and empty-result/modal-scope fixes until all are available in a published release. Removed the link:../ui override and declared the Markdown peers exposed by registry consumption. All 221 documents-package tests, package typecheck, lint, build, and frozen-lockfile install passed. Tests cover no-match ArrowDown/Home/ArrowUp/End then Enter, initial search focus, and forward/backward modal focus boundaries in compose and upload. Real-browser tests also verified empty-result Tab containment and transformed popup geometry.
| value={value} | ||
| onValueChange={setSelected} | ||
| placeholder={loading ? config.loading : config.placeholder} | ||
| searchable |
There was a problem hiding this comment.
Fixed in ff184f5, with shared source corrections in mieweb/ui#752. The documents package and workspace now consume published @mieweb/ui@0.11.0-dev.66, with a locked pnpm backport of the focus correction and empty-result/modal-scope fixes until all are available in a published release. Removed the link:../ui override and declared the Markdown peers exposed by registry consumption. All 221 documents-package tests, package typecheck, lint, build, and frozen-lockfile install passed. Tests cover no-match ArrowDown/Home/ArrowUp/End then Enter, initial search focus, and forward/backward modal focus boundaries in compose and upload. Real-browser tests also verified empty-result Tab containment and transformed popup geometry.
Deploying esheet with
|
| Latest commit: |
1064eae
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c83b79a1.esheet.pages.dev |
| Branch Preview URL: | https://ecase-bulk-ticket-resolution.esheet.pages.dev |
There was a problem hiding this comment.
🟡 Changes recommended
Published consumers would still receive the unpatched UI dependency, and screen-reader users cannot identify the highlighted search result.
2 open issues
3 resolved since last review
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
| value={value} | ||
| onValueChange={setSelected} | ||
| placeholder={loading ? config.loading : config.placeholder} | ||
| searchable |
There was a problem hiding this comment.
Fixed in shared UI commit 47739bff (mieweb/ui#752), backported and bundled by 603b646. Options have stable IDs, and both the focused search textbox and trigger reference the active option through aria-activedescendant; search also exposes aria-controls and aria-autocomplete. Grouped/disabled options, filtering, keyboard movement, and clearing stale active references on no matches are covered. Added consumer workflow assertions for configured type and category selectors. All 37 shared Select tests and 221 documents tests pass; live browser checks confirm the focused search reference follows keyboard selection in both Compose and Upload.
|
Follow-up: the autofocus release is now available from npm. Commit 5472047 upgrades the workspace and documents package to published @mieweb/ui@0.11.0-dev.67 (including mieweb/ui#748), removes the autofocus backport, and retains only the temporary patch for mieweb/ui#752. Revalidated against the patched registry package: all 221 documents-package tests, typecheck, lint, build, formatting, and frozen install pass. No local UI link override is used. |
There was a problem hiding this comment.
🟡 Changes recommended
The Select fixes do not reach published-package consumers, and searchable dropdowns still have fallback positioning and screen-reader navigation issues.
3 open issues
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The bundled modal can corrupt shared scroll-lock behavior, and the popover fallback can misposition or clip menus in browsers without Popover API support.
2 open issues
2 resolved since last review
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
|
Per the requested scope, 1064eae removes the UI pnpm patch and installs the unmodified published @mieweb/ui@0.11.0-dev.67 package. The documents library again externalizes UI rather than bundling its own Modal. Validated 221 tests, typecheck, lint, library build, frozen installation, actual unpatched runtime resolution, and the external UI import in the bundle. This release contains the autofocus correction from mieweb/ui#748, but NOT the additional Select changes in mieweb/ui#752. I reopened the empty-result navigation, modal-scope, and active-option announcement threads so those upstream concerns are not incorrectly represented as fixed. Their added patch-only tests were removed; document workflow coverage and published-release autofocus assertions remain. |
There was a problem hiding this comment.
🟡 Changes recommended
The pinned @mieweb/ui version lacks Select fixes, leaving searchable selectors vulnerable to keyboard-triggered crashes and modal accessibility issues.
4 open issues
2 resolved since last review
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced


Summary
Validation
Integration
Supports mieweb/eCase#124. Consumed by mieweb/eCase#127 and mieweb/wcts#217.
The companion autofocus correction is mieweb/ui#748; the eCase integration pins both dependencies.