Skip to content

feat: add omnisearch availablity to document Internationalization#893

Open
RobbertST wants to merge 4 commits into
sanity-io:mainfrom
RobbertST:feature/DocumentInternationalizationOmniSearch
Open

feat: add omnisearch availablity to document Internationalization#893
RobbertST wants to merge 4 commits into
sanity-io:mainfrom
RobbertST:feature/DocumentInternationalizationOmniSearch

Conversation

@RobbertST
Copy link
Copy Markdown

Description

Added Omnisearch visibility support for the translation.metadata document schema via the metadataOmnisearchVisibility plugin option.

This defaults to true, so metadata documents are still visible from global search unless users explicitly sets with metadataOmnisearchVisibility: false.

This lets users decide whether internal translation metadata documents should appear in Omnisearch.

What to review

Review the new metadataOmnisearchVisibility config option, its default value, and how it is passed into the metadata schema as __experimental_omnisearch_visibility.

Affected areas:

  • plugin configuration types
  • default plugin config
  • translation.metadata schema generation
  • README docs
  • metadata schema tests

Testing

Added schema tests covering:

  • default Omnisearch visibility is true
  • configured Omnisearch visibility can be set to false

@RobbertST RobbertST requested a review from a team as a code owner May 19, 2026 13:18
@RobbertST RobbertST requested review from bjoerge and removed request for a team May 19, 2026 13:18
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

@RobbertLStevens is attempting to deploy a commit to the Sanity Sandbox Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 19, 2026

🦋 Changeset detected

Latest commit: db3659c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sanity/document-internationalization Minor

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

@bjoerge bjoerge changed the title feat: added omnisearch availablity to document Internationalization feat: add omnisearch availablity to document Internationalization May 21, 2026
@bjoerge
Copy link
Copy Markdown
Member

bjoerge commented May 21, 2026

Thanks @RobbertST, nice addition!

Would you mind sorting out this failing test?

[@sanity/document-internationalization] src/schema/translation/metadata.test.ts > metadata schema > sets Omnisearch visibility to false by default
Check failure: [@sanity/document-internationalization] src/schema/translation/metadata.test.ts > metadata schema > sets Omnisearch visibility to false by default
AssertionError: expected true to be false // Object.is equality

- Expected
+ Received

- false
+ true

 ❯ src/schema/translation/metadata.test.ts:105:57

* Default value was changed to true
* Added case for value false
@RobbertST
Copy link
Copy Markdown
Author

Updated tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants