Remove filterDefinition.type usage (#10164)

This PR essentially removes the usage of filterDefinition.type, by
replacing it with fieldMetadataItem.type derivation. Thus allowing to
completely remove filterDefinition later on.

In computeFilterRecordGqlOperationFilter, emptyOperationFilter is now
returned before going into the big switch case. This avoids repeating
the same exact call to getEmptyRecordGqlOperationFilter for each type.

Fixed some tests that need
getJestMetadataAndApolloMocksAndActionMenuWrapper to have record filters
properly working with the new implementation. We'll probably want to
refactor the record context store, record index context, etc.

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
This commit is contained in:
Lucas Bordeau
2025-02-13 00:57:28 +01:00
committed by GitHub
parent 6e57f02ae3
commit ba8797d220
23 changed files with 427 additions and 491 deletions

View File

@ -121,7 +121,7 @@ export const WorkflowEditTriggerCronForm = ({
const cronValidator = cron(newPattern);
if (cronValidator.isError()) {
if (cronValidator.isError() === true) {
setErrorMessages({
CUSTOM: `Invalid cron pattern, ${cronValidator
.getError()[0]