From c0f6fbe979cea4963a6702f7867e5af00cbf97fb Mon Sep 17 00:00:00 2001 From: Francis Labrie Date: Sun, 24 Sep 2023 10:40:28 -0400 Subject: [PATCH] [JENKINS-72018] Form entries in .repeated-chunk using .show-if-not-only CSS class are not hidden when they are alone (#8491) * - Add the missing definition for the .only CSS class inside of .repeated-chunk .show-if-not-only ones. Without these CSS classes, form entries using .show-if-not-only class are not hidden when alone. * Update war/src/main/scss/form/_reorderable-list.scss Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> * Update war/src/main/scss/form/_reorderable-list.scss Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> * Update war/src/main/scss/form/_reorderable-list.scss Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> --------- Co-authored-by: Francis Labrie Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> --- war/src/main/scss/form/_reorderable-list.scss | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/war/src/main/scss/form/_reorderable-list.scss b/war/src/main/scss/form/_reorderable-list.scss index 577f1853d4b9..c19152975d2e 100644 --- a/war/src/main/scss/form/_reorderable-list.scss +++ b/war/src/main/scss/form/_reorderable-list.scss @@ -29,6 +29,10 @@ visibility: visible; } +.repeated-chunk.first.last .show-if-not-only { + visibility: hidden; +} + /* == nested repeatable elements / 2 deep == */ .repeated-chunk .repeated-chunk .show-if-last { visibility: hidden; @@ -50,6 +54,10 @@ visibility: visible; } +.repeated-chunk .repeated-chunk.first.last .show-if-not-only { + visibility: hidden; +} + /* == nested repeatable elements / 3 deep == */ .repeated-chunk .repeated-chunk .repeated-chunk .show-if-last { visibility: hidden; @@ -67,10 +75,14 @@ visibility: hidden; } -.repeated-chunk .repeated-chunk .show-if-not-only { +.repeated-chunk .repeated-chunk .repeated-chunk .show-if-not-only { visibility: visible; } +.repeated-chunk .repeated-chunk .repeated-chunk.first.last .show-if-not-only { + visibility: hidden; +} + /*
s marked with to-be-removed is used in conjunction with repeatable.jelly and hetero-list.jelly and represents a master copy that gets pulled out from HTML, then inserted later upon demand multiple times