-
-
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
[JEP-234] Customizable header #5909
Conversation
e563e55
to
bcea455
Compare
bcea455
to
41b0c6d
Compare
Can you write a proper changelog entry rather than a developer guide please, our changelog isn't setup for something that complex. This should be probably be documented on jenkins.io too? |
core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly
Outdated
Show resolved
Hide resolved
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 do not think this is a correct approach for such a change. As @timja mentioned, this makes maintenance more complicated. And it is not an extension point in classic means, it is just an override logic. It might be helpful for some parties if they want to replace the header alltogether bit it complicates further maintenance. As long as there is no reference implementation justifying it, I am not ready to support such design.
10007e6
to
6989c25
Compare
6989c25
to
29e3814
Compare
@oleg-nenashev in JEP-234 there is a reference implementation. Not sure if this is enough or not, but as mentioned in JEP, current alternatives make no possible (or a hacky/hell/nightmare-frankenstein-thing) to have a customized header (not only in UI terms) |
This is exactly what I was concerned with: a narrower API would be preferred I think |
No strong opinion on to setup API endpoints for each part of the header content (logo, searchbar, etc.) to make it more modular, but not part of the scope of the JEP proposed here. JEP aims to have capabilities to include/update parts/all the header beyond styles and static content. I guess I get your point and I see that as a follow up of this in order to apply KISS :-) |
Again as Oleg and I have said this isn't extending this is replacing. This does not explain backwards compatibility for Jenkins core in terms of the header: If we refactor the header what happens to your custom header, could be completely broken. we could change CSS and adapt the header but your custom one would not be adapted at all. |
I'm fine with that statement. I have not mentioned at all it is about extending. Actually, as you mentioned, the JEP proposal aims to make it feasible to customize by a replacement of the <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:i="jelly:fmt" xmlns:x="jelly:xml">
<j:invokeStatic var="header" className="jenkins.views.JenkinsHeader" method="get"/>
<st:include it="${header}" page="headerContent.jelly"/>
</j:jelly> And each plugin that provides a <j:invokeStatic var="label" className="org.jenkinsci.plugins.custom.header.CustomHeader" method="getHeaderLabel"/>
<span class="hidden-xs hidden-sm">${label} - ${userName}</span> where
Well, I guess this is the same issue that could happen with other approaches like simple-theme-plugin. For example: if we decide tomorrow to modify the id of the search-box on the header: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/lib/layout/pageHeader.jelly#L53, this will probably affect a lot of themes using that customization tooling (i.e: https://github.com/djonsson/jenkins-atlassian-theme/blob/master/src/style.css#L95) IOW (and setting expectations) as mentioned before I'm ok with having a narrowed API that could help here to fix the mentioned issues, but that was not the proposal that is on the JEP. The proposal of the JEP aims to have capabilities to include/update parts/all the header beyond styles and static content. |
@oleg-nenashev I think your feedback has been addressed. Also given Tim approved this PR in the meantime, care to re-review? Apart from the comment above, it looks like we're close to ready for merge. I think it would be cleaner however to officially merge the JEP PR before merging the core PR here. @imonteroperez there has been comments by Jesse & Mark on the JEP, can you please make sure they're all addressed and marked as resolved so we can move towards merging there and here? Thanks for the great work! |
@batmat all comments addressed and marked as resolved. Not able to merge the JEP PR (restricted to authorized users) |
Co-authored-by: Vincent Latombe <vincent@latombe.net>
@oleg-nenashev I think your feedback was addressed, so I'm dismissing your past review FYI. Feel free to tell us whether you still have comments or requests on the current implementation. |
Given the 6 approvals, I am marking this PR However, I'd like to condition the merge here to be after jenkinsci/jep#380 has been merged as Draft JEP and assigned an official JEP number. In other words, this means I plan to merge here 24 hours from now, provided the JEP PR has been merged in the meantime. Please tell us if you disagree with this stance. Thanks all. |
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.
Sorry @batmat but I am against merging in the current state. I would like to review it, and AFAICT there was no review requested from me. Sorry, I missed the previous comments but we expect to request reviews in this repository.
The Tuesday weekly ship has sailed, so there is no problem with keeping the pull request open until the JEP is properly integrated. I will handle that and do the review
It was requested 12 days ago, see: #5909 (comment) |
I might be missing something. As far as I can tell it wasn't on my review dashboard. If it was requested through the comment, I can assure you I missed that. Back to the subject matter, would it be possible to summarize the current review state in the developer mailing list thread? It would be particularly useful to know whether it was presented to the user experience group like it was announced there, and what is the consensus built in the UX SIG. For the record I do not intend to block the change further. What I wanted is to ensure that we follow the JEP process as much as possible since it was taken for this pull request. We have one week before the next weekly, so it makes no sense to rush now and to risk creating leftovers I will follow up on my proposal to add all officers and board members to JEP editors. Apparently even the recent changes are not enough |
I will summarize all in the dev ML thread tomorrow after the UX SIG meeting |
For the record, the associated JEP for this change here is now officially JEP-234. |
FTR I shared JEP-234 in the Jenkins UX SIG meeting. Meeting notes are available here Also shared with them the implementation details from this PR Feedback obtained from the group was positive and they did not see any issue with this approach. Shared this also on the jenkins-dev ML: https://groups.google.com/g/jenkinsci-dev/c/1tDvSioCaF0 cc/ @oleg-nenashev |
Any pending action here before merging this PR? @oleg-nenashev @batmat |
This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
@timja Can we merge this? No negative feedback was obtained in 24h. |
generally we batch merge before weekly 😄 so no need to worry if its more than 24h |
See JEP-234
Proposed changelog entries
Header
as an interface that provides capabilities to render a specific header and a default implementation of that, namedJenkinsHeader
that is enabled by default.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
@MarkEWaite @jglick @fcojfernandez @raul-arabaolaza @EstherAF @Wadeck @timja @batmat
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).