From 31115fd55d69cd6b2fa66f56bf6f77e09ae89d79 Mon Sep 17 00:00:00 2001 From: Oliver Kurz Date: Tue, 3 Mar 2026 22:07:30 +0100 Subject: [PATCH 01/10] refactor: modernize openQA theme variables for Bootstrap 5 Refactor openqa_theme.scss to use native Bootstrap 5 maps and variables. This ensures better compatibility with Bootstrap 5 native color modes and modern CSS practices while maintaining backward compatibility for existing SCSS files through variable aliasing. --- assets/stylesheets/openqa_theme.scss | 66 +++++++++++++++++++++------- 1 file changed, 50 insertions(+), 16 deletions(-) diff --git a/assets/stylesheets/openqa_theme.scss b/assets/stylesheets/openqa_theme.scss index 72e9414d305..fa08d89d4b9 100644 --- a/assets/stylesheets/openqa_theme.scss +++ b/assets/stylesheets/openqa_theme.scss @@ -1,3 +1,4 @@ +// Grid breakpoints (kept original to avoid breaking tests relying on specific window sizes) $grid-breakpoints: ( xs: 0, sm: 500px, @@ -5,18 +6,49 @@ $grid-breakpoints: ( lg: 700px, xl: 1000px ); + +// Fonts $web-font-path: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700' !default; -$default-font: 'Roboto', 'Helvetica Neue', helvetica, arial, sans-serif; -$icon-font-path: '/fonts/'; -$default-font-color: #666; -$default-bg-color: #fff; +$font-family-sans-serif: + 'Roboto', + system-ui, + -apple-system, + 'Segoe UI', + 'Helvetica Neue', + Arial, + sans-serif; $font-size-base: 0.85rem; + +// Colors +$primary: #446e9b; +$secondary: #6c757d; +$success: #28a745; +$info: #17a2b8; +$warning: #ffc107; +$danger: #dc3545; +$light: #f8f9fa; +$dark: #343a40; + +$body-color: #444; +$body-bg: #fff; + +// Legacy variables for backward compatibility +$default-font: $font-family-sans-serif; +$default-font-color: $body-color; +$default-bg-color: $body-bg; +$link-color: $primary; +$link-hover-color: darken($link-color, 15%) !default; +$table-border-color: #dee2e6; + +// Headings and font sizes $h2-font-size: 1.65rem; $h3-font-size: 1.25rem; $h4-font-size: 1.15rem; $progress-font-size: 0.78rem; + +// Buttons legacy $btn-border-radius-base: 0.25rem; -$btn-default-color: #000; +$btn-default-color: #000000; $btn-default-bg: #fefefe; $btn-primary-bg: #007bff; $btn-secondary-bg: #6c757d; @@ -26,22 +58,21 @@ $btn-warning-bg: #ffc107; $btn-danger-bg: #dc3545; $btn-light-bg: #f8f9fa; $btn-dark-bg: #343a40; -$table-border-color: #ddd; -$link-color: #446e9b; -$link-hover-color: darken($link-color, 15%) !default; + +// openQA specific colors $color-softfailed: #eeb560; $color-ok: #cdffb9; -$color-warning: #ff9; +$color-warning: #ffff99; $color-failed: #ff4e46; $color-result-failed: #ff9e9b; $color-incomplete: #af1e11; $color-result: #3c3c3c; -$color-result-missing: #ddd; -$color-result-testing: #9df; +$color-result-missing: #dddddd; +$color-result-testing: #99ddff; $color-module-softfailed: #ffd048; $color-module-passed: #59df24; -$color-module-none: #aaa; -$color-module-skipped: #aaa; +$color-module-none: #aaaaaa; +$color-module-skipped: #aaaaaa; $color-resborder-ok: $color-module-passed; $color-resborder-fail: $color-failed; $color-resborder-unk: $color-module-none; @@ -54,14 +85,17 @@ $color-state-scheduled: #67a2b7; $color-state-blocked: #9167b7; $color-state-cancelled: $color-module-none; $color-state-running: #8bdfff; -$color-step-actions: #666; +$color-step-actions: #666666; + +// Dark mode legacy $default-font-color-dark: #ccc; $default-bg-color-dark: #000; $link-color-dark: #7fbbf7; -$link-hover-color-dark: darken($link-color, 15%) !default; $color-result-dark: #c3c3c3; $table-border-color-dark: darken($color-result-dark, 50%); -$btn-default-color-dark: #fff; + +// Buttons dark legacy +$btn-default-color-dark: #ffffff; $btn-default-bg-dark: #010101; $btn-primary-bg-dark: #007bff; $btn-secondary-bg-dark: #6c757d; From db2f79e6cd145a8824503ab913ce300523ed349b Mon Sep 17 00:00:00 2001 From: Oliver Kurz Date: Tue, 3 Mar 2026 22:07:33 +0100 Subject: [PATCH 02/10] feat: modernize global layout and component styles Update overall.scss to leverage Bootstrap 5 CSS variables for cards, tabs, and headings. This improves dark mode consistency and introduces a more contemporary look with subtle shadows and improved spacing. Includes a fix for body margin to prevent the footer from overlapping interactive elements in UI tests. --- assets/stylesheets/overall.scss | 249 ++++++++++++++------------------ 1 file changed, 107 insertions(+), 142 deletions(-) diff --git a/assets/stylesheets/overall.scss b/assets/stylesheets/overall.scss index 66ca48bae92..bd2b2d254d3 100644 --- a/assets/stylesheets/overall.scss +++ b/assets/stylesheets/overall.scss @@ -24,36 +24,27 @@ body { // don't underline links except on focus/hover a { text-decoration: none; + transition: color 0.2s ease-in-out; } -a:focus, a:hover { +a:focus, +a:hover { text-decoration: underline; } - // don't underline links at all on certain places -.nav-link { - &:focus, &:hover { - text-decoration: none; - } -} -.dropdown-item { - &:focus, &:hover { - text-decoration: none; - } -} -.page-link { - &:focus, &:hover { - text-decoration: none; - } -} +.nav-link, +.dropdown-item, +.page-link, .btn { - &:focus, &:hover { + &:focus, + &:hover { text-decoration: none; } } + @include media-breakpoint-up(md) { #content { - padding-left: 40px; - padding-right: 40px; + padding-left: 2.5rem; + padding-right: 2.5rem; } } @@ -61,7 +52,8 @@ a:focus, a:hover { .btn i[class*="fa-"] + span { padding-left: 8px; } -.btn-group-sm .btn.help_popover, .btn-sm.help_popover { +.btn-group-sm .btn.help_popover, +.btn-sm.help_popover { padding-top: 6px; } @@ -70,8 +62,8 @@ a:focus, a:hover { position: absolute; bottom: 0; width: 100%; - padding-bottom: 10px; - background-color: #f5f5f5; + padding: 0.5rem 0; + background-color: var(--bs-tertiary-bg); } [data-bs-theme='dark'] .footer { background-color: $default-bg-color-dark; @@ -80,9 +72,11 @@ a:focus, a:hover { &.left { float: left; } + &.right { float: right; } + a { display: inline; margin-left: 15px; @@ -91,15 +85,12 @@ a:focus, a:hover { } body { // add some space between last elements and footer - margin-bottom: 45px; + margin-bottom: 5rem; } // paragraphs, links, misc p { - margin: 0 0 1em; -} -a { - @include transition(all 0.2s); + margin-bottom: 1rem; } [data-bs-theme='dark'] a:not(.btn) { color: $link-color-dark; @@ -110,130 +101,123 @@ a { } // headings -h1, .h1, h2, .h2 { - margin-top: 18px; - margin-bottom: 9px; +h1, +.h1, +h2, +.h2 { + margin-top: 1.25rem; + margin-bottom: 0.75rem; } -h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { + +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { font-family: inherit; - font-weight: 400; - line-height: 1.1; + font-weight: 500; + line-height: 1.2; color: #444; } [data-bs-theme='dark'] { - h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { + h1, + h2, + h3, + h4, + h5, + h6, + .h1, + .h2, + .h3, + .h4, + .h5, + .h6 { color: #bbb; } } // cards (former panels) .card { - margin-bottom: 15px; + margin-bottom: 1rem; + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); } [data-bs-theme='dark'] .card { background-color: $default-bg-color-dark; border: $table-border-color-dark solid 0.5px; + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5); } - -// colorful card headers (Bootstrap 4 only has colorful borders or fully colored cards) -.card.border-danger { - border-color: #eed3d7; - .card-header { - color: #b94a48; - background-color: #f2dede; - } -} -[data-bs-theme='dark'] { - .card.border-danger .card-header { - color: #cf4644; - background-color: #450202; - } -} -.card.border-success { - border-color: #d6e9c6; - .card-header { - color: #468847; - background-color: #dff0d8; - } -} -[data-bs-theme='dark'] { - .card.border-success .card-header { - color: #74f476; - background-color: #144500; - } -} -.card.border-warning { - border-color: #fbeed5; - .card-header { - color: #c09853; - background-color: #fcf8e3; - } +// colorful card headers +.card.border-danger .card-header { + color: var(--bs-danger-text-emphasis); + background-color: var(--bs-danger-bg-subtle); } -[data-bs-theme='dark'] { - .card.border-warning .card-header { - color: #fdca71; - background-color: #1d1800; - } +.card.border-success .card-header { + color: var(--bs-success-text-emphasis); + background-color: var(--bs-success-bg-subtle); } -.card.border-info { - border-color: #bce8f1; - .card-header { - color: #3a87ad; - background-color: #d9edf7; - } +.card.border-warning .card-header { + color: var(--bs-warning-text-emphasis); + background-color: var(--bs-warning-bg-subtle); } -[data-bs-theme='dark'] { - .card.border-info .card-header { - color: #64cafd; - background-color: #000; - } +.card.border-info .card-header { + color: var(--bs-info-text-emphasis); + background-color: var(--bs-info-bg-subtle); } // big welcome box ("jumbtron") .jumbotron { - padding-top: 30px; - padding-bottom: 30px; - margin-bottom: 30px; - color: inherit; - background-color: #f9f9f9; + padding: 3rem 1rem; + margin-bottom: 2rem; + background-color: var(--bs-tertiary-bg); + border-radius: 0.5rem; } [data-bs-theme='dark'] .jumbotron { - background-color: #111; -} -.jumbotron p { - margin-bottom: 15px; - font-size: 20px; - font-weight: 200; + background-color: #111111; } // tabs .tab-content { - padding-top: 15px; + padding-top: 1rem; } .nav-tabs .nav-link { border: none; + border-bottom: 2px solid transparent; color: $default-font-color; - &:hover, &:focus, &.active { - border: none; - box-shadow: inset 0 -2px 0 #446e9b; - color: #446e9b; + + &:hover, + &:focus { + border-bottom-color: var(--bs-secondary-border-subtle); + } + + &.active { + border-bottom-color: $link-color; + color: $link-color; + background: transparent; } } [data-bs-theme='dark'] { .nav-tabs .nav-link { color: $default-font-color-dark; - &:hover, &:focus, &.active { - box-shadow: inset 0 -2px 0 #6caef5; - color: #6caef5; - background-color: $default-bg-color-dark; + + &.active { + border-bottom-color: $link-color-dark; + color: $link-color-dark; } } } // popover .help_popover { - margin: 0 5px; - &:focus, &:hover { + margin: 0 0.3rem; + &:focus, + &:hover { outline: none; text-decoration: none; } @@ -247,16 +231,13 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { // tooltips .tooltip .tooltip-inner { - max-width: 400px; + max-width: 25rem; + text-align: left; p { - margin-bottom: 2px; + margin-bottom: 0.125rem; } ul { - padding-left: 1.2rem; - } - p, ul { - text-align: left; - word-break: break-word; + padding-left: 1.25rem; } } @@ -267,51 +248,35 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { // Icon for copying job ID .copy-jobid { - margin-right: 5px; + margin-right: 0.3rem; } + [data-bs-theme='dark'] { .table { color: $default-font-color-dark; background-color: $default-bg-color-dark; } - - // All tests pagination - .page-link, .page-item.disabled .page-link { + .page-link, + .page-item.disabled .page-link { background-color: $default-bg-color-dark; color: $default-font-color-dark; - border: rgba(255, 255, 255, 30 / 100) solid 0.5px; + border: rgba(255, 255, 255, 0.3) solid 0.5px; } - - // All tests search field - .chosen-container .chosen-drop, .chosen-container .chosen-results li, .chosen-container ul.chosen-choices { + .chosen-container .chosen-drop, + .chosen-container .chosen-results li, + .chosen-container ul.chosen-choices { background-color: $default-bg-color-dark; background-image: none; color: $default-font-color-dark; } - - // All tests table rows .table td { - border-top-color: rgba(255, 255, 255, 3 / 100); - } - .modal.show { - background-color: lighten($default-bg-color-dark, 25%); + border-top-color: rgba(255, 255, 255, 0.03); } .modal-content { background-color: $default-bg-color-dark; } - .modal-header, .modal-footer { - border-top: none; - border-bottom: none; - } - .container-fluid .btn-light:hover, .container-fluid .btn-light:active:hover { - background-color: #101010; - color: #cbc5bf; - } - .container-fluid .btn-light:active { - background-color: #101010; - background-image: radial-gradient(circle, lighten(#101010, 25%) 10%, #363636 11%); - } - input, textarea { + input, + textarea { background-color: $default-bg-color-dark; color: $default-font-color-dark; border: $table-border-color-dark solid 0.5px; From 598f6f309034fb4084fc350a6d5dacc2b7a6e8d8 Mon Sep 17 00:00:00 2001 From: Oliver Kurz Date: Tue, 3 Mar 2026 22:07:36 +0100 Subject: [PATCH 03/10] feat: overhaul navbar and navigation menus for modern look Refresh the navigation bar and dropdown menus using modern BS5 patterns. Introduces border-radius for links and improved dropdown shadows. Retains specific vertical padding at larger breakpoints to maintain compatibility with Selenium tests that expect exact element positioning. --- assets/stylesheets/navigation.scss | 104 ++++++++++++++++------------- 1 file changed, 59 insertions(+), 45 deletions(-) diff --git a/assets/stylesheets/navigation.scss b/assets/stylesheets/navigation.scss index 75566c6bc4c..dd1b1191eb7 100644 --- a/assets/stylesheets/navigation.scss +++ b/assets/stylesheets/navigation.scss @@ -1,76 +1,90 @@ // navbar and dropdown menus .navbar { - border: none; - box-shadow: 0 1px 2px rgba(0, 0, 0, 30 / 100); - padding-top: 0; - padding-bottom: 0; - margin-bottom: 30px; + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + margin-bottom: 2rem; + background-color: var(--bs-body-bg); + &-brand { - height: 64px; - margin: 0; - padding-top: 0; - padding-bottom: 0; + display: flex; + align-items: center; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + & > img { - height: 100%; - padding: 8px; - padding-top: 0; + height: 2.5rem; width: auto; } } - .dropdown-menu { - margin-top: 0; - } + .nav-search-item { margin: auto; - margin-right: 0.5em; + margin-right: 0.5rem; } } + [data-bs-theme='dark'] .navbar { - box-shadow: 0 1px 2px rgba(255, 255, 255, 30 / 100); + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5); } + .navbar-nav { + .nav-link { + padding: 0.5rem 1rem; + border-radius: 0.375rem; + transition: background-color 0.15s ease-in-out; + + &:hover, + &:focus { + background-color: var(--bs-tertiary-bg); + } + + &.active { + font-weight: 500; + color: var(--bs-primary) !important; + } + } + @include media-breakpoint-up(lg) { .nav-link { - // hack to let the navbar items take all vertical space like in Bootstrap 3 padding-top: 22px; padding-bottom: 23px; } - .nav-link:hover, .nav-link:focus { - color: #16181b; - text-decoration: none; - background-color: $default-bg-color; - } } } + [data-bs-theme='dark'] .navbar-light .navbar-nav { @include media-breakpoint-up(lg) { - a.nav-link { - color: $default-font-color-dark; - } - .nav-link:hover, .nav-link:focus { - color: $default-font-color-dark; + a.nav-link:hover, + .nav-link:focus { background-color: lighten($default-bg-color-dark, 25%); } } } + .dropdown-menu { - font-size: inherit; - margin-top: 0; - border: none; - border-radius: 0; - box-shadow: 0 1px 2px rgba(0, 0, 0, 50 / 100); -} -[data-bs-theme='dark'] { - .dropdown-menu, .candidates-selection .dropdown-menu { - background-color: $default-bg-color-dark; - color: $default-font-color-dark; - a, h3, td, tr { - color: $default-font-color-dark; - background-color: $default-bg-color-dark; - } - a:hover, a:focus, h3:hover, h3:focus { - color: $default-font-color-dark; - background-color: lighten($default-bg-color-dark, 25%); + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); + border: 1px solid var(--bs-border-color-translucent); + border-radius: 0.5rem; + padding: 0.5rem; + + .dropdown-item { + border-radius: 0.375rem; + padding: 0.375rem 1rem; + + &:hover, + &:focus { + background-color: var(--bs-tertiary-bg); } } + + .dropdown-header { + font-weight: 600; + font-size: 0.75rem; + text-transform: uppercase; + letter-spacing: 0.025em; + padding: 0.5rem 1rem; + } +} + +[data-bs-theme='dark'] .dropdown-menu { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5); } From 2592d8d0fd7fa08a712a20316a948aba4981a765 Mon Sep 17 00:00:00 2001 From: Oliver Kurz Date: Tue, 3 Mar 2026 22:07:39 +0100 Subject: [PATCH 04/10] feat: modernize main dashboard layout Replace legacy Bootstrap classes (.jumbotron, .hidden-sm-down) with modern utility equivalents. The .jumbotron class is preserved as a secondary class to maintain compatibility with existing JavaScript and UI tests. --- templates/webapi/main/index.html.ep | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/webapi/main/index.html.ep b/templates/webapi/main/index.html.ep index ed16322ed6f..961fd437bcd 100644 --- a/templates/webapi/main/index.html.ep +++ b/templates/webapi/main/index.html.ep @@ -7,13 +7,13 @@ setupIndexPage(); % end -
-
+
+
%= include_branding 'docbox'
-
+
%= include_branding 'sponsorbox'
@@ -28,7 +28,7 @@
-
+
Filter and settings no filter present, click to toggle filter form
From f877256067f623bba550fd387092dff41da77dde Mon Sep 17 00:00:00 2001 From: Oliver Kurz Date: Tue, 3 Mar 2026 22:07:42 +0100 Subject: [PATCH 05/10] refactor: remove legacy card classes from live view Replace .card-outline-secondary with BS5 native .border-secondary in the live view template. --- templates/webapi/test/live.html.ep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/webapi/test/live.html.ep b/templates/webapi/test/live.html.ep index 655d16ee110..dc038f0667f 100644 --- a/templates/webapi/test/live.html.ep +++ b/templates/webapi/test/live.html.ep @@ -1,4 +1,4 @@ -
Date: Tue, 3 Mar 2026 22:23:26 +0100 Subject: [PATCH 06/10] fix: improve navbar contrast and Job Groups visibility in dark mode - Remove deprecated .navbar-light from navbar template to allow BS5 color modes. - Define explicit navbar CSS variables for dark mode in overall.scss. - Ensure nav-links stay bright and visible when selected or hovered in dark mode. - Improve general link and primary color contrast for dark mode. --- assets/stylesheets/navigation.scss | 28 +++++++++++++++++-------- assets/stylesheets/overall.scss | 10 +++++++++ templates/webapi/layouts/navbar.html.ep | 2 +- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/assets/stylesheets/navigation.scss b/assets/stylesheets/navigation.scss index dd1b1191eb7..680c1d4091b 100644 --- a/assets/stylesheets/navigation.scss +++ b/assets/stylesheets/navigation.scss @@ -24,6 +24,25 @@ [data-bs-theme='dark'] .navbar { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5); + + .nav-link { + color: var(--bs-navbar-color); + &:hover, + &:focus, + &.show, + &.active { + color: var(--bs-navbar-active-color) !important; + } + } + + .navbar-nav { + @include media-breakpoint-up(lg) { + .nav-link:hover, + .nav-link:focus { + background-color: var(--bs-tertiary-bg); + } + } + } } .navbar-nav { @@ -51,15 +70,6 @@ } } -[data-bs-theme='dark'] .navbar-light .navbar-nav { - @include media-breakpoint-up(lg) { - a.nav-link:hover, - .nav-link:focus { - background-color: lighten($default-bg-color-dark, 25%); - } - } -} - .dropdown-menu { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); border: 1px solid var(--bs-border-color-translucent); diff --git a/assets/stylesheets/overall.scss b/assets/stylesheets/overall.scss index bd2b2d254d3..99a9708164c 100644 --- a/assets/stylesheets/overall.scss +++ b/assets/stylesheets/overall.scss @@ -252,6 +252,16 @@ h6, } [data-bs-theme='dark'] { + --bs-primary: #7fbbf7; + --bs-primary-rgb: 127, 187, 247; + --bs-link-color: #7fbbf7; + --bs-link-hover-color: #a5d0f9; + + --bs-navbar-color: var(--bs-body-color); + --bs-navbar-hover-color: var(--bs-primary); + --bs-navbar-active-color: var(--bs-primary); + --bs-navbar-brand-color: var(--bs-emphasis-color); + .table { color: $default-font-color-dark; background-color: $default-bg-color-dark; diff --git a/templates/webapi/layouts/navbar.html.ep b/templates/webapi/layouts/navbar.html.ep index a6daf12e230..b8ef2052826 100644 --- a/templates/webapi/layouts/navbar.html.ep +++ b/templates/webapi/layouts/navbar.html.ep @@ -1,5 +1,5 @@ % my $current_user = current_user; -