Skip to content

Add explicit Global Search extension point#19348

Merged
madsrasmussen merged 16 commits intorelease/16.0from
v16/hotfix/global-search-extension-point
May 19, 2025
Merged

Add explicit Global Search extension point#19348
madsrasmussen merged 16 commits intorelease/16.0from
v16/hotfix/global-search-extension-point

Conversation

@madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented May 16, 2025

Fixes #17998

Make an explicit extension point to add to the "Global Search" modal.

We currently list all "search providers" in the "Global Search" modal. We need to conditionally render some search options in global search while still making them available in all pickers.

With this new extension point, we can use the condition system on global search registrations.

Breaking Change

Search providers will no longer automatically appear in the "Global Search" modal. An additional registration is now required to add this. Manifest:

{
  name: 'Document Global Search',
  alias: UMB_DOCUMENT_GLOBAL_SEARCH_ALIAS,
  type: 'globalSearch',
  weight: 800,
  meta: {
    label: 'Documents',
    searchProviderAlias: UMB_DOCUMENT_SEARCH_PROVIDER_ALIAS,
  },
 conditions: [
    {
      alias: UMB_SECTION_USER_PERMISSION_CONDITION_ALIAS,
      match: UMB_SETTINGS_SECTION_ALIAS,
    },
  ]
},

@madsrasmussen madsrasmussen changed the title Global Search extension point Add Explicit Global Search extension point May 16, 2025
@madsrasmussen madsrasmussen changed the title Add Explicit Global Search extension point Add explicit Global Search extension point May 16, 2025
@madsrasmussen madsrasmussen marked this pull request as ready for review May 16, 2025 20:19
Copilot AI review requested due to automatic review settings May 16, 2025 20:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements an explicit extension point for the Global Search modal, requiring an additional registration for search providers rather than auto-registering them. Key changes include adding new global search constants, updating manifest files in several packages (media, documents, document-types, dictionary, and data-type) to include the new global search manifests, and spreading the new manifests into the existing search provider registrations.

Reviewed Changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Umbraco.Web.UI.Client/src/packages/media/media-types/search/global-search/constants.ts Added a new constant for media type global search alias
src/Umbraco.Web.UI.Client/src/packages/media/media-types/search/constants.ts Exporting global search constants and adding a search provider alias
src/Umbraco.Web.UI.Client/src/packages/media/media-types/constants.ts Updated to export new search constants
src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/manifests.ts Imported and spread new global search manifests into documents search manifests
src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/global-search/manifests.ts Created a new manifest for document global search with conditions
src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/global-search/constants.ts Added a new global search constant for documents
src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/constants.ts Updated to export document global search constants
src/Umbraco.Web.UI.Client/src/packages/documents/document-types/search/manifests.ts Imported and spread new global search manifests into document types search manifests
src/Umbraco.Web.UI.Client/src/packages/documents/document-types/search/global-search/manifests.ts Created a new manifest for document type global search with conditions
src/Umbraco.Web.UI.Client/src/packages/documents/document-types/search/global-search/constants.ts Added a new global search constant for document types
src/Umbraco.Web.UI.Client/src/packages/documents/document-types/search/constants.ts Updated to export document type global search constants
src/Umbraco.Web.UI.Client/src/packages/dictionary/search/manifests.ts Imported and spread new global search manifests into dictionary search manifests
src/Umbraco.Web.UI.Client/src/packages/dictionary/search/global-search/manifests.ts Created a new manifest for dictionary global search with conditions
src/Umbraco.Web.UI.Client/src/packages/dictionary/search/global-search/constants.ts Added a new global search constant for dictionaries
src/Umbraco.Web.UI.Client/src/packages/dictionary/search/constants.ts Updated to export dictionary global search constants
src/Umbraco.Web.UI.Client/src/packages/data-type/search/manifests.ts Imported and spread new global search manifests into data type search manifests
src/Umbraco.Web.UI.Client/src/packages/data-type/search/global-search/manifests.ts Created a new manifest for data type global search with conditions
src/Umbraco.Web.UI.Client/src/packages/data-type/search/global-search/constants.ts Added a new global search constant for data types
src/Umbraco.Web.UI.Client/src/packages/data-type/search/constants.ts Updated to export data type global search constants
src/Umbraco.Web.UI.Client/src/packages/data-type/constants.ts Updated to export new search constants
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/documents/documents/search/manifests.ts:23

  • Ensure that existing tests are updated or new tests are added to cover the new conditional registration logic for Global Search to prevent regressions.
...globalSearchManifests,

Copy link
Member

@nielslyngsoe nielslyngsoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, I love the seperation, so we are able to make search providers without providing them or set up extra conditions for global search

@nielslyngsoe nielslyngsoe enabled auto-merge (squash) May 19, 2025 07:42
@madsrasmussen madsrasmussen disabled auto-merge May 19, 2025 08:47
@madsrasmussen madsrasmussen enabled auto-merge (squash) May 19, 2025 08:48
@madsrasmussen madsrasmussen disabled auto-merge May 19, 2025 08:49
@madsrasmussen madsrasmussen merged commit 1fdeb4f into release/16.0 May 19, 2025
23 checks passed
@madsrasmussen madsrasmussen deleted the v16/hotfix/global-search-extension-point branch May 19, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments