Repository navigation
feat: event filter form - #547
lornakelly merged 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 7e57a6c The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
✅ Deploy Preview for openworkflow-editor ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
29b0c5d to
a57f82b
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Removing a filter breaks baseline identity, causing values from another filter to be restored and potentially hiding edits from change detection.
7 open issues
Preserve filter baseline identity across removals and drill remounts · New Limit empty-parent cleanup to form-owned containers · New Render Correlate aggregate field errors at the heading · New Initialize absent keyed Correlate values as objects · New Revalidate after removing a Correlate key · New Trim drill levels for entries removed by cancel or undo · New Revalidate task after appending a filter · New
What changed in this PR
Moves Listen event filters into the editor’s standard form system, extending the nested-editing UX work tracked in #254.
Changes:
- Adds drill-in filter rows, CloudEvents attribute chips, custom fields, and structured Correlate editing.
- Extends array-path handling, draft state, navigation, and validation for nested filter entries.
- Extracts shared controls and adds coverage for editing, removal, resets, and error placement.
Paths are relative to packages/open-workflow-diagram-editor/, except .changeset/.
| File | Description |
|---|---|
tests/test-utils/panel-helpers.tsx |
Exposes edit sessions to tests. |
tests/side-panel/forms/validation/workflowErrorClassifier.test.ts |
Updates expected level-error placement. |
tests/side-panel/forms/validation/taskErrorClassifier.test.ts |
Covers schema-derived filter error routing. |
tests/side-panel/forms/validation/listenEmptiedFilter.test.ts |
Checks emptied-filter level errors. |
tests/side-panel/forms/validation/activeFormView.test.ts |
Checks item leaves and containers. |
tests/side-panel/forms/taskFormContext.test.ts |
Covers array reads and filter defaults. |
tests/side-panel/forms/TaskForm.eventFilters.test.tsx |
Adds integrated filter-editing coverage. |
tests/side-panel/forms/sectionWalkers.test.ts |
Includes event-filter list traversal. |
tests/side-panel/forms/mapEntries.test.ts |
Tests custom fields inside list entries. |
tests/side-panel/forms/eventFilters/removeListEntry.test.ts |
Tests entry-state renumbering. |
tests/side-panel/forms/drill/drill.test.ts |
Tests synthesized filter drill levels. |
tests/side-panel/forms/customFields/EventFilterListField.test.tsx |
Removes legacy control tests. |
tests/fixtures/workflows.ts |
Adds Listen filter fixtures. |
tests/fixtures/taskValidation.ts |
Updates missing-list error expectations. |
tests/core/taskDraft.test.ts |
Covers array writes and empty-object cleanup. |
tests/core/schemaToFormFields.test.ts |
Tests filter and keyed-object descriptors. |
src/side-panel/SidePanel.css |
Styles filter rows and Correlate entries. |
src/side-panel/forms/validation/taskErrorClassifier.ts |
Routes filter errors using descriptors. |
src/side-panel/forms/validation/activeFormView.ts |
Records filter item leaves and containers. |
src/side-panel/forms/taskFormContext.ts |
Extends defaults and traversal for new fields. |
src/side-panel/forms/mapEntries.ts |
Shares path-safe key validation. |
src/side-panel/forms/FormField.tsx |
Dispatches new structured field renderers. |
src/side-panel/forms/FieldList.tsx |
Clears stored Correlate rows on removal. |
src/side-panel/forms/FieldControl.tsx |
Removes legacy filter-control dispatch. |
src/side-panel/forms/eventFilters/removeListEntry.ts |
Renumbers entry-indexed editor state. |
src/side-panel/forms/eventFilters/EventFilterListField.tsx |
Implements drill-row filter lists. |
src/side-panel/forms/eventFilters/entrySummary.ts |
Derives filter titles and summaries. |
src/side-panel/forms/eventFilters/EntryRow.tsx |
Renders filter rows and status pills. |
src/side-panel/forms/drill/useDrillNavigation.ts |
Supports entry labels and inline layouts. |
src/side-panel/forms/drill/DrillRow.tsx |
Extracts a reusable drill-row button. |
src/side-panel/forms/drill/drill.ts |
Resolves indexed filter drill targets. |
src/side-panel/forms/draft.ts |
Passes filter-list paths into draft cleanup. |
src/side-panel/forms/customFields/useMapRows.ts |
Shares row persistence and reset handling. |
src/side-panel/forms/customFields/StringListField.tsx |
Uses the shared add-row button. |
src/side-panel/forms/customFields/KeyValueMapField.tsx |
Uses shared row state and controls. |
src/side-panel/forms/customFields/KeyedObjectsField.tsx |
Adds structured Correlate key editing. |
src/side-panel/forms/customFields/index.ts |
Removes the legacy filter export. |
src/side-panel/forms/customFields/EventFilterListField.tsx |
Removes the bespoke filter editor. |
src/side-panel/forms/customFields/AddRowButton.tsx |
Provides a shared add-row control. |
src/side-panel/forms/addedFields.ts |
Shifts added-field paths after removal. |
src/i18n/locales/en.ts |
Adds Correlate key labels. |
src/core/taskDraft.ts |
Supports indexed paths and empty-object cleanup. |
src/core/schemaToFormFields.ts |
Adds keyed-object descriptors and filter labels. |
src/core/paths.ts |
Adds numeric path-segment detection. |
.changeset/listen-event-filters.md |
Records the editor feature release. |
Review effort: Balanced
a57f82b to
64ce2b6
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Canceling a newly added filter leaves navigation on a nonexistent entry that edits can recreate, and renaming keys can leave validation errors and counts stale.
1 open issue
7 resolved since last review
Preserve filter baseline identity across removals and drill remounts Revalidate task after appending a filter Trim drill levels for entries removed by cancel or undo Revalidate after removing a Correlate key Initialize absent keyed Correlate values as objects Render Correlate aggregate field errors at the heading Limit empty-parent cleanup to form-owned containers
Review effort: Balanced
64ce2b6 to
cbedd75
Compare
cbedd75 to
1cfffda
Compare
Signed-off-by: lornakelly <lornakelly88@gmail.com>
1cfffda to
1b8ba88
Compare
kumaradityaraj
left a comment
There was a problem hiding this comment.
Thank you for this PR. LGTM
f149d02
into
open-workflow-specification:feature/node-editing


Contributes to #254
Summary
Listen task event filters now use the standard form editing system. Previously, they had custom UX with no drill-in, no "Fields you can add" chips, no change indicators and no Custom fields support.
Main Changes
getNestedValue,setNestedPath,deletePathnow index arraysactiveFormView/taskErrorClassifierattribute errors from schema-derived item fields - removed hardcodedEVENT_PROPERTY_KEYSuseMapRowsunified hook for row storage, reset syncing - shared byKeyValueMapFieldandKeyedObjectsFieldAddRowButtonreplaces 3 duplicate "+ Add …" button implementationsDrillRowButtonextracted fromDrillRowfor entry row reuseisUnwritableKeyNameshared key validation for Custom fields and CorrelateVerify
Storybook > Nested Editing > Listen Deep Nesting > To (event filters under ANY)