-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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-62496] Convert arrow pngs to CSS #4757
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 overall, thanks! I think we need to wait until #4752 is merged and then adds CSS variables for it
#breadcrumbs LI.children:hover { | ||
background-image: url(menu_right_arrow.png); | ||
#breadcrumbs LI.children:hover:after { | ||
border-left-color: #4d545d; |
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.
Will need update after #4752 is merged so that we do not hardcode colors
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.
And I think the variable should be --text-color
.
#menuSelector:after { | ||
/* Down arrow */ | ||
content: ""; | ||
border-top: 0.30em solid #4d545d; |
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.
Needs a variable after #4752
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.
Ditto
border-bottom: 0; | ||
} | ||
#menuSelector.inverse:after { | ||
border-top-color: #bcbcbc; |
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.
Needs a variable after #4752
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.
Same as above
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've played around with this with variables and I got it working, I'll send a PR here once the variables PR is merged,
All icons that I found except for one are working (the Manage Jenkins sub menu):
This appears to be the CSS
background: url(menubaritem_submenuindicator.png) right center no-repeat; |
Although I would suggest overriding it in the yui-compatibility less file: https://github.com/jenkinsci/jenkins/blob/49e501f37db848e69de31607a43df79bab4e77b0/war/src/main/less/base/yui-compatibility.less
@EstherAF PR for the dark mode changes on the breadcrumbs: EstherAF#9 |
I'm looking at it. Do you know where the class |
can't see it, took me quite awhile to even find the css and selector that was causing the above issue |
@EstherAF it seems like the new arrows have a lighter dark than they previously had? I'm not against it, I just want to check it's something we've noticed and are fine with it. Other than that, it looks good! |
Yes! It is because now they are using the same color than the text, with the css variable. Before they were using just black (IIRC). What do you think? I prefer this so the color palette used is simpler, and it is more integrated with the text of the link. |
@EstherAF it makes sense to me and I agree. As I said, I just wanted to note it just in case. |
@timja I've just pushed a fix for that. I've faced a little problem here that I don't know how to solve it. The arrow with CSS is generated as another element inside the menu item, as a sibling of the menu link (the text). This is causing that the menu link is not 100% wide anymore, and when focused the borders are displayed and you can see that the size is different. Before It only happens when the menu item has the arrow at the right (when it has a submenu). In the other items, the border on focus remains like before. I don't know if this is a big deal, WDYT? |
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've tried it out and wasn't able to come up with anything better,
thanks!
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've suggested some changes that should fix the issue with the dropdown menu. Please test them locally befor committing :D
Co-authored-by: Félix Queiruga <felix.queiruga@gmail.com>
Thanks @fqueiruga. It works perfectly! |
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, works great!
Thanks for the PR! This PR is now ready-for-merge, we will merge it after ~24 hours if there's no negative feedback |
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, all comments are addressed. Thanks @EstherAF !
See JENKINS-62496.
Fixes jenkinsci/dark-theme-plugin#24
Convert arrows used to display contextual menus, from background images to CSS triangles.
Screenshots of the change:
Down arrow
Before:
After:
Right arrow
Before
Breadcrumbs
Submenu
After
Breadcrumbs
Submenu
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
@timja @fqueiruga
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
to be considered (see query).