Adapt Script Console for experimental Manage Jenkins UI#11333
Adapt Script Console for experimental Manage Jenkins UI#11333timja merged 17 commits intojenkinsci:masterfrom
Conversation
| gap: 1.5rem; | ||
|
|
||
| .jenkins-copy-button { | ||
| .jenkins-button { |
There was a problem hiding this comment.
The 'Run example' button isn't a jenkins-copy-button, so this SCSS needed to be updated.
| <d:taglib uri="local"> | ||
| <d:tag name="contents"> | ||
| <l:app-bar title="${%scriptConsole}"> | ||
| <t:help href="https://www.jenkins.io/doc/book/managing/script-console/" /> |
There was a problem hiding this comment.
Do not link to docs directly, prefer redirect URLs.
| </p> | ||
| <f:section title="${%Getting started}"> | ||
| <p class="jenkins-section__description"> | ||
| Use the ‘println’ command to see the output (if you use System.out, it will go to the server’s stdout, which is harder to see). ${%description2} |
| </j:forEach> | ||
|
|
||
| <!-- this is where the example goes --> | ||
| <d:invokeBody /> |
There was a problem hiding this comment.
Is this still supported? What happens in maven-plugin with this PR?
| <j:new var="it" className="jenkins.management.ConsoleLink" /> | ||
|
|
||
| <l:settings-subpage includeBreadcrumb="true" permission="${app.ADMINISTER}" header="${null}" noDefer="true"> | ||
| <j:set var="it" value="${previousIt}" /> |
There was a problem hiding this comment.
Why this hack? Wouldn't it be cleaner to use a different variable in that tag?
There was a problem hiding this comment.
Wanted <l:settings-subpage to not need to be passed it to work, the thinking being any page using settings-subpage would be of type ManagementLink.
This isn't the case for a lot of pages in core unfortunately so you get this rather unfortunate workaround.
Discussed with Tim about this, and I think we'll be adding an optional it param to all of the subpages.
There was a problem hiding this comment.
want to give a refactor a go before we make this worse?
There was a problem hiding this comment.
Opened #23902 - if you're both happy with the approach I'll open PRs for jobs and builds
|
cc @jenkinsci/sig-ux appreciate a review |
|
FYI breaks ATH tests that use The |
|
Hey @mawinter69, any thoughts on this? |
|
The width of the textarea is somehow wrong on the script console of agents starting from a window width of 1120px . The small symbol to resize the textarea is then outside. That is independent of new Manage Jenkins UI being enabled. With new UI off, the textarea is correct on the global script page. With new UI on, the small symbol in lower right seems to be a bit too far to the left for me (chrome and firefox) global script console new UI enabled: Another general thing on all new Manage UI pages is that the Also generally I consider the width of the actual content as too small especially on bigger screens. |
The console resizer being not positioned correctly is pre-existing - annoying one though.
What resolution is this at? It does have a min-height but I'd have assumed the sidebar height would be taller than that anyway.
Definitely something to look into - experienced this with the Plugins page PR too. |
The sidebar is smaller for me. I have a usable height of 1560px. Just zoom your browser to 75% and you will see the problem probably. The min-height is |
lewisbirks
left a comment
There was a problem hiding this comment.
Apart from the known pre-existing issue of the text area expander icon alignment this seems to be working fine for me from local testing. That alignment issue can be fixed in a follow up.
|
Thanks for the feedback Markus, we'll look to solve that generically if we can separately. /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! |




This PR adapts Script Console for experimental Manage Jenkins UI. It also refines the UI, bringing it closer to Jenkins CLI, as well as allows for the example scripts to be executed with a button click.
Testing done
Proposed changelog entries
Proposed changelog category
/label web-ui,rfe
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@jenkinsci/sig-ux
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).