Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a UI consistency issue in the monitor list’s Tags filter dropdown by refreshing the available tag list when the dropdown menu is opened, so newly created tags can appear without a full page reload.
Changes:
- Add an
openMenuemit toMonitorListFilterDropdownand trigger it on menu focus. - Listen for the dropdown “open” event in
MonitorListFilterto re-fetch tags via Socket.IO.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/components/MonitorListFilterDropdown.vue |
Emits an “open menu” event when the dropdown receives focus and opens the menu. |
src/components/MonitorListFilter.vue |
Hooks the tags dropdown open event to call getExistingTags() and refresh the tags list. |
Comments suppressed due to low confidence (1)
src/components/MonitorListFilterDropdown.vue:36
@focusinbubbles for every focus change inside the dropdown (button -> menu items, etc.). With the newopenMenu()handler this will emitopenMenurepeatedly while the menu is already open, which can trigger repeated tag fetches / extra socket traffic and may cause re-render/focus glitches. Consider emitting only when transitioning from closed -> open (e.g., guard onthis.openbefore emitting) or move the handler to a non-bubbling event/element so it fires once per open.
openMenu() {
this.$emit("openMenu");
this.open = true;
},
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.
Summary
Force to retrieve the tag list when open the menu.
Hadn't touch this part previously, just realized that it was actually not implemented in reactive way.
Resolves #7057
Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.