Pickers: Split browse and search into tabs - #23617
nielslyngsoe merged 11 commits into
Conversation
Reworks both collection and tree picker modals to use explicit Browse and Search tabs instead of auto-hiding content based on search query state. Adds localized tab labels, tab styling, and active-tab state handling, including focusing the search input when switching to Search. Also updates `umb-picker-search-field` with a `focus()` implementation that forwards focus to its internal input.
|
Claude finished @madsrasmussen's task in 6m 5s —— View job PR ReviewTarget: Replaces the implicit "query hides the tree/collection" search mode in three picker modals (tree, collection, document-link) with explicit Browse/Search tabs rendered in the
Important
Suggestions
Approved with Suggestions for improvementGood to go, but please carefully consider the importance of the suggestions. The core implementation is clean — the Labels applied: |
There was a problem hiding this comment.
Pull request overview
This PR updates picker modals in the backoffice client to make Browse and Search explicit, user-selectable tabs (instead of implicitly switching into “search mode” when a query exists), aligning picker UX with existing workspace tab patterns.
Changes:
- Introduces Browse/Search tab UI in the tree picker, collection item picker, and document link picker modals, including focusing the search input when switching to the Search tab.
- Adds/updates web-component tests to cover tab rendering, pane visibility, and “keep browse UI mounted” behavior; adds a shared test utility to ignore ResizeObserver loop errors in the runner.
- Adds new localization keys for the tab labels and an example picker data source that supports search without text filtering.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/utils/test-utils.ts | Adds a helper to temporarily swallow ResizeObserver loop errors during tests. |
| src/Umbraco.Web.UI.Client/src/packages/multi-url-picker/document-link-picker-modal/document-link-picker-modal.element.ts | Adds Browse/Search tabs and pane switching for the document link picker modal. |
| src/Umbraco.Web.UI.Client/src/packages/multi-url-picker/document-link-picker-modal/document-link-picker-modal.element.test.ts | Adds tab behavior tests and installs the ResizeObserver error swallow helper. |
| src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-picker-modal/tree-picker-modal.element.ts | Adds Browse/Search tabs and pane switching for the tree picker modal. |
| src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-picker-modal/tree-picker-modal.element.test.ts | New tests for tab presence/behavior and selection persistence across tabs. |
| src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-field.element.ts | Adds internal input querying and forwards focus() to the underlying uui-input. |
| src/Umbraco.Web.UI.Client/src/packages/core/collection/collection-item-picker-modal/collection-item-picker-modal.element.ts | Adds Browse/Search tabs and refactors layout/styling to use pane switching. |
| src/Umbraco.Web.UI.Client/src/packages/core/collection/collection-item-picker-modal/collection-item-picker-modal.element.test.ts | New tests for tab presence/behavior and selection persistence across tabs. |
| src/Umbraco.Web.UI.Client/src/assets/lang/en.ts | Adds picker.browseTab and picker.searchTab localization strings. |
| src/Umbraco.Web.UI.Client/examples/picker-data-source/index.ts | Registers the new “custom collection with search” example manifests. |
| src/Umbraco.Web.UI.Client/examples/picker-data-source/custom-collection-with-search/manifests.ts | Adds a new example data source manifest demonstrating search support. |
| src/Umbraco.Web.UI.Client/examples/picker-data-source/custom-collection-with-search/example-custom-with-search-picker-collection-data-source.ts | Implements the example data source with collection + search APIs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ch-into-tabs # Conflicts: # src/Umbraco.Web.UI.Client/src/packages/multi-url-picker/document-link-picker-modal/document-link-picker-modal.element.ts
|


Description
The tree item picker, collection item picker, and document link picker modals stacked the search field on
top of the browsing UI and used an implicit "search mode": as soon as a query existed, the tree or
collection was hidden.
Browsing and searching are now two explicit tabs in the top-right of the modal header, matching how
workspace views (e.g. block workspaces) present their tabs:
List Data
Browse

Search

Tree Data
Document Link Picker Modal