fix(HistoryList): implement context menu close with EventBus#2378
Merged
meteyou merged 2 commits intomainsail-crew:developfrom Jan 8, 2026
Merged
fix(HistoryList): implement context menu close with EventBus#2378meteyou merged 2 commits intomainsail-crew:developfrom
meteyou merged 2 commits intomainsail-crew:developfrom
Conversation
…entBus Signed-off-by: Stefan Dej <meteyou@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the context menu behavior in the History page list by implementing the EventBus pattern to ensure that only one context menu can be open at a time. When a new context menu is opened, all previously open context menus are closed automatically.
- Integrates the existing
CLOSE_CONTEXT_MENUEventBus event into History list components - Removes redundant
$nextTicklogic and early return checks inshowContextMenumethods - Adds proper lifecycle hooks for event listener registration and cleanup
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/panels/History/HistoryListEntryMaintenance.vue | Implements EventBus context menu close pattern with proper event listener registration in mounted/beforeDestroy hooks |
| src/components/panels/History/HistoryListEntryJob.vue | Implements EventBus context menu close pattern with proper event listener registration in mounted/beforeDestroy hooks |
The implementation is solid and follows the established pattern already used throughout the codebase in similar components (GcodefilesPanel, Status panels, etc.). The changes properly:
- Emit the
CLOSE_CONTEXT_MENUevent when opening a context menu - Listen for the event and close the local context menu accordingly
- Clean up event listeners in the
beforeDestroylifecycle hook to prevent memory leaks
No issues were identified in this code review.
mryel00
previously approved these changes
Jan 8, 2026
mryel00
approved these changes
Jan 8, 2026
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.
Description
This PR fix the ContextMenu in the History Page list. When you open another context menu, it will close all open context menu before.
Related Tickets & Documents
none
Mobile & Desktop Screenshots/Recordings
before:

after:

[optional] Are there any post-deployment tasks we need to perform?
none