-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify mutation menu #1775
Simplify mutation menu #1775
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Spotted one issue in the graph view where opening the menu on different jobs didn't behave as elsewhere. Haven't checked this against master, however, it appears to be fixed with #1780
Latest change should make it immune to that kind of thing |
Fixed. |
This comment was marked as resolved.
This comment was marked as resolved.
I've also renamed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found one "quirk" when a task disappears from the n-window and is removed from the view, any open menu will jump to the top-left of the screen (because the target node has been removed).
Would be beneficial if we could disable this behaviour, but the menu remains functional so not a biggie.
:key="node.id" | ||
v-click-outside="{ handler: onClickOutside, closeConditional: () => !dialog }" | ||
class="c-mutation-menu elevation-10 overflow-y-auto" | ||
max-height="90vh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with small windows, the default max-height behaviour appears to be sufficient.
By figuring out how to use
VMenu
better I was able to drop a fair amount of cruft.We were originally using
VMenu
but through various attempts to get it to behave the way we want (e.g. #927, #1269) I ended up re-implementing some of the behaviour manually (e.g. click-outside behaviour).It turns out the key to using
VMenu
and getting it to behave the way we want is not too difficult::target
prop - this allows Vuetify to take care of positioning relative to thec-data-interactive
element that was clicked on:key
prop - this allows the menu to re-open when clicking betweenc-data-interactive
elements by using a unique identifier for each element (so Vue knows a different element has been clicked)Update: also renamed the
v-cylc-object
directive tov-command-menu
as that is more descriptive IMOCheck List
CONTRIBUTING.md
and added my name as a Code Contributor.CHANGES.md
entry not needed as invisible to users