Persistent filter state between reports and runs pages#4868
Open
feyruzb wants to merge 1 commit into
Open
Conversation
gulyasgergely902
requested changes
Jun 1, 2026
Collaborator
gulyasgergely902
left a comment
There was a problem hiding this comment.
One question otherwise LGTM
| isModified.value = !isEqual(normNew, normSnap); | ||
| } | ||
|
|
||
| watch(() => route.query, () => { |
Collaborator
There was a problem hiding this comment.
If you already query the route, wouldn't it be easier to just pass it to the checkModified function instead of querying it again inside it? Please check the feasibility of it.
| await initByUrl(); | ||
| updateUrl(); | ||
| await nextTick(); | ||
|
|
Collaborator
There was a problem hiding this comment.
Remove unnecessary new line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
selectPresetSilentlytoPresetMenu.vuefor setting the active preset without triggering UI side effects, supporting smoother preset initialization via URL.ReportFilter.vueby introducing anisInitializingflag and updatinginitByUrlto properly handle preset application from URL parameters, ensuring correct state and preventing race conditions.filterPresetparameter is now removed from the URL, ensuring the UI and URL remain in sync.Code Refactoring and Cleanup:
buildPresetQueryfunction, and separated preset application intoinitFilterPresetandinitFilterPresetFromUrlfor clarity and reuse.getFilterPresetfunction and updated event handling so that applying a preset now uses the improvedinitFilterPresetFromUrllogic.State and Reactivity Enhancements:
checkModifiedfunction 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.