From e3ec2450417be96487119421af17073a4cec9e63 Mon Sep 17 00:00:00 2001 From: Andrey Medvedev Date: Fri, 22 Dec 2023 16:39:40 +0300 Subject: [PATCH] fix(ActionSheetItem): hover on desktop without border-radius (#6309) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Убираем border-radius у ActionSheetItem на desktop, потому что при hover-эффекте загруглений не должно быть видно. Проверяем hover-эффект в e2e тестах. --- .../ActionSheet/ActionSheet.e2e-playground.tsx | 8 +++++++- .../src/components/ActionSheet/ActionSheet.e2e.tsx | 10 ++++++++++ ...esktop-sizey-regular-vkcom-chromium-dark-1-snap.png | 4 ++-- ...sktop-sizey-regular-vkcom-chromium-light-1-snap.png | 4 ++-- ...desktop-sizey-regular-vkcom-firefox-dark-1-snap.png | 4 ++-- ...esktop-sizey-regular-vkcom-firefox-light-1-snap.png | 4 ++-- ...-desktop-sizey-regular-vkcom-webkit-dark-1-snap.png | 4 ++-- ...desktop-sizey-regular-vkcom-webkit-light-1-snap.png | 4 ++-- ...bile-sizey-regular-android-chromium-dark-1-snap.png | 4 ++-- ...ile-sizey-regular-android-chromium-light-1-snap.png | 4 ++-- ...dth-mobile-sizey-regular-ios-webkit-dark-1-snap.png | 4 ++-- ...th-mobile-sizey-regular-ios-webkit-light-1-snap.png | 4 ++-- .../ActionSheetItem/ActionSheetItem.module.css | 1 + 13 files changed, 38 insertions(+), 21 deletions(-) diff --git a/packages/vkui/src/components/ActionSheet/ActionSheet.e2e-playground.tsx b/packages/vkui/src/components/ActionSheet/ActionSheet.e2e-playground.tsx index c3cfb49771..1b7aa26135 100644 --- a/packages/vkui/src/components/ActionSheet/ActionSheet.e2e-playground.tsx +++ b/packages/vkui/src/components/ActionSheet/ActionSheet.e2e-playground.tsx @@ -73,7 +73,13 @@ const propSets = [ Восьмой элемент , - + Девятый элемент , ], diff --git a/packages/vkui/src/components/ActionSheet/ActionSheet.e2e.tsx b/packages/vkui/src/components/ActionSheet/ActionSheet.e2e.tsx index 415a260e2c..042306ddba 100644 --- a/packages/vkui/src/components/ActionSheet/ActionSheet.e2e.tsx +++ b/packages/vkui/src/components/ActionSheet/ActionSheet.e2e.tsx @@ -13,10 +13,15 @@ test.describe('ActionSheet', () => { }); test('ViewWidth.MOBILE sizeY=regular', async ({ mount, + page, expectScreenshotClippedToContent, componentPlaygroundProps, }) => { await mount(); + + const item = page.getByTestId('last-item-test-id'); + await item.hover(); + await expectScreenshotClippedToContent(); }); }); @@ -34,10 +39,15 @@ test.describe('ActionSheet', () => { }); test('ViewWidth.DESKTOP sizeY=regular', async ({ mount, + page, expectScreenshotClippedToContent, componentPlaygroundProps, }) => { await mount(); + + const item = page.getByTestId('last-item-test-id'); + await item.hover(); + await expectScreenshotClippedToContent(); }); }); diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-chromium-dark-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-chromium-dark-1-snap.png index 705f9ef828..59b9de260a 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-chromium-dark-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-chromium-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19ac587a966bc3ecc7201d1a3dddff757b65260e008f0168c070071d74f36481 -size 56411 +oid sha256:a82b465e0db4e2d1819177240530f06b3fa9bdc5f232de7854f9aead48e44be1 +size 56482 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-chromium-light-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-chromium-light-1-snap.png index 09202f9f64..a2ed19e49d 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-chromium-light-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-chromium-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f76054f2ba18373db97e5ad86beaae8132849c7c3923a60ca39e741794a6df72 -size 57361 +oid sha256:3af708b73009e04c104e73012fee04bb8181a62659531a61b96508743776e89c +size 57464 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-firefox-dark-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-firefox-dark-1-snap.png index 64621c39fe..f7ebc39b2e 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-firefox-dark-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-firefox-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3eb5770692624b82c197e608c981f72a78b68e08d0584b5b7a7c2b389d5330fa -size 84130 +oid sha256:8440050d0fee98fd1bb7cb1e93beb14976622514c88eab211fbf64e4c14dad04 +size 84387 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-firefox-light-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-firefox-light-1-snap.png index 020188ccb3..4c64ad63d5 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-firefox-light-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-firefox-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51814eb6e2efce53f12675dbd20b9523c001d44cc27595b84a311010bcd76ede -size 84427 +oid sha256:7716568ada0f527478176d07472793e66c3cc4ec1d1a9f42e8c8ec2dbc10ca35 +size 85272 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-webkit-dark-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-webkit-dark-1-snap.png index 277be59be1..a0df277e26 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-webkit-dark-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-webkit-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c8d601fc19266b387057d454e6ad54d8db7d7947ec4b3fbd72b2f93eda98929 -size 52043 +oid sha256:41777e22a7542e2c14dd82bf14da5746c069d89704101c793688a51d7411110c +size 52037 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-webkit-light-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-webkit-light-1-snap.png index 890cc78c8f..9651015269 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-webkit-light-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-desktop-sizey-regular-vkcom-webkit-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f14206abca9805e65d63e93000a192f1c204a6b2d5f5844f9b2dcaac96ba3cf -size 52824 +oid sha256:dd38b66b8585ec11e71d106789b6e2b07b188c73826cd784b716c1fcb4347f4a +size 52861 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-android-chromium-dark-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-android-chromium-dark-1-snap.png index 710d0bc8c6..a632625de9 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-android-chromium-dark-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-android-chromium-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0141fdc404617ac438ec7e1682c759b3c9abf5454e44aed23270f2c871ade09b -size 49088 +oid sha256:a10c6057f9647fd1d9f6019b9395cae5d5590adec60b4bec6d061caa5b0761e3 +size 48933 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-android-chromium-light-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-android-chromium-light-1-snap.png index 46ce7ff19f..59668689fe 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-android-chromium-light-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-android-chromium-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:225d57a4ff2a11e3a65a94b83562ea1e40578ecd68576b4aab51447a31201a3c -size 48729 +oid sha256:0e8136747dd5e960f84b7745515484564d06ed07021e8f7ea855a20e5a3e2328 +size 48765 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-ios-webkit-dark-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-ios-webkit-dark-1-snap.png index d20d2fda67..98f945642e 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-ios-webkit-dark-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-ios-webkit-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8aadf1dd9cc88aa6c61c16b67b82cde18765e3d062079d368342f8d6011a1cb6 -size 50112 +oid sha256:54d8576e46f4cbc84e6a6aeb23bea15f3076ffdb648e04842598a4d518031583 +size 50096 diff --git a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-ios-webkit-light-1-snap.png b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-ios-webkit-light-1-snap.png index fbc2ecad48..d3086ae864 100644 --- a/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-ios-webkit-light-1-snap.png +++ b/packages/vkui/src/components/ActionSheet/__image_snapshots__/actionsheet-viewwidth-mobile-sizey-regular-ios-webkit-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8885bc2d83f105565b64924f9f65ffc0c6286afb79103eda833ac6a399a3993f -size 50266 +oid sha256:c4ae755e036b1844b1a82e772e9c6affab7412504bfb9452f7a0e6f3be141d9b +size 50306 diff --git a/packages/vkui/src/components/ActionSheetItem/ActionSheetItem.module.css b/packages/vkui/src/components/ActionSheetItem/ActionSheetItem.module.css index cb60a3b6e8..7b8d0023fd 100644 --- a/packages/vkui/src/components/ActionSheetItem/ActionSheetItem.module.css +++ b/packages/vkui/src/components/ActionSheetItem/ActionSheetItem.module.css @@ -187,6 +187,7 @@ .ActionSheetItem--menu { inline-size: auto; cursor: pointer; + border-radius: 0; } /**