From f3126d1529badc688d2f8264e44bcbef5db3da66 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:15:15 +0100 Subject: [PATCH 01/10] Update config-builders.jelly --- .../lib/hudson/project/config-builders.jelly | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/src/main/resources/lib/hudson/project/config-builders.jelly b/core/src/main/resources/lib/hudson/project/config-builders.jelly index f73d3db19324..4ff944d679f0 100644 --- a/core/src/main/resources/lib/hudson/project/config-builders.jelly +++ b/core/src/main/resources/lib/hudson/project/config-builders.jelly @@ -27,12 +27,10 @@ THE SOFTWARE. --> - - - - + + From b1c83f4370018dc36854cc89a436ec59fd0ae45d Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:59:14 +0100 Subject: [PATCH 02/10] Push --- core/src/main/java/hudson/Functions.java | 6 +++--- .../resources/lib/form/descriptorList.jelly | 5 ++++- .../hudson/project/config-buildWrappers.jelly | 5 +++-- .../lib/hudson/project/config-builders.jelly | 3 ++- .../hudson/project/config-publishers2.jelly | 19 +++++++++---------- .../lib/hudson/project/config-scm.jelly | 3 ++- .../lib/hudson/project/config-trigger.jelly | 5 +++-- war/src/main/scss/components/_section.scss | 2 +- 8 files changed, 27 insertions(+), 21 deletions(-) diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index cd25f9bc9871..16cc3e1b343b 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -1800,11 +1800,11 @@ public static void printStackTrace(@CheckForNull Throwable t, @NonNull PrintStre /** * Counts the number of rows needed for textarea to fit the content. - * Minimum 5 rows. + * Minimum 4 rows. */ public static int determineRows(String s) { - if (s == null) return 5; - return Math.max(5, LINE_END.split(s).length); + if (s == null) return 4; + return Math.max(4, LINE_END.split(s).length); } /** diff --git a/core/src/main/resources/lib/form/descriptorList.jelly b/core/src/main/resources/lib/form/descriptorList.jelly index ed485ef79fc6..f5d364d45682 100644 --- a/core/src/main/resources/lib/form/descriptorList.jelly +++ b/core/src/main/resources/lib/form/descriptorList.jelly @@ -34,6 +34,9 @@ THE SOFTWARE. Sets the icon on the sidebar item for the section anchor link The icon isn't visible in the section itself + + Optional attribute to set a description for the section + hudson.model.Descriptor collection whose configuration page is rendered. @@ -72,7 +75,7 @@ THE SOFTWARE. - +
diff --git a/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly b/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly index bf11b396140e..09057f7c3051 100644 --- a/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly +++ b/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly @@ -29,9 +29,10 @@ THE SOFTWARE. - + icon="symbol-environment" + description="Configure settings and variables that define the context in which your build runs, like credentials, paths, and global parameters" /> diff --git a/core/src/main/resources/lib/hudson/project/config-builders.jelly b/core/src/main/resources/lib/hudson/project/config-builders.jelly index 4ff944d679f0..acae4120e29f 100644 --- a/core/src/main/resources/lib/hudson/project/config-builders.jelly +++ b/core/src/main/resources/lib/hudson/project/config-builders.jelly @@ -27,7 +27,8 @@ THE SOFTWARE. --> - + - - - - + + diff --git a/core/src/main/resources/lib/hudson/project/config-scm.jelly b/core/src/main/resources/lib/hudson/project/config-scm.jelly index 6a0202e005b5..81217b341611 100644 --- a/core/src/main/resources/lib/hudson/project/config-scm.jelly +++ b/core/src/main/resources/lib/hudson/project/config-scm.jelly @@ -25,7 +25,8 @@ THE SOFTWARE. - + diff --git a/core/src/main/resources/lib/hudson/project/config-trigger.jelly b/core/src/main/resources/lib/hudson/project/config-trigger.jelly index 9d3651d6e1a2..4b35f26e78c4 100644 --- a/core/src/main/resources/lib/hudson/project/config-trigger.jelly +++ b/core/src/main/resources/lib/hudson/project/config-trigger.jelly @@ -31,10 +31,11 @@ THE SOFTWARE. - + icon="symbol-trigger" + description="Set up automated actions that start your build based on specific events, like code changes or scheduled times"> diff --git a/war/src/main/scss/components/_section.scss b/war/src/main/scss/components/_section.scss index 4e0768d8f6e0..4519554ff849 100644 --- a/war/src/main/scss/components/_section.scss +++ b/war/src/main/scss/components/_section.scss @@ -36,7 +36,7 @@ .jenkins-section__description { // Tweaked margin so that it appears visually centred when placed next to `.jenkins-section__title` - margin: -0.5rem 0 1rem; + margin: -0.8125rem 0 1rem; color: var(--text-color-secondary); line-height: 1.66; } From d4cead367ef7acacdbaee92a8658b131be081def Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 19 Aug 2024 12:00:27 +0100 Subject: [PATCH 03/10] Push --- core/src/main/java/hudson/model/AbstractProject.java | 2 +- core/src/main/resources/lib/hudson/project/config-trigger.jelly | 1 + war/src/main/js/section-to-sidebar-items.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index c568f8df8b31..70649987b3e0 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -1828,7 +1828,7 @@ protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOExceptio for (Trigger t : triggers()) t.stop(); - triggers.replaceBy(buildDescribable(req, Trigger.for_(this))); + triggers.rebuild(req, json.getJSONObject("triggers"), Trigger.for_(this)); for (Trigger t : triggers()) t.start(this, true); } diff --git a/core/src/main/resources/lib/hudson/project/config-trigger.jelly b/core/src/main/resources/lib/hudson/project/config-trigger.jelly index 4b35f26e78c4..0706888ca255 100644 --- a/core/src/main/resources/lib/hudson/project/config-trigger.jelly +++ b/core/src/main/resources/lib/hudson/project/config-trigger.jelly @@ -35,6 +35,7 @@ THE SOFTWARE. descriptors="${triggers}" instances="${it.triggers}" icon="symbol-trigger" + field="triggers" description="Set up automated actions that start your build based on specific events, like code changes or scheduled times"> diff --git a/war/src/main/js/section-to-sidebar-items.js b/war/src/main/js/section-to-sidebar-items.js index 38683e995f5b..54a6ff6e10a5 100644 --- a/war/src/main/js/section-to-sidebar-items.js +++ b/war/src/main/js/section-to-sidebar-items.js @@ -1,7 +1,7 @@ import { createElementFromHtml, toId } from "./util/dom"; const HEADER_SELECTOR = - ".config-table .jenkins-app-bar h2, .config-table > .jenkins-section > .jenkins-section__title"; + ".config-table .jenkins-app-bar h2, .config-table > .jenkins-section > .jenkins-section__title, .config-table > section > .jenkins-section > .jenkins-section__title"; const DEFAULT_ICON = ``; window.addEventListener("load", function () { From dba3d2cf48dc810ea40a60f9db5fbe1f2921e340 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:12:04 +0100 Subject: [PATCH 04/10] Update _section.scss --- war/src/main/scss/components/_section.scss | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/war/src/main/scss/components/_section.scss b/war/src/main/scss/components/_section.scss index 8d85cb8b1aeb..4519554ff849 100644 --- a/war/src/main/scss/components/_section.scss +++ b/war/src/main/scss/components/_section.scss @@ -36,11 +36,7 @@ .jenkins-section__description { // Tweaked margin so that it appears visually centred when placed next to `.jenkins-section__title` -//<<<<<<< HEAD -// margin: -0.8125rem 0 1rem; -//======= - margin: -0.5rem 0 1rem; -//>>>>>>> master + margin: -0.8125rem 0 1rem; color: var(--text-color-secondary); line-height: 1.66; } From 5a84f3d776000130d9c294f639700acc4ba4cba6 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:18:40 +0100 Subject: [PATCH 05/10] Update AbstractProject.java --- core/src/main/java/hudson/model/AbstractProject.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java index 01741e62a570..61f407034c43 100644 --- a/core/src/main/java/hudson/model/AbstractProject.java +++ b/core/src/main/java/hudson/model/AbstractProject.java @@ -1868,7 +1868,7 @@ private void submitImpl(StaplerRequest2 req, StaplerResponse2 rsp) throws IOExce for (Trigger t : triggers()) t.stop(); - triggers.rebuild(req, json.getJSONObject("triggers"), Trigger.for_(this)); + triggers.replaceBy(buildDescribable(req, Trigger.for_(this))); for (Trigger t : triggers()) t.start(this, true); } From 0e788700261245357a7f529728671376f0d95e3d Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:23:07 +0100 Subject: [PATCH 06/10] Update Functions.java --- core/src/main/java/hudson/Functions.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 2bf0e9abe11e..150b1b658c16 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -1874,11 +1874,11 @@ public static void printStackTrace(@CheckForNull Throwable t, @NonNull PrintStre /** * Counts the number of rows needed for textarea to fit the content. - * Minimum 4 rows. + * Minimum 5 rows. */ public static int determineRows(String s) { - if (s == null) return 4; - return Math.max(4, LINE_END.split(s).length); + if (s == null) return 5; + return Math.max(5, LINE_END.split(s).length); } /** From ff8602c459befe58fa15b084f3f8ed6d20e625db Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:29:10 +0100 Subject: [PATCH 07/10] Add resources --- .../resources/lib/hudson/project/config-buildWrappers.jelly | 2 +- .../lib/hudson/project/config-buildWrappers.properties | 1 + .../src/main/resources/lib/hudson/project/config-builders.jelly | 2 +- .../resources/lib/hudson/project/config-builders.properties | 1 + .../main/resources/lib/hudson/project/config-publishers2.jelly | 2 +- .../resources/lib/hudson/project/config-publishers2.properties | 1 + core/src/main/resources/lib/hudson/project/config-scm.jelly | 2 +- .../src/main/resources/lib/hudson/project/config-scm.properties | 1 + core/src/main/resources/lib/hudson/project/config-trigger.jelly | 2 +- .../main/resources/lib/hudson/project/config-trigger.properties | 1 + 10 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 core/src/main/resources/lib/hudson/project/config-buildWrappers.properties create mode 100644 core/src/main/resources/lib/hudson/project/config-builders.properties create mode 100644 core/src/main/resources/lib/hudson/project/config-publishers2.properties create mode 100644 core/src/main/resources/lib/hudson/project/config-scm.properties create mode 100644 core/src/main/resources/lib/hudson/project/config-trigger.properties diff --git a/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly b/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly index 09057f7c3051..6e5816ffc9eb 100644 --- a/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly +++ b/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly @@ -33,6 +33,6 @@ THE SOFTWARE. descriptors="${wrappers}" instances="${it.buildWrappers}" icon="symbol-environment" - description="Configure settings and variables that define the context in which your build runs, like credentials, paths, and global parameters" /> + description="${%description}" /> diff --git a/core/src/main/resources/lib/hudson/project/config-buildWrappers.properties b/core/src/main/resources/lib/hudson/project/config-buildWrappers.properties new file mode 100644 index 000000000000..744dcbba6f19 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/config-buildWrappers.properties @@ -0,0 +1 @@ +description=Configure settings and variables that define the context in which your build runs, like credentials, paths, and global parameters diff --git a/core/src/main/resources/lib/hudson/project/config-builders.jelly b/core/src/main/resources/lib/hudson/project/config-builders.jelly index acae4120e29f..dabe9eff49ea 100644 --- a/core/src/main/resources/lib/hudson/project/config-builders.jelly +++ b/core/src/main/resources/lib/hudson/project/config-builders.jelly @@ -28,7 +28,7 @@ THE SOFTWARE. + description="${%description}"> + description="${%description}"> + description="${%description}"> diff --git a/core/src/main/resources/lib/hudson/project/config-scm.properties b/core/src/main/resources/lib/hudson/project/config-scm.properties new file mode 100644 index 000000000000..a1018d7a0008 --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/config-scm.properties @@ -0,0 +1 @@ +description=Connect and manage your code repository to automatically pull the latest code for your builds diff --git a/core/src/main/resources/lib/hudson/project/config-trigger.jelly b/core/src/main/resources/lib/hudson/project/config-trigger.jelly index 0706888ca255..8f7e555dc65a 100644 --- a/core/src/main/resources/lib/hudson/project/config-trigger.jelly +++ b/core/src/main/resources/lib/hudson/project/config-trigger.jelly @@ -36,7 +36,7 @@ THE SOFTWARE. instances="${it.triggers}" icon="symbol-trigger" field="triggers" - description="Set up automated actions that start your build based on specific events, like code changes or scheduled times"> + description="${%description}"> diff --git a/core/src/main/resources/lib/hudson/project/config-trigger.properties b/core/src/main/resources/lib/hudson/project/config-trigger.properties new file mode 100644 index 000000000000..1a90b0af2dce --- /dev/null +++ b/core/src/main/resources/lib/hudson/project/config-trigger.properties @@ -0,0 +1 @@ +description=Set up automated actions that start your build based on specific events, like code changes or scheduled times From 57a3edf807b7859870e7766e4daf843be8b0a01b Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:31:22 +0100 Subject: [PATCH 08/10] Move prop --- .../resources/lib/hudson/project/config-buildWrappers.jelly | 4 ++-- .../main/resources/lib/hudson/project/config-builders.jelly | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly b/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly index 6e5816ffc9eb..a4895cc2c8cc 100644 --- a/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly +++ b/core/src/main/resources/lib/hudson/project/config-buildWrappers.jelly @@ -30,9 +30,9 @@ THE SOFTWARE. + icon="symbol-environment" /> diff --git a/core/src/main/resources/lib/hudson/project/config-builders.jelly b/core/src/main/resources/lib/hudson/project/config-builders.jelly index dabe9eff49ea..7ac736b8ca2e 100644 --- a/core/src/main/resources/lib/hudson/project/config-builders.jelly +++ b/core/src/main/resources/lib/hudson/project/config-builders.jelly @@ -27,8 +27,9 @@ THE SOFTWARE. --> - + Date: Mon, 16 Sep 2024 15:32:16 +0100 Subject: [PATCH 09/10] Move props --- core/src/main/resources/lib/hudson/project/config-scm.jelly | 5 +++-- .../main/resources/lib/hudson/project/config-trigger.jelly | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/resources/lib/hudson/project/config-scm.jelly b/core/src/main/resources/lib/hudson/project/config-scm.jelly index 2f3b5470586d..56c174b11887 100644 --- a/core/src/main/resources/lib/hudson/project/config-scm.jelly +++ b/core/src/main/resources/lib/hudson/project/config-scm.jelly @@ -25,8 +25,9 @@ THE SOFTWARE. - + diff --git a/core/src/main/resources/lib/hudson/project/config-trigger.jelly b/core/src/main/resources/lib/hudson/project/config-trigger.jelly index 8f7e555dc65a..26700d99d336 100644 --- a/core/src/main/resources/lib/hudson/project/config-trigger.jelly +++ b/core/src/main/resources/lib/hudson/project/config-trigger.jelly @@ -32,11 +32,10 @@ THE SOFTWARE. + icon="symbol-trigger"> From 439ddec6cc346824a3a0a60186b3448e9b14fbe2 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:35:46 +0100 Subject: [PATCH 10/10] Add periods to descriptions --- .../lib/hudson/project/config-buildWrappers.properties | 2 +- .../resources/lib/hudson/project/config-builders.properties | 2 +- .../resources/lib/hudson/project/config-publishers2.properties | 2 +- .../src/main/resources/lib/hudson/project/config-scm.properties | 2 +- .../main/resources/lib/hudson/project/config-trigger.properties | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/resources/lib/hudson/project/config-buildWrappers.properties b/core/src/main/resources/lib/hudson/project/config-buildWrappers.properties index 744dcbba6f19..f5e24444151c 100644 --- a/core/src/main/resources/lib/hudson/project/config-buildWrappers.properties +++ b/core/src/main/resources/lib/hudson/project/config-buildWrappers.properties @@ -1 +1 @@ -description=Configure settings and variables that define the context in which your build runs, like credentials, paths, and global parameters +description=Configure settings and variables that define the context in which your build runs, like credentials, paths, and global parameters. diff --git a/core/src/main/resources/lib/hudson/project/config-builders.properties b/core/src/main/resources/lib/hudson/project/config-builders.properties index 68210db509ce..09d79670c511 100644 --- a/core/src/main/resources/lib/hudson/project/config-builders.properties +++ b/core/src/main/resources/lib/hudson/project/config-builders.properties @@ -1 +1 @@ -description=Automate your build process with ordered tasks like code compilation, testing, and deployment +description=Automate your build process with ordered tasks like code compilation, testing, and deployment. diff --git a/core/src/main/resources/lib/hudson/project/config-publishers2.properties b/core/src/main/resources/lib/hudson/project/config-publishers2.properties index 161ed63f555f..30d6d39fe2fb 100644 --- a/core/src/main/resources/lib/hudson/project/config-publishers2.properties +++ b/core/src/main/resources/lib/hudson/project/config-publishers2.properties @@ -1 +1 @@ -description=Define what happens after a build completes, like sending notifications, archiving artifacts, or triggering other jobs +description=Define what happens after a build completes, like sending notifications, archiving artifacts, or triggering other jobs. diff --git a/core/src/main/resources/lib/hudson/project/config-scm.properties b/core/src/main/resources/lib/hudson/project/config-scm.properties index a1018d7a0008..9cc6366bbee7 100644 --- a/core/src/main/resources/lib/hudson/project/config-scm.properties +++ b/core/src/main/resources/lib/hudson/project/config-scm.properties @@ -1 +1 @@ -description=Connect and manage your code repository to automatically pull the latest code for your builds +description=Connect and manage your code repository to automatically pull the latest code for your builds. diff --git a/core/src/main/resources/lib/hudson/project/config-trigger.properties b/core/src/main/resources/lib/hudson/project/config-trigger.properties index 1a90b0af2dce..dc25d12170ad 100644 --- a/core/src/main/resources/lib/hudson/project/config-trigger.properties +++ b/core/src/main/resources/lib/hudson/project/config-trigger.properties @@ -1 +1 @@ -description=Set up automated actions that start your build based on specific events, like code changes or scheduled times +description=Set up automated actions that start your build based on specific events, like code changes or scheduled times.