-
-
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-69549] Margins for headers and paragraphs make descriptions … #7078
Conversation
…and non-trivial inline help look terrible
With changes like this it would be interesting to know why the original change was done in the first place. Requesting @janfaracik as a reviewer to point out what this change in turn will break ;-) |
The original change was made to make page headers have a margin consistent with the page margin. This causes issues like the above however. For https://issues.jenkins.io/browse/JENKINS-69549 there's two issues:
(I haven't tried this PR yet) but I believe a better fix would be to change the value of |
…and non-trivial inline help look terrible
|
This is impractical to implement across the ecosystem. We need to expect that all levels of |
Would it be possible (and relatively straightforward) to dynamically change the header levels when clicking the❓button? |
We already rewrite the responses some in jenkins/war/src/main/webapp/scripts/hudson-behavior.js Lines 990 to 1005 in 04b46d1
h* being inside/output the help block, and if so, why?
|
Please take a moment and address the merge conflicts of your pull request. Thanks! |
I've checked and usage statistics was the only place in the ecosystem using an h1: So no need to rewrite the response imo. |
@@ -389,6 +391,24 @@ pre.console { | |||
p:last-of-type { |
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 tried removing this as its the cause of the heading spacing issue but I couldn't find a way to make it work whilst keeping no spacing at the bottom of the help file (made worse in help from plugins that have from plugin ...
as the space was a bit excessive without this.
// add spacing above headings except for when its the first element in the help | ||
// the need for this is caused by p:last-of-type setting margin-bottom to 0 | ||
// unfortunately because of the varied markup I wasn't able to find a way to avoid this | ||
h1:not(:first-child), |
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.
@janfaracik what do you think about this approach and can you think of a simpler one?
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.
Yeah I can't think of anything sadly, could use 'gap' on the parent container but due to how varied the contents are it probably would make things worse :/
@@ -8,7 +8,7 @@ def f=namespace(lib.FormTagLib) | |||
|
|||
f.section(title: _("Usage Statistics")) { | |||
if (UsageStatistics.DISABLED) { | |||
span(class: "jenkins-not-applicable") { | |||
div(class: "jenkins-not-applicable jenkins-!-margin-bottom-2") { |
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.
@@ -38,24 +38,34 @@ | |||
Each trial has a specific purpose and a defined end date, after which collection stops, independent of the installed versions of Jenkins or plugins. | |||
Once a trial is complete, the trial results may be aggregated and shared with the developer community. | |||
</p> | |||
<p> | |||
The following trials defined on this instance are active now or in the future: |
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.
the help was ending with this as there's no trials currently (and an empty dl
)
Will take a look 👍 |
@janfaracik please take a look |
core/src/main/resources/hudson/model/UsageStatistics/global.groovy
Outdated
Show resolved
Hide resolved
// add spacing above headings except for when its the first element in the help | ||
// the need for this is caused by p:last-of-type setting margin-bottom to 0 | ||
// unfortunately because of the varied markup I wasn't able to find a way to avoid this | ||
h1:not(:first-child), |
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.
Yeah I can't think of anything sadly, could use 'gap' on the parent container but due to how varied the contents are it probably would make things worse :/
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
See JENKINS-69549.
Before:
After:
Another example:
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 upgrade@Restricted
or have@since TODO
Javadoc, as appropriate.@Deprecated(since = "TODO")
or@Deprecated(forRemoval = true, since = "TODO")
if applicable.eval
to ease future introduction of Content-Security-Policy directives (see documentation on jenkins.io).Desired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are accurate, human-readable, and in the imperative moodupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).