-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
[JENKINS-72745] "Manage Jenkins" nested context menu can stay open when parent menu closes #10251
Open
ridemountainpig
wants to merge
4
commits into
jenkinsci:master
Choose a base branch
from
ridemountainpig:JENKINS-72745
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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.
Used in
jenkins/src/main/js/components/dropdowns/autocomplete.js
Line 96 in e34bdcf
I was unable to identify a difference in behavior as a result of this PR (e.g., in the "Copy From" textfield on the new item dialog), so perhaps I'm just missing how this is supposed to work? If it's not needed anymore or compensated for somehow by this new code, the
data-
attribute should not longer be set.Pinging @zbynek as the original author who might be able to help with this question.
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.
If we no longer read the
data-
attribute, we can indeed remove the assignment 👍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.
@zbynek Thanks for confirmation.
Can you think of a widget that would be affected by the attribute, where this change may change behavior? The autocomplete popup of the "Copy from" text field doesn't seem to change behavior when I edit the
data-
attribute in the DOM. I feel like I'm missing something.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.
My PR disables Tippy's default
hideOnClick
only for autocomplete, this PR disables it for all other dropdowns. So PR won't change behavior of autocomplete. It'ts the dropdowns that are not autocomplete that changed behavior in this PR:For context menus clicking the chevron (downward triangle) the second time no longer closes the context menu. If that's still a desired behavior, the
data-
attribute is still needed (and should be read in theclick
handler to decide how to handle clicks inreference
element).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.
@zbynek Thanks for clarifying. That seems like a problem.
open.mov
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.
@daniel-beck I have updated the code to fix this problem. Thank you.
jenkins.mp4
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.
@ridemountainpig Thanks. Unfortunately now the fields where this was previously left open close when they shouldn't:
close.mov
That's what the
hideOnClick
was used for. Could this behavior be retained, or does the fix for this require that we change one of the previous behaviors (stay open on autocomplete / close in other cases)?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.
@daniel-beck I have updated it. Could you please check it again? Thank you.
jenkins.mp4