From 1660ad4191264b7ca980c4114202719870815b60 Mon Sep 17 00:00:00 2001 From: ilhan orhan Date: Tue, 21 Nov 2023 11:13:25 +0200 Subject: [PATCH 1/3] chore: update chromedriver to 119 (#7883) --- packages/base/package.json | 2 +- packages/fiori/package.json | 2 +- packages/localization/package.json | 2 +- packages/main/package.json | 2 +- yarn.lock | 24 ++++++++++++------------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/base/package.json b/packages/base/package.json index 22787afb1dec..3553351160bb 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -38,7 +38,7 @@ "@buxlabs/amd-to-es6": "0.16.1", "@openui5/sap.ui.core": "1.116.0", "@ui5/webcomponents-tools": "1.20.0-rc.1", - "chromedriver": "118.0.1", + "chromedriver": "119.0.1", "clean-css": "^5.2.2", "copy-and-watch": "^0.1.5", "cross-env": "^7.0.3", diff --git a/packages/fiori/package.json b/packages/fiori/package.json index 850c0a852142..87d9188ee4be 100644 --- a/packages/fiori/package.json +++ b/packages/fiori/package.json @@ -49,6 +49,6 @@ }, "devDependencies": { "@ui5/webcomponents-tools": "1.20.0-rc.1", - "chromedriver": "118.0.1" + "chromedriver": "119.0.1" } } diff --git a/packages/localization/package.json b/packages/localization/package.json index 02b2ccadc5b8..ba1d544ae2b2 100644 --- a/packages/localization/package.json +++ b/packages/localization/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@openui5/sap.ui.core": "1.116.0", "@ui5/webcomponents-tools": "1.20.0-rc.1", - "chromedriver": "118.0.1", + "chromedriver": "119.0.1", "mkdirp": "^1.0.4", "resolve": "^1.20.0" }, diff --git a/packages/main/package.json b/packages/main/package.json index 6f85198b3870..bff024535475 100644 --- a/packages/main/package.json +++ b/packages/main/package.json @@ -50,6 +50,6 @@ }, "devDependencies": { "@ui5/webcomponents-tools": "1.20.0-rc.1", - "chromedriver": "118.0.1" + "chromedriver": "119.0.1" } } diff --git a/yarn.lock b/yarn.lock index c2f0c0350604..d9bf5b9c5617 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3189,7 +3189,7 @@ dependencies: defer-to-connect "^2.0.0" -"@testim/chrome-version@^1.1.3": +"@testim/chrome-version@^1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.1.4.tgz#86e04e677cd6c05fa230dd15ac223fa72d1d7090" integrity sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g== @@ -4593,7 +4593,7 @@ axe-core@4.2.3: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.2.3.tgz#2a3afc332f0031b42f602f4a3de03c211ca98f72" integrity sha512-pXnVMfJKSIWU2Ml4JHP7pZEPIrgBO1Fd3WGx+fPBsS+KRGhE4vxooD8XBGWbQOIVSZsVK7pUDBBkCicNu80yzQ== -axios@^1.0.0, axios@^1.4.0: +axios@^1.0.0, axios@^1.6.0: version "1.6.2" resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2" integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A== @@ -5242,18 +5242,18 @@ chrome-launcher@^0.15.0: is-wsl "^2.2.0" lighthouse-logger "^1.0.0" -chromedriver@118.0.1: - version "118.0.1" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-118.0.1.tgz#76bf821bb11dd85a45a7e3df7ee48e8d464677dd" - integrity sha512-GlGfyRE47IuSJnuadIiDy89EMDMQFBVWxUmiclLJKzQhFsiWAtcIr/mNOxjljZdsw9IwIOQEkrB9wympKYFPLw== +chromedriver@119.0.1: + version "119.0.1" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-119.0.1.tgz#064f3650790ccea055e9bfd95c600f5ea60295e9" + integrity sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg== dependencies: - "@testim/chrome-version" "^1.1.3" - axios "^1.4.0" - compare-versions "^6.0.0" + "@testim/chrome-version" "^1.1.4" + axios "^1.6.0" + compare-versions "^6.1.0" extract-zip "^2.0.1" https-proxy-agent "^5.0.1" proxy-from-env "^1.1.0" - tcp-port-used "^1.0.1" + tcp-port-used "^1.0.2" ci-info@^2.0.0: version "2.0.0" @@ -5490,7 +5490,7 @@ compare-func@^2.0.0: array-ify "^1.0.0" dot-prop "^5.1.0" -compare-versions@^6.0.0: +compare-versions@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-6.1.0.tgz#3f2131e3ae93577df111dba133e6db876ffe127a" integrity sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg== @@ -13659,7 +13659,7 @@ tar@^6.1.11, tar@^6.1.13, tar@^6.1.2: mkdirp "^1.0.3" yallist "^4.0.0" -tcp-port-used@^1.0.1: +tcp-port-used@^1.0.1, tcp-port-used@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-1.0.2.tgz#9652b7436eb1f4cfae111c79b558a25769f6faea" integrity sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA== From 007e755f301e6112bf98afef1b47676b422eb268 Mon Sep 17 00:00:00 2001 From: Stoyan <88034608+hinzzx@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:23:29 +0200 Subject: [PATCH 2/3] fix(ui5-switch): align 'off' text in RTL, add compact mode params (#7603) In RTL mode the 'off' icon of `Graphical` type Switch was misaligned due to missing parameters for RTL scenario of the control. Fixes: #7522 Fixes: #7806 --- packages/main/src/themes/Switch.css | 38 ++++++------------- .../sap_horizon_hcb/Switch-parameters.css | 26 +++++++++++++ 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/packages/main/src/themes/Switch.css b/packages/main/src/themes/Switch.css index 08ab32472658..da75c2a226f4 100644 --- a/packages/main/src/themes/Switch.css +++ b/packages/main/src/themes/Switch.css @@ -114,7 +114,7 @@ .ui5-switch-handle, .ui5-switch-text { - left: var(--_ui5_switch_handle_left); + inset-inline-start: var(--_ui5_switch_handle_left); top: 50%; transform: translateY(-50%); } @@ -123,8 +123,8 @@ .ui5-switch-desktop.ui5-switch-root:focus::after { content: ""; position: absolute; - left: var(--_ui5_switch_root_outline_left); - right: var(--_ui5_switch_root_outline_right); + inset-inline-start: var(--_ui5_switch_root_outline_left); + inset-inline-end: var(--_ui5_switch_root_outline_right); top: var(--_ui5_switch_root_outline_top); bottom: var(--_ui5_switch_root_outline_bottom); border: var(--_ui5_switch_focus_outline); @@ -137,11 +137,12 @@ /* switch hidden input */ .ui5-switch-root .ui5-switch-input { position: absolute; - left: 0; + inset-inline-start: 0; width: 0; height: 0; margin: 0; visibility: hidden; + appearance: none; -webkit-appearance: none; } @@ -160,12 +161,12 @@ .ui5-switch-root.ui5-switch--checked.ui5-switch--semantic .ui5-switch-text--on, .ui5-switch-root.ui5-switch--checked.ui5-switch-desktop.ui5-switch--no-label .ui5-switch-text--on { - left: var(--_ui5_switch_text_active_left); + inset-inline-start: var(--_ui5_switch_text_active_left); } .ui5-switch-root:not(.ui5-switch--checked).ui5-switch--semantic .ui5-switch-text--off, .ui5-switch-root:not(.ui5-switch--checked).ui5-switch-desktop.ui5-switch--no-label .ui5-switch-text--off { - left: var(--_ui5_switch_text_inactive_left); - right: var(--_ui5_switch_text_inactive_right); + inset-inline-start: var(--_ui5_switch_text_inactive_left); + inset-inline-end: var(--_ui5_switch_text_inactive_right); } /* handle */ @@ -337,14 +338,14 @@ color: var(--_ui5_switch_text_active_color); overflow: var(--_ui5_switch_text_overflow); text-overflow: ellipsis; - left: var(--_ui5_switch_text_active_left_alternate); + inset-inline-start: var(--_ui5_switch_text_active_left_alternate); } .ui5-switch-root .ui5-switch-text--off { color: var(--_ui5_switch_text_inactive_color); overflow: var(--_ui5_switch_text_overflow); text-overflow: ellipsis; - left: var(--_ui5_switch_text_inactive_left_alternate); - right: var(--_ui5_switch_text_inactive_right_alternate); + inset-inline-start: var(--_ui5_switch_text_inactive_left_alternate); + inset-inline-end: var(--_ui5_switch_text_inactive_right_alternate); } .ui5-switch-root .ui5-switch-no-label-icon-on, @@ -364,19 +365,4 @@ [dir="rtl"].ui5-switch-root.ui5-switch--checked .ui5-switch-slider { transform: var(--_ui5_switch_rtl_transform); -} - -[dir="rtl"].ui5-switch-root .ui5-switch-handle { - left: auto; - right: var(--_ui5_switch_handle_left); -} - -[dir="rtl"].ui5-switch-root .ui5-switch-text--on { - right: var(--_ui5_switch_text_active_left); - left: var(--_ui5_switch_text_active_right); -} - -[dir="rtl"].ui5-switch-root .ui5-switch-text--off { - right: var(--_ui5_switch_text_inactive_left); - left: var(--_ui5_switch_text_inactive_right); -} +} \ No newline at end of file diff --git a/packages/main/src/themes/sap_horizon_hcb/Switch-parameters.css b/packages/main/src/themes/sap_horizon_hcb/Switch-parameters.css index 65ec9d460d15..7ad853e1fd2c 100644 --- a/packages/main/src/themes/sap_horizon_hcb/Switch-parameters.css +++ b/packages/main/src/themes/sap_horizon_hcb/Switch-parameters.css @@ -143,4 +143,30 @@ --_ui5_switch_icon_width: 1rem; --_ui5_switch_icon_height: 1rem; +} + +[data-ui5-compact-size], +.ui5-content-density-compact, +.sapUiSizeCompact { + --_ui5_switch_width: 3rem; + --_ui5_switch_min_width: none; + --_ui5_switch_with_label_width: 3.75rem; + --_ui5_switch_root_outline_top: 0.25rem; + --_ui5_switch_root_outline_bottom: 0.25rem; + --_ui5_switch_transform: translateX(100%) translateX(-1.375rem); + --_ui5_switch_transform_with_label: translateX(100%) translateX(-1.875rem); + --_ui5_switch_rtl_transform: translateX(1.375rem) translateX(-100%); + --_ui5_switch_rtl_transform_with_label: translateX(1.875rem) translateX(-100%); + --_ui5_switch_track_width: 2rem; + --_ui5_switch_track_height: 1.25rem; + --_ui5_switch_track_with_label_width: 2.75rem; + --_ui5_switch_track_with_label_height: 1.25rem; + --_ui5_switch_handle_width: 1.25rem; + --_ui5_switch_handle_height: 1rem; + --_ui5_switch_handle_with_label_width: 1.75rem; + --_ui5_switch_handle_with_label_height: 1rem; + --_ui5_switch_text_font_size: var(--sapFontSize); + --_ui5_switch_text_width: 1rem; + --_ui5_switch_text_active_left: 0.1875rem; + --_ui5_switch_text_active_left_alternate: 0.0625rem; } \ No newline at end of file From 87535f1ba30b85d3c1c718451a89f0121e441338 Mon Sep 17 00:00:00 2001 From: Nayden Naydenov <31909318+nnaydenow@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:38:13 +0200 Subject: [PATCH 3/3] fix(framework): redundant fonts loading (#7868) fix(framework): font loading Co-authored-by: Nayden Naydenov --- packages/base/src/ManagedStyles.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/base/src/ManagedStyles.ts b/packages/base/src/ManagedStyles.ts index 37312ea007d2..299470ba2a80 100644 --- a/packages/base/src/ManagedStyles.ts +++ b/packages/base/src/ManagedStyles.ts @@ -105,16 +105,18 @@ const updateStyle = (data: StyleData, name: string, value = "", theme?: string) } }; -const hasStyle = (name: string, value = "") => { +const hasStyle = (name: string, value = ""): boolean => { if (shouldUseLinks()) { return !!document.querySelector(`head>link[${name}="${value}"]`); } + const styleElement = document.querySelector(`head>style[${name}="${value}"]`); + if (document.adoptedStyleSheets && !isSafari()) { - return !!document.adoptedStyleSheets.find(sh => (sh as Record)._ui5StyleId === getStyleId(name, value)); + return !!styleElement || !!document.adoptedStyleSheets.find(sh => (sh as Record)._ui5StyleId === getStyleId(name, value)); } - return !!document.querySelector(`head>style[${name}="${value}"]`); + return !!styleElement; }; const removeStyle = (name: string, value = "") => {