Affected capability
Core
Feature description
Context
pimcore/studio-ui-bundle#4012 (fixes #354) made the Translations "Search & Filter" sidebar apply immediately: pressing Enter in the top search field, or in a text field filter, now applies without a separate click on "Apply".
It achieved that by adding an optional onCommit callback to the shared filter components (DynamicFilterProvider → FieldFilters, consumed by DynamicTypeFieldFilterTextComponent via onPressEnter) and wiring exactly one host — Translations. The plumbing is deliberately host-agnostic, but the remaining five sidebars still require "Apply".
What is missing
FieldFilters has six hosts; only Translations passes onCommit:
| Module |
Host |
onCommit |
| Translations |
translations/translations-sidebar/components/filter-tab/filter-tab.tsx:104 |
✅ |
| Element listing (Data Objects / Assets / Documents) |
element/listing/decorators/general-filters/view-layer/components/sidebar/tabs/filters/filter-container-inner.tsx:179 |
❌ |
| Notes & Events |
notes-and-events/notes-and-events-sidebar/components/search-filter-tab/search-filters-tab.tsx:101 |
❌ |
| Notifications |
notifications/notifications-sidebar/components/filter-tab/filter-tab.tsx:85 |
❌ |
| Recycle Bin |
recycle-bin/recycle-bin-sidebar/components/filter-tab/filter-tab.tsx:101 |
❌ |
| Reports |
reports/reports-view/components/report-sidebar/components/columns-filters/columns-filters.tsx:104 |
❌ |
Separately, the top search field still has the original #354 bug in two modules — SearchTermControl wires only onChange, so Enter and the magnifier icon do nothing:
notes-and-events/filters/filters.tsx:104
recycle-bin/filters/filters.tsx:100
Notifications and Reports have no search-term control, so they need the field-filter part only.
All paths are relative to assets/js/src/core/modules/ in pimcore/studio-ui-bundle.
Proposed work
Per module:
- Add an
onFilterCommit to the module's use*FieldFilterEditor hook that writes the committed value into that module's applied filter store, mirroring translations/filters/hooks/use-translations-field-filter-editor.ts.
- Pass
onCommit={ onFilterCommit } to <FieldFilters>.
- For Notes & Events and Recycle Bin, add an
onSearch handler to SearchTermControl.
No change to the shared components should be needed — commit is already optional and each host opts in by passing onCommit.
Decision to settle first
This applies to all six modules, Translations included, and should be agreed before the work starts: on commit, should the applied store receive only the committed key, or the entire current draft?
- Translations currently applies the whole draft —
appliedStore.setValues({ ...draftStore.values, searchTerm: value }) — so Enter in the search box also applies field-filter values the user typed but did not apply.
- The element listing's own
SearchTermFilter writes a single key instead: setAppliedValue('searchTerm', currentSearchTerm).
FiltersStore.setValues merges into the previous values, so a single-key write already preserves everything else that was applied.
One asymmetry makes this more than a style question: the element listing wraps its sidebar in useDraftSync, so an applied change there is pushed back into the draft — a single-key write would then discard other unapplied draft edits. Translations does not use useDraftSync. Whichever semantics we pick has to account for both cases.
Ideally the chosen behaviour lives in a helper in components/filters (or in the store itself) rather than being re-implemented in six hooks.
Out of scope but worth noting
FieldFilters lives in core/components but has no Storybook story, although it now carries a new public interaction path.
- There are no tests covering the filters framework,
FieldFilters, or the field-filter dynamic types, so there is no existing seam to extend for regression coverage.
Affected capability
Core
Feature description
Context
pimcore/studio-ui-bundle#4012 (fixes #354) made the Translations "Search & Filter" sidebar apply immediately: pressing Enter in the top search field, or in a text field filter, now applies without a separate click on "Apply".
It achieved that by adding an optional
onCommitcallback to the shared filter components (DynamicFilterProvider→FieldFilters, consumed byDynamicTypeFieldFilterTextComponentviaonPressEnter) and wiring exactly one host — Translations. The plumbing is deliberately host-agnostic, but the remaining five sidebars still require "Apply".What is missing
FieldFiltershas six hosts; only Translations passesonCommit:onCommittranslations/translations-sidebar/components/filter-tab/filter-tab.tsx:104element/listing/decorators/general-filters/view-layer/components/sidebar/tabs/filters/filter-container-inner.tsx:179notes-and-events/notes-and-events-sidebar/components/search-filter-tab/search-filters-tab.tsx:101notifications/notifications-sidebar/components/filter-tab/filter-tab.tsx:85recycle-bin/recycle-bin-sidebar/components/filter-tab/filter-tab.tsx:101reports/reports-view/components/report-sidebar/components/columns-filters/columns-filters.tsx:104Separately, the top search field still has the original #354 bug in two modules —
SearchTermControlwires onlyonChange, so Enter and the magnifier icon do nothing:notes-and-events/filters/filters.tsx:104recycle-bin/filters/filters.tsx:100Notifications and Reports have no search-term control, so they need the field-filter part only.
All paths are relative to
assets/js/src/core/modules/inpimcore/studio-ui-bundle.Proposed work
Per module:
onFilterCommitto the module'suse*FieldFilterEditorhook that writes the committed value into that module's applied filter store, mirroringtranslations/filters/hooks/use-translations-field-filter-editor.ts.onCommit={ onFilterCommit }to<FieldFilters>.onSearchhandler toSearchTermControl.No change to the shared components should be needed —
commitis already optional and each host opts in by passingonCommit.Decision to settle first
This applies to all six modules, Translations included, and should be agreed before the work starts: on commit, should the applied store receive only the committed key, or the entire current draft?
appliedStore.setValues({ ...draftStore.values, searchTerm: value })— so Enter in the search box also applies field-filter values the user typed but did not apply.SearchTermFilterwrites a single key instead:setAppliedValue('searchTerm', currentSearchTerm).FiltersStore.setValuesmerges into the previous values, so a single-key write already preserves everything else that was applied.One asymmetry makes this more than a style question: the element listing wraps its sidebar in
useDraftSync, so an applied change there is pushed back into the draft — a single-key write would then discard other unapplied draft edits. Translations does not useuseDraftSync. Whichever semantics we pick has to account for both cases.Ideally the chosen behaviour lives in a helper in
components/filters(or in the store itself) rather than being re-implemented in six hooks.Out of scope but worth noting
FieldFilterslives incore/componentsbut has no Storybook story, although it now carries a new public interaction path.FieldFilters, or the field-filter dynamic types, so there is no existing seam to extend for regression coverage.