Skip to content

Move filter building blocks to shared UI components and reuse across drawers#7120

Open
AronH99 wants to merge 1 commit into
masterfrom
refactor/7027-shared-filter-components
Open

Move filter building blocks to shared UI components and reuse across drawers#7120
AronH99 wants to merge 1 commit into
masterfrom
refactor/7027-shared-filter-components

Conversation

@AronH99

@AronH99 AronH99 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

  • Moved AddableTextInput and AddableSelectInput into their own top-level src/UI/Components/ dirs; kept ActiveFilterGroup in FilterDrawer/.
  • Extracted a shared ActiveFilters section shell and adopted it in every drawer (Resources, Parameters, Agents, Events, DesiredState) plus the two former generic-widget users
  • Removed the config-driven FilterWidget/FilterWidgetComponent; converted DesiredStateDetails and DiscoveredResources to the standard hand-rolled drawer pattern; relocated countActiveFilters into FilterDrawer/
  • Added a drawer-friendly TimestampRangeFilter (two TimestampPickers + per-field Apply) and adopted it in Events/Parameters/DesiredState, replacing the inline date-range duplication
  • Removed the now-dead resources.filters.active.group.close word

Own words:
The AI description sums up a lot already.
In general there were a lot of patterns for the filter drawers who could be deduplicated/extracted, which I did and then I adjusted it everywhere necessary in the same shape/style.
So everything should honestly be really consistent with the exact same code/style implementations.
Also removed unused stuff or renamed files for naming consistency as well.
All in all solid refactor I reckon, I adjusted the ticket to mostly match what happened in this PR.
Let me know if you have any concerns/feedback.

Ps: Got no screenshot(s) because everything stayed exactly the same, functionally and visually.

closes #7027

…drawers

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AronH99
AronH99 requested a review from LukasStordeur July 15, 2026 08:46
@AronH99 AronH99 self-assigned this Jul 15, 2026

@LukasStordeur LukasStordeur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a lot of "onAddxxxx", "removexxxChip" "clearxxx" it might be worth having a generic hook that takes the filterKey for those. Maybe make better use of the wrapper we currently already use ConnectedFilterWidget and let it have a Context with a config we pass to it?
A bit like the form generator, but in a less convoluted way.

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.

Components that can be shared should be moved to the shared UI components folder and reused in all of the filter drawers where needed.

2 participants