Skip to content

Persistent filter state between reports and runs pages#4868

Merged
gulyasgergely902 merged 2 commits into
Ericsson:masterfrom
feyruzb:feature/filter-preset-url-encoding
Jun 3, 2026
Merged

Persistent filter state between reports and runs pages#4868
gulyasgergely902 merged 2 commits into
Ericsson:masterfrom
feyruzb:feature/filter-preset-url-encoding

Conversation

@feyruzb
Copy link
Copy Markdown
Collaborator

@feyruzb feyruzb commented May 31, 2026

This pull request refactors and improves the filter preset handling in the report filter components. The main goals are to streamline preset application (especially via URL), improve state management during initialization, and clean up related code. The most important changes are grouped below:

Preset Application and Initialization Improvements:

  • Added a new function selectPresetSilently to PresetMenu.vue for setting the active preset without triggering UI side effects, supporting smoother preset initialization via URL.
  • Enhanced the initialization flow in ReportFilter.vue by introducing an isInitializing flag and updating initByUrl to properly handle preset application from URL parameters, ensuring correct state and preventing race conditions.
  • When clearing all filters, the filterPreset parameter is now removed from the URL, ensuring the UI and URL remain in sync.

Code Refactoring and Cleanup:

  • Split the logic for building preset query parameters into a new buildPresetQuery function, and separated preset application into initFilterPreset and initFilterPresetFromUrl for clarity and reuse.
  • Removed the old getFilterPreset function and updated event handling so that applying a preset now uses the improved initFilterPresetFromUrl logic.

State and Reactivity Enhancements:

  • Refactored the logic for tracking filter modifications into a checkModified function for better reusability and clarity, and ensured it is called at the appropriate times.

These changes collectively make preset management more robust, maintainable, and user-friendly, especially when dealing with URL-driven state.

@feyruzb feyruzb added this to the release 6.28.1 milestone May 31, 2026
@feyruzb feyruzb requested a review from gulyasgergely902 May 31, 2026 22:44
@feyruzb feyruzb self-assigned this May 31, 2026
@feyruzb feyruzb requested review from bruntib and vodorok as code owners May 31, 2026 22:44
@feyruzb feyruzb linked an issue May 31, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@gulyasgergely902 gulyasgergely902 left a comment

Choose a reason for hiding this comment

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

One question otherwise LGTM

Comment thread web/server/vue-cli/src/components/Report/ReportFilter/Filters/PresetMenu.vue Outdated
Comment thread web/server/vue-cli/src/components/Report/ReportFilter/ReportFilter.vue Outdated
@feyruzb feyruzb force-pushed the feature/filter-preset-url-encoding branch from c5d99b4 to 9cf770b Compare June 2, 2026 15:20
@feyruzb feyruzb requested a review from gulyasgergely902 June 2, 2026 15:21
@gulyasgergely902 gulyasgergely902 merged commit 301ebc4 into Ericsson:master Jun 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve filter preset handling and URL-driven state in report filters

2 participants