Skip to content

Refine Scriptler run/edit form styling for modern Jenkins themes#186

Open
BobDu wants to merge 1 commit intojenkinsci:mainfrom
BobDu:feature/scriptler-ui-css-simplify
Open

Refine Scriptler run/edit form styling for modern Jenkins themes#186
BobDu wants to merge 1 commit intojenkinsci:mainfrom
BobDu:feature/scriptler-ui-css-simplify

Conversation

@BobDu
Copy link
Member

@BobDu BobDu commented Mar 3, 2026

After:

image image image

Before:
image
image
image

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

Copy link
Contributor

@mtughan mtughan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, @BobDu! This had been on my to-do list for a while, but hadn't gotten around to it. Thanks for tackling this!

Just a few small things I'd like to see addressed if possible before I approve this.

required core: ${t.core}
</td>
<td rowspan="2" valign="top">
<td rowspan="2" valign="top" class="scriptler-catalog-params">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to move the valign attribute to use the CSS property vertical-align instead?

<tr valign="center" style="border-top: 0px;">
<td class="pane" width="20">
<tr>
<td class="scriptler-catalog-import" width="20">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move the width attribute to use the CSS property width instead?

<j:set var="approved" value="${i.approved}" />
<j:set var="t" value="${i.script}" />
<tr>
<td class="scriptler-toolbar" width="1%">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here (width attribute to CSS property width).

Comment on lines +55 to +64
<j:when test="${t.nonAdministerUsing}">
<span class="scriptler-icon-slot">
<l:icon tooltip="${%usableInBuildStep}" src="symbol-construct-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</span>
</j:when>
<j:otherwise>
<span class="scriptler-icon-slot">
<l:icon tooltip="${%notUsableInBuildStep}" src="symbol-lock-closed-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</span>
</j:otherwise>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can deduplicate some lines here.

Suggested change
<j:when test="${t.nonAdministerUsing}">
<span class="scriptler-icon-slot">
<l:icon tooltip="${%usableInBuildStep}" src="symbol-construct-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</span>
</j:when>
<j:otherwise>
<span class="scriptler-icon-slot">
<l:icon tooltip="${%notUsableInBuildStep}" src="symbol-lock-closed-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</span>
</j:otherwise>
<span class="scriptler-icon-slot">
<j:when test="${t.nonAdministerUsing}">
<l:icon tooltip="${%usableInBuildStep}" src="symbol-construct-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</j:when>
<j:otherwise>
<l:icon tooltip="${%notUsableInBuildStep}" src="symbol-lock-closed-outline plugin-ionicons-api" class="icon-sm jenkins-!-text-color-secondary" />
</j:otherwise>
</span>

Since the span element is common to both.

Comment on lines +55 to +67
<div class="scriptler-edit-params">
<f:optionalBlock name="defineParams" title="${%ParametersDescription}" checked="${!empty(script.parameters)}">
<f:entry title="${%Parameters}" field="parameters">
<j:set var="deleteText" value="${%DeleteParameter}" />
<f:repeatable var="param" items="${script.parameters}" name="parameters" add="${%AddParameter}"
minimum="1">
<div class="show-if-not-only">
<button class="repeatable-delete danger" type="button" title="${deleteText}" aria-label="${deleteText}">
<l:icon src="symbol-close" />
</button>
</div>
<f:entry title="${%ParameterName}">
<f:textbox name="name" value="${param.name}"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be an extra tab added to each of these lines. Can we remove it?

Suggested change
<div class="scriptler-edit-params">
<f:optionalBlock name="defineParams" title="${%ParametersDescription}" checked="${!empty(script.parameters)}">
<f:entry title="${%Parameters}" field="parameters">
<j:set var="deleteText" value="${%DeleteParameter}" />
<f:repeatable var="param" items="${script.parameters}" name="parameters" add="${%AddParameter}"
minimum="1">
<div class="show-if-not-only">
<button class="repeatable-delete danger" type="button" title="${deleteText}" aria-label="${deleteText}">
<l:icon src="symbol-close" />
</button>
</div>
<f:entry title="${%ParameterName}">
<f:textbox name="name" value="${param.name}"/>
<div class="scriptler-edit-params">
<f:optionalBlock name="defineParams" title="${%ParametersDescription}" checked="${!empty(script.parameters)}">
<f:entry title="${%Parameters}" field="parameters">
<j:set var="deleteText" value="${%DeleteParameter}" />
<f:repeatable var="param" items="${script.parameters}" name="parameters" add="${%AddParameter}"
minimum="1">
<div class="show-if-not-only">
<button class="repeatable-delete danger" type="button" title="${deleteText}" aria-label="${deleteText}">
<l:icon src="symbol-close" />
</button>
</div>
<f:entry title="${%ParameterName}">
<f:textbox name="name" value="${param.name}"/>

Comment on lines +104 to +106
</f:form>
</l:main-panel>
</l:layout>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Suggested change
</f:form>
</l:main-panel>
</l:layout>
</f:form>
</l:main-panel>
</l:layout>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants