Adds a Contains option to the search-attribute filter dropdown that - #3857
Open
Rasu-Dev wants to merge 1 commit into
Open
Adds a Contains option to the search-attribute filter dropdown that#3857Rasu-Dev wants to merge 1 commit into
Rasu-Dev wants to merge 1 commit into
Conversation
translates to a visibility LIKE query: - is.ts: recognize `like` as a filter operator/conditional (isContains) - filter-workflow-query / to-list-workflow-filters: build and parse `LIKE "%value%"` expressions - dropdown-filter-chip: show the Contains option; en locale string Requires server-side LIKE support (companion server PR).
|
@Rasu-Dev is attempting to deploy a commit to the Temporal Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
translates to a visibility LIKE query:
likeas a filter operator/conditional (isContains)LIKE "%value%"expressionsRequires server-side LIKE support (companion server PR).
Description & motivation 💭
Adds a Contains option to the search-attribute filter dropdown for Keyword search attributes. Selecting it builds a visibility query using the
LIKEoperator with the value wrapped in%wildcards (e.g.`CustomKeywordField` LIKE "%payment%"), enabling substring filtering.Today the dropdown only offers exact match (
=,!=) and Starts with (STARTS_WITH) for Keyword attributes, so there is no way to filter by "value appears anywhere in the attribute". This is especially useful for filtering workflows/schedules whose IDs or custom Keyword attributes embed identifiers mid-string.Changes:
dropdown-filter-chip.svelte— adds the Contains condition option for Keyword attributes and renders the chip label as "contains" (lowercased i18n string), mirroring the existing Starts-with handling.is.ts— recognizeslikeas a valid operator/conditional and adds anisContainshelper.filter-workflow-query.ts— builds`Attr` LIKE "%value%"statements for the Contains conditional.to-list-workflow-filters.ts— parsesLIKEstatements back into filter chips, stripping the%wildcards so the chip shows the raw user-typed text.en/common.ts— newcontainslocale string.LIKEsupport for Keyword attributes: . Against a server without that support, using Contains returns the standard invalid-operator query error.Design Considerations 🎨
Testing 🧪
How was this tested 👻
Manually verified against a local server build with
LIKEvisibility support: selecting Contains produces theLIKE "%…%"query, results match substrings, and reloading the page parses the query back into the chip correctly. Unit tests added infilter-workflow-query.test.ts(statement construction, wildcard wrapping) andto-list-workflow-filters.test.ts(parsingLIKEstatements, wildcard stripping).Steps for others to test: 🚶🏽♂️🚶🏽♀️
LIKEon Keyword search attributes ().WorkflowTypeor a custom Keyword attribute) and pick Contains from the condition dropdown.`Attr` LIKE "%value%"and only workflows containing the substring are listed.LIKEquery manually) — the filter chip is reconstructed showing the plain value without%.Docs
Any docs updates needed?
The list-filter docs on docs.temporal.io (supported operators for Keyword attributes) should mention
LIKE/Contains once the server-side support ships.