-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Add section titles to Manage Jenkins context menu #4586
Add section titles to Manage Jenkins context menu #4586
Conversation
Reworking this to be less of a disgusting hack. |
49efa3a
to
6f3c326
Compare
Co-authored-by: Félix Queiruga <fqueiruga@cloudbees.com>
Amended with larger font size (thanks @fqueiruga): |
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 great! nice, smart solution. Just added a suggestion to rename the CSS class in order to make it more specific for this component.
@@ -126,3 +126,8 @@ | |||
A.model-link.inside, #breadcrumbs A.inside {/* additional 'inside' class allows pre-allocation of the context menu space */ | |||
padding-right: 16px; | |||
} | |||
|
|||
#breadcrumb-menu .header { |
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.
#breadcrumb-menu .header { | |
.breadcrumb-menu__category { |
@@ -203,7 +203,11 @@ var breadcrumbs = (function() { | |||
onComplete:function (x) { | |||
var a = x.responseText.evalJSON().items; | |||
function fillMenuItem(e) { | |||
e.text = makeMenuHtml(e.icon, e.displayName); | |||
if (e.header) { | |||
e.text = makeMenuHtml(e.icon, "<span class='header'>" + e.displayName + "</span>"); |
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.
e.text = makeMenuHtml(e.icon, "<span class='header'>" + e.displayName + "</span>"); | |
e.text = makeMenuHtml(e.icon, "<span class='breadcrumb-menu__category'>" + e.displayName + "</span>"); |
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.
Although I agree with James' comment, I think the benefits of having those titles are bigger than the effects on the scroll
I like the change, I think it improves the visualization a lot. Happy to approve once you review @fqueiruga suggestions. |
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 am fine with both alternatives, leaving the decision to UX experts.
P.S: We could even have both and select one based on the number of items (e.g. this PR when it is below 12 and #4583 when the number is above). But most likely it is an over-complication
Personally I'd prefer this be merged, and the other being left as a workaround if feedback is overly negative for adding ~5 items. |
I plan to merge it tomorrow if no negative feedback |
Alternative to #4583.
Screen shots
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgradeDesired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate