Skip to content

fix(Happy Hare): Fixes display of gate-context menus with right-click action#1757

Merged
pedrolamas merged 9 commits intofluidd-core:developfrom
moggieuk:gate_context_menu
Dec 17, 2025
Merged

fix(Happy Hare): Fixes display of gate-context menus with right-click action#1757
pedrolamas merged 9 commits intofluidd-core:developfrom
moggieuk:gate_context_menu

Conversation

@moggieuk
Copy link
Contributor

@moggieuk moggieuk commented Dec 11, 2025

Description:
Previously the included gate context menus were not being displayed. This fixes that and make the menu mechanism more extensible.
The context menus are require to be able to perform operations on gates other than the one selected. E.g. on a Type-B MMU like BoxTurtle, KMS, QuattroBox, etc for ejecting or pre-loading gates/lanes:

Screenshot 2025-12-11 at 4 16 11 PM

SIgned off by: Paul Morgan (moggieuk@hotmail.com)

@moggieuk moggieuk changed the title fix(HappyHare): Fixes display of gate-context menus with right-click action fix(Happy Hare): Fixes display of gate-context menus with right-click action Dec 11, 2025
@pedrolamas pedrolamas added the FR - Enhancement New feature or request label Dec 12, 2025
@pedrolamas pedrolamas added this to the 1.36.1 milestone Dec 12, 2025
@pedrolamas pedrolamas requested a review from Copilot December 16, 2025 15:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

pedrolamas and others added 2 commits December 16, 2025 15:46
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
@pedrolamas pedrolamas added GH - Bug Something isn't working and removed FR - Enhancement New feature or request labels Dec 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

<v-list dense>
<v-list
dense
@mouseleave="closeContextMenu"
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The mouseleave event on the v-list will close the menu when the user's cursor briefly leaves the menu bounds, which can be frustrating. This conflicts with the 6-second timeout mechanism. Consider removing the mouseleave handler or add a small delay before closing to prevent accidental closure when the user's cursor momentarily leaves the menu area.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

Assume intended behavior, so ignore.

Comment on lines +457 to +459
contextMenuCommand (command: string, loading: string, gate: number) {
this.sendGcode(`${command} GATE=${gate}`, loading)
}
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

After executing a command, the context menu should close but there's no call to closeContextMenu in contextMenuCommand. This means the menu stays open after clicking a button, which is counterintuitive. Add a call to this.closeContextMenu() at the end of contextMenuCommand to close the menu after executing the command.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

This seems to be the expected behavior, so ignore.

Comment on lines +467 to +468
this.menuX = e.clientX - 20
this.menuY = e.clientY - 20
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The magic numbers -20 for menu positioning offset are unexplained. Extract these to named constants with descriptive names to improve code maintainability and make the offset purpose clear.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

Ignore.

this.$set(this.gateMenuVisible, gate, true)
this.closeTimeout = window.setTimeout(() => {
this.closeContextMenu()
}, 6000)
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The magic number 6000 (6 seconds timeout) is unexplained. Extract this to a named constant with a descriptive name to improve code maintainability and make the timeout duration clear and easily configurable.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

Ignore.

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
@pedrolamas pedrolamas merged commit 66d7a5c into fluidd-core:develop Dec 17, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GH - Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants