From 3379cb49800e4f6efbe593826c9ef65357b71830 Mon Sep 17 00:00:00 2001 From: Jeremias Peier Date: Wed, 28 Aug 2024 09:11:18 +0200 Subject: [PATCH 1/3] fix(step-list): fix border radius of step list elements --- src/elements/core/styles/mixins/lists.scss | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/elements/core/styles/mixins/lists.scss b/src/elements/core/styles/mixins/lists.scss index 324655e3ad..9ef0869aec 100644 --- a/src/elements/core/styles/mixins/lists.scss +++ b/src/elements/core/styles/mixins/lists.scss @@ -81,6 +81,7 @@ --sbb-step-list-padding-block: var(--sbb-spacing-fixed-3x); --sbb-step-list-padding-inline: var(--sbb-spacing-responsive-xxs); --sbb-step-list-marker-to-text-gap: var(--sbb-spacing-responsive-xxxs); + --sbb-step-list-border-radius: var(--sbb-border-radius-4x); // Additional space from overall li padding to the text because text // has to be centered to marker number. @@ -117,7 +118,6 @@ position: relative; counter-increment: steps; background-color: var(--sbb-color-milk); - border-radius: var(--sbb-border-radius-4x); padding-block: calc( var(--sbb-step-list-padding-block) + var(--sbb-step-list-text-to-marker-block-offset) ) @@ -131,6 +131,16 @@ var(--sbb-step-list-marker-dimensions) + 2 * var(--sbb-step-list-padding-block) ); + &:first-of-type { + border-start-start-radius: var(--sbb-step-list-border-radius); + border-start-end-radius: var(--sbb-step-list-border-radius); + } + + &:last-of-type { + border-end-start-radius: var(--sbb-step-list-border-radius); + border-end-end-radius: var(--sbb-step-list-border-radius); + } + &::before { @include typo.text-xxs--bold; From bf55fae37e2d8a9c75d62cb35e2744d76eb740d7 Mon Sep 17 00:00:00 2001 From: Jeremias Peier Date: Wed, 28 Aug 2024 12:51:37 +0200 Subject: [PATCH 2/3] fix: missing icons --- tools/web-test-runner/preload-icons.ts | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tools/web-test-runner/preload-icons.ts b/tools/web-test-runner/preload-icons.ts index b5c349810c..3a69a00d81 100644 --- a/tools/web-test-runner/preload-icons.ts +++ b/tools/web-test-runner/preload-icons.ts @@ -28,9 +28,9 @@ const preloadIconList = [ 'chevron-small-right-small', 'chevron-small-up-small', 'circle-cross-small', - 'circle-dotted-small', 'circle-dotted-part-small', 'circle-dotted-part-x-small', + 'circle-dotted-small', 'circle-exclamation-point-small', 'circle-information-large', 'circle-information-medium', @@ -46,6 +46,7 @@ const preloadIconList = [ 'container-small', 'context-menu-small', 'cross-small', + 'dash-small', 'delay', 'diamond-small', 'disruption', @@ -61,7 +62,9 @@ const preloadIconList = [ 'hamburger-menu-small', 'heart-medium', 'house-small', + 'ic-35', 'info', + 'ir-27', 'ir-35', 'ir-37', 'link-small', @@ -88,7 +91,10 @@ const preloadIconList = [ 'sa-r', 'sa-rr', 'sa-rs', + 'sa-tg', + 'sa-vr', 'sa-wr', + 'sa-z', 'shopping-cart-small', 'swisspass-medium', 'swisspass-small', @@ -101,22 +107,24 @@ const preloadIconList = [ 'travel-backpack-medium', 'user-small', 'utilization-high', - 'utilization-low', - 'utilization-medium', - 'utilization-none', 'utilization-high-high-contrast', - 'utilization-low-high-contrast', - 'utilization-medium-high-contrast', - 'utilization-none-high-contrast', 'utilization-high-negative', + 'utilization-low', + 'utilization-low-high-contrast', 'utilization-low-negative', + 'utilization-medium', + 'utilization-medium-high-contrast', 'utilization-medium-negative', + 'utilization-none', + 'utilization-none-high-contrast', 'utilization-none-negative', 'walk-fast-small', 'walk-slow-small', 'walk-small', 'picto:bus-right', + 'picto:jetty-right', 'picto:train-right', + 'picto:tram-right', ]; export interface PreloadedIcon { From c1a497f1035363fc9fa5174b1b69e41a006f13e6 Mon Sep 17 00:00:00 2001 From: Jeremias Peier Date: Thu, 29 Aug 2024 08:58:27 +0200 Subject: [PATCH 3/3] test: set down diff threshold --- src/elements/clock/clock.scss | 3 ++- tools/web-test-runner/visual-regression-plugin-config.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/elements/clock/clock.scss b/src/elements/clock/clock.scss index 57aff80d3e..beb04093dc 100644 --- a/src/elements/clock/clock.scss +++ b/src/elements/clock/clock.scss @@ -36,7 +36,8 @@ } .sbb-clock__hand-minutes { - transition: transform 0.2s cubic-bezier(0.4, 2.08, 0.55, 0.44); + transition: transform var(--sbb-disable-animation-zero-time, 0.2s) + cubic-bezier(0.4, 2.08, 0.55, 0.44); @supports not (aspect-ratio: 1 / 1) { transform-origin: 50% 49.625%; diff --git a/tools/web-test-runner/visual-regression-plugin-config.ts b/tools/web-test-runner/visual-regression-plugin-config.ts index 63c3c16794..840d624ff4 100644 --- a/tools/web-test-runner/visual-regression-plugin-config.ts +++ b/tools/web-test-runner/visual-regression-plugin-config.ts @@ -39,6 +39,7 @@ writeFileSync(new URL(`./${metaFileName}`, screenshotsDir), JSON.stringify(meta) export const visualRegressionConfig = { baseDir: 'dist/screenshots', + diffOptions: { threshold: 0.03 }, async getBaseline({ filePath, name }) { const baselineFileUrl = baselineUrl + name + extname(filePath); const infoFilePath = filePath + '.json';