Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Fix banner close button hover state (#2204)

Olga Bulat81ba4c72560d
diff --git a/frontend/src/components/VBanner/VNotificationBanner.vue b/frontend/src/components/VBanner/VNotificationBanner.vue
index 998b5f1e1..4e5b2b5cd 100644
--- a/frontend/src/components/VBanner/VNotificationBanner.vue
+++ b/frontend/src/components/VBanner/VNotificationBanner.vue
@@ -1,6 +1,6 @@
<template>
<section
- class="flex flex-row items-center gap-2 rounded-sm p-2 lg:px-3 lg:py-4"
+ class="flex flex-row items-center gap-2 rounded-sm p-2 lg:p-3"
:class="classNames"
:data-testid="`banner-${id}`"
>
@@ -14,9 +14,8 @@
<slot name="end">
<VCloseButton
- class="flex-grow-0"
- variant="transparent-gray"
- size="tiny"
+ :variant="variant === 'dark' ? 'black' : 'transparent-gray'"
+ size="close"
icon-size="small"
:label="closeButtonLabel || $t('modal.close-banner')"
@close="$emit('close')"
diff --git a/frontend/src/components/VCloseButton.vue b/frontend/src/components/VCloseButton.vue
index 73f441470..12d149f0c 100644
--- a/frontend/src/components/VCloseButton.vue
+++ b/frontend/src/components/VCloseButton.vue
@@ -5,7 +5,7 @@
:borderless="true"
:size="size"
:class="{
- 'bg-black text-white ring-offset-black focus-slim-tx-yellow hover:border hover:border-white':
+ 'bg-tx text-white ring-offset-tx focus-slim-tx-yellow hover:bg-white hover:bg-opacity-10':
variant === 'black',
'!text-dark-charcoal-70 hover:!text-white':
variant === 'filled-white-light',
@@ -62,7 +62,7 @@ export default defineComponent({
* The size of the underlying VIconButton.
*/
size: {
- type: String as PropType<"tiny" | "small" | "medium" | "large">,
+ type: String as PropType<"close" | "small" | "medium" | "large">,
default: "medium",
},
/**
diff --git a/frontend/src/components/VIconButton/VIconButton.vue b/frontend/src/components/VIconButton/VIconButton.vue
index f07e81d67..31bd2b5b1 100644
--- a/frontend/src/components/VIconButton/VIconButton.vue
+++ b/frontend/src/components/VIconButton/VIconButton.vue
@@ -3,7 +3,7 @@
v-bind="buttonProps"
:aria-label="label"
size="disabled"
- class="icon-button flex flex-shrink-0 items-center justify-center"
+ class="icon-button flex flex-shrink-0 flex-grow-0 items-center justify-center"
:class="[buttonSizeClasses, { 'border-1.5': !borderless }]"
:type="type"
v-on="$listeners"
@@ -30,6 +30,7 @@ import type { TranslateResult } from "vue-i18n"
const SIZE_MAP = Object.freeze({
tiny: { icon: 6, button: "w-6 h-6" },
+ close: { icon: 6, button: "w-8 h-8" },
small: { icon: 6, button: "w-10 h-10" },
medium: { icon: 6, button: "w-12 h-12" },
large: { icon: 8, button: "w-14 h-14" },
diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-2xl-linux.png
index 53245ffbe..541a6eaa2 100644
Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-2xl-linux.png differ
diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-lg-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-lg-linux.png
index c26cdbd6f..dcb0a8eb6 100644
Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-lg-linux.png differ
diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-md-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-md-linux.png
index 7484ff1d7..7035c5ba0 100644
Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-md-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-md-linux.png differ
diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-sm-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-sm-linux.png
index e42f74c10..8654e6368 100644
Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-sm-linux.png differ
diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xl-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xl-linux.png
index 04746c8e6..ccf1123da 100644
Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xl-linux.png differ
diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xs-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xs-linux.png
index 2986ef5a9..22592991b 100644
Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xs-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-dark-sm-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-dark-sm-linux.png
index bac5ad1a9..fe8a189ef 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-dark-sm-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-dark-sm-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-dark-xl-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-dark-xl-linux.png
index 807fef4c5..790d8ca2f 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-dark-xl-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-dark-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-regular-xl-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-regular-xl-linux.png
index 452d4737d..e333109b3 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-regular-xl-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-error-regular-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-dark-sm-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-dark-sm-linux.png
index b80de02b1..a0d54e58e 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-dark-sm-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-dark-sm-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-dark-xl-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-dark-xl-linux.png
index 54f08917e..2bf377543 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-dark-xl-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-dark-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-regular-xl-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-regular-xl-linux.png
index 839d60a9e..e8d65133f 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-regular-xl-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-info-regular-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-dark-sm-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-dark-sm-linux.png
index 10060cd42..fa070559e 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-dark-sm-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-dark-sm-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-dark-xl-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-dark-xl-linux.png
index 9b0a2cba7..86d7dfe97 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-dark-xl-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-dark-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-regular-xl-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-regular-xl-linux.png
index 5262973d8..7cccdd4ec 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-regular-xl-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-success-regular-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-dark-sm-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-dark-sm-linux.png
index 1e1f5fbbf..b45624f41 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-dark-sm-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-dark-sm-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-dark-xl-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-dark-xl-linux.png
index f2c0d0815..8764aba09 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-dark-xl-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-dark-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-regular-xl-linux.png b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-regular-xl-linux.png
index a73a32731..afb3cda18 100644
Binary files a/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-regular-xl-linux.png and b/frontend/test/storybook/visual-regression/v-notitication-banner.spec.ts-snapshots/notificationbanner-warning-regular-xl-linux.png differ