Skip to content

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

Update desktop searchbar colors (#1880)

Olga Bulat940b686b387e
diff --git a/src/components/VContentSwitcherOld/VSearchTypeButtonOld.vue b/src/components/VContentSwitcherOld/VSearchTypeButtonOld.vue
index 09f520bfd..58151a44d 100644
--- a/src/components/VContentSwitcherOld/VSearchTypeButtonOld.vue
+++ b/src/components/VContentSwitcherOld/VSearchTypeButtonOld.vue
@@ -5,7 +5,8 @@
sizeClasses,
{
'max-w-[10rem] sm:max-w-[20rem] md:max-w-[16rem]': isHeaderScrolled,
- 'group-hover:border-dark-charcoal-20': isInSearchBar && !isPressed,
+ 'focus-visible:border-tx focus-visible:bg-white focus-visible:ring-offset-dark-charcoal-06 group-hover:border-dark-charcoal-20 group-hover:bg-white group-hover:focus-within:border-tx':
+ isInSearchBar && !isPressed,
},
]"
:variant="buttonVariant"
diff --git a/src/components/VHeader/VHeaderDesktop.vue b/src/components/VHeader/VHeaderDesktop.vue
index 5dc3b1232..d5a91836e 100644
--- a/src/components/VHeader/VHeaderDesktop.vue
+++ b/src/components/VHeader/VHeaderDesktop.vue
@@ -10,14 +10,20 @@
<VLogoButton :is-fetching="isFetching" :is-search-route="true" />
<VSearchBar
+ ref="searchBarRef"
v-model.trim="searchTerm"
class="flex-grow me-4"
size="medium"
@submit="handleSearch"
>
+ <VClearButton
+ v-show="searchTerm !== ''"
+ class="hidden me-2 group-focus-within:flex"
+ @click="clearSearchTerm"
+ />
<span
- v-show="searchStatus"
- class="info mx-4 hidden whitespace-nowrap text-xs font-semibold text-dark-charcoal-70 group-hover:text-dark-charcoal group-focus:text-dark-charcoal lg:block"
+ v-show="Boolean(searchStatus)"
+ class="info mx-4 hidden whitespace-nowrap text-xs text-dark-charcoal-70 group-focus-within:hidden group-hover:text-dark-charcoal group-focus:text-dark-charcoal lg:block"
>
{{ searchStatus }}
</span>
@@ -59,7 +65,6 @@ import { isSearchTypeSupported, useSearchStore } from '~/stores/search'
import { ALL_MEDIA, searchPath, supportedMediaTypes } from '~/constants/media'
import { IsHeaderScrolledKey } from '~/types/provides'
-import { useMatchSearchRoutes } from '~/composables/use-match-routes'
import { useI18n } from '~/composables/use-i18n'
import { useI18nResultsCount } from '~/composables/use-i18n-utilities'
@@ -71,20 +76,22 @@ import local from '~/utils/local'
import { env } from '~/utils/env'
import { Focus } from '~/utils/focus-management'
-import VLogoButton from '~/components/VHeader/VLogoButton.vue'
-import VSearchGridFilter from '~/components/VFilters/VSearchGridFilter.vue'
+import { ensureFocus } from '~/utils/reakit-utils/focus'
+
+import VClearButton from '~/components/VHeader/VSearchBar/VClearButton.vue'
import VFilterButton from '~/components/VHeader/VFilterButton.vue'
import VSearchBar from '~/components/VHeader/VSearchBar/VSearchBar.vue'
+import VLogoButton from '~/components/VHeader/VLogoButton.vue'
+import VSearchGridFilter from '~/components/VFilters/VSearchGridFilter.vue'
import VSearchTypePopover from '~/components/VContentSwitcher/VSearchTypePopover.vue'
-import closeIcon from '~/assets/icons/close.svg'
-
/**
* The desktop search header.
*/
export default defineComponent({
name: 'VHeaderDesktop',
components: {
+ VClearButton,
VFilterButton,
VLogoButton,
VSearchGridFilter,
@@ -94,6 +101,8 @@ export default defineComponent({
},
setup(_, { emit }) {
const filterButtonRef = ref<InstanceType<typeof VFilterButton> | null>(null)
+ const searchBarRef = ref<InstanceType<typeof VSearchBar> | null>(null)
+
const sidebarVisibleRef = ref(false)
const { app } = useContext()
@@ -105,7 +114,6 @@ export default defineComponent({
const content = useSearchType()
const filterSidebar = useFilterSidebarVisibility()
- const { matches: isSearchRoute } = useMatchSearchRoutes()
const isHeaderScrolled = inject(IsHeaderScrolledKey)
@@ -139,6 +147,11 @@ export default defineComponent({
},
})
+ const clearSearchTerm = () => {
+ searchTerm.value = ''
+ ensureFocus(searchBarRef.value?.$el.querySelector('input') as HTMLElement)
+ }
+
const selectSearchType = async (type) => {
content.setActiveType(type)
@@ -166,14 +179,10 @@ export default defineComponent({
* Called when the 'search' button in the header is clicked.
* There are several scenarios:
* - search term hasn't changed:
- * - on a search route, do nothing.
- * - on other routes: set searchType to 'All content', reset the media,
- * change the path to `/search/` (All content).
+ * - do nothing.
* - search term changed:
- * - on a search route: Update the store searchTerm value, update query `q` param, reset media,
+ * - Update the store searchTerm value, update query `q` param, reset media,
* fetch new media.
- * - on other routes: Update the store searchTerm value, set searchType to 'All content', reset media,
- * update query `q` param.
* Updating the path causes the `search.vue` page's route watcher
* to run and fetch new media.
*/
@@ -181,19 +190,12 @@ export default defineComponent({
window.scrollTo({ top: 0, left: 0, behavior: 'auto' })
const mediaStore = useMediaStore()
const searchStore = useSearchStore()
- const searchType = isSearchRoute.value
- ? searchStore.searchType
- : ALL_MEDIA
- if (
- isSearchRoute.value &&
- (!searchTermChanged.value || searchTerm.value === '')
- )
- return
+ const searchType = searchStore.searchType
+ if (!searchTermChanged.value || searchTerm.value === '') return
if (searchTermChanged.value) {
await mediaStore.clearMedia()
searchStore.setSearchTerm(searchTerm.value)
- searchStore.setSearchType(searchType)
}
document.activeElement?.blur()
if (isSearchTypeSupported(searchType)) {
@@ -238,7 +240,7 @@ export default defineComponent({
return {
filterButtonRef,
- closeIcon,
+ searchBarRef,
isFetching,
isHeaderScrolled,
@@ -247,6 +249,7 @@ export default defineComponent({
close,
handleSearch,
+ clearSearchTerm,
selectSearchType,
searchStatus,
searchTerm,
diff --git a/src/components/VHeader/VSearchBar/VClearButton.vue b/src/components/VHeader/VSearchBar/VClearButton.vue
new file mode 100644
index 000000000..6ddfa75ff
--- /dev/null
+++ b/src/components/VHeader/VSearchBar/VClearButton.vue
@@ -0,0 +1,25 @@
+<template>
+ <VIconButton
+ :button-props="{ variant: 'plain' }"
+ :icon-props="{ iconPath: closeIcon }"
+ size="smaller"
+ class="border-tx text-dark-charcoal-70"
+ :aria-label="$t('browse-page.search-form.clear')"
+ @click="$emit('click')"
+ />
+</template>
+
+<script lang="ts">
+import { defineComponent } from '@nuxtjs/composition-api'
+
+import closeIcon from '~/assets/icons/close-small.svg'
+
+export default defineComponent({
+ name: 'VClearButton',
+ setup() {
+ return {
+ closeIcon,
+ }
+ },
+})
+</script>
diff --git a/src/components/VHeader/VSearchBar/VSearchBar.vue b/src/components/VHeader/VSearchBar/VSearchBar.vue
index b30e182a3..3f7df6c8c 100644
--- a/src/components/VHeader/VSearchBar/VSearchBar.vue
+++ b/src/components/VHeader/VSearchBar/VSearchBar.vue
@@ -10,7 +10,11 @@
v-model="modelMedium"
:placeholder="placeholder || $t('hero.search.placeholder')"
class="search-field flex-grow focus:border-pink"
- :class="[route === 'home' ? 'border-tx' : 'border-dark-charcoal-20']"
+ :class="[
+ route === 'home'
+ ? 'border-tx'
+ : 'border-tx bg-dark-charcoal-10 text-dark-charcoal-70 focus-within:bg-white group-hover:bg-dark-charcoal-10 group-hover:text-dark-charcoal group-hover:focus-within:bg-white',
+ ]"
:label-text="
$t('search.search-bar-label', { openverse: 'Openverse' }).toString()
"
diff --git a/src/components/VHeader/VSearchBar/VSearchButton.vue b/src/components/VHeader/VSearchBar/VSearchButton.vue
index f807d9303..2fb3264d2 100644
--- a/src/components/VHeader/VSearchBar/VSearchButton.vue
+++ b/src/components/VHeader/VSearchBar/VSearchButton.vue
@@ -4,15 +4,15 @@
:aria-label="$t('search.search')"
size="disabled"
:variant="isIcon ? 'plain' : 'primary'"
- class="flex-shrink-0 text-2xl font-semibold transition-none rounded-s-none hover:bg-pink hover:text-white focus-visible:ring focus-visible:ring-pink group-hover:border-pink group-hover:bg-pink group-hover:text-white"
+ class="flex-shrink-0 text-2xl font-semibold transition-none rounded-s-none hover:bg-pink hover:text-white focus-visible:ring focus-visible:ring-pink"
:class="[
isIcon
? 'search-button ps-[1.5px] p-[0.5px] focus-visible:bg-pink focus-visible:text-white'
: 'h-full whitespace-nowrap py-6 px-10',
sizeClasses,
route === 'home'
- ? 'border-b border-tx border-b-pink bg-pink text-white'
- : 'border-dark-charcoal-20',
+ ? 'border-b border-tx border-b-pink bg-pink text-white group-hover:border-pink group-hover:bg-pink group-hover:text-white'
+ : 'border-tx bg-dark-charcoal-10 group-focus-within:bg-pink group-focus-within:text-white group-focus-within:hover:bg-dark-pink',
]"
v-on="$listeners"
>
diff --git a/src/components/VHeaderOld/VSearchBar/VSearchBarOld.vue b/src/components/VHeaderOld/VSearchBar/VSearchBarOld.vue
index 4f716259d..aa3a95fdb 100644
--- a/src/components/VHeaderOld/VSearchBar/VSearchBarOld.vue
+++ b/src/components/VHeaderOld/VSearchBar/VSearchBarOld.vue
@@ -4,7 +4,7 @@
:class="{ 'h-[57px] md:h-[69px]': size === 'standalone' }"
@submit.prevent="handleSearch"
>
- <VInputField
+ <VInputFieldOld
:placeholder="placeholder || $t('hero.search.placeholder')"
v-bind="$attrs"
class="search-field flex-grow focus:border-pink"
@@ -22,7 +22,7 @@
>
<!-- @slot Extra information such as loading message or result count goes here. -->
<slot />
- </VInputField>
+ </VInputFieldOld>
<VSearchButtonOld type="submit" :size="size" :route="route" />
</form>
</template>
@@ -33,9 +33,9 @@ import { computed, defineComponent, PropType } from '@nuxtjs/composition-api'
import { useMatchHomeRoute } from '~/composables/use-match-routes'
import { defineEvent } from '~/types/emits'
-import VInputField, {
+import VInputFieldOld, {
FIELD_SIZES,
-} from '~/components/VInputField/VInputField.vue'
+} from '~/components/VInputFieldOld/VInputFieldOld.vue'
import VSearchButtonOld from '~/components/VHeaderOld/VSearchBar/VSearchButtonOld.vue'
/**
@@ -45,7 +45,7 @@ import VSearchButtonOld from '~/components/VHeaderOld/VSearchBar/VSearchButtonOl
*/
export default defineComponent({
name: 'VSearchBarOld',
- components: { VInputField, VSearchButtonOld },
+ components: { VInputFieldOld, VSearchButtonOld },
inheritAttrs: false,
props: {
/**
diff --git a/src/components/VHeaderOld/VSearchBar/VSearchButtonOld.vue b/src/components/VHeaderOld/VSearchBar/VSearchButtonOld.vue
index de48bf366..ad33294d7 100644
--- a/src/components/VHeaderOld/VSearchBar/VSearchButtonOld.vue
+++ b/src/components/VHeaderOld/VSearchBar/VSearchButtonOld.vue
@@ -33,7 +33,7 @@ import { useBrowserIsMobile } from '~/composables/use-browser-detection'
import VIcon from '~/components/VIcon/VIcon.vue'
import VButton from '~/components/VButton.vue'
-import type { FieldSize } from '~/components/VInputField/VInputField.vue'
+import type { FieldSize } from '~/components/VInputFieldOld/VInputFieldOld.vue'
import searchIcon from '~/assets/icons/search.svg'
diff --git a/src/components/VIconButton/VIconButton.vue b/src/components/VIconButton/VIconButton.vue
index 291eca97e..2feb4de23 100644
--- a/src/components/VIconButton/VIconButton.vue
+++ b/src/components/VIconButton/VIconButton.vue
@@ -28,6 +28,7 @@ import VButton, { type ButtonProps } from '~/components/VButton.vue'
const SIZE_MAP = Object.freeze({
tiny: { icon: 'w-6 h-6', button: 'w-6 h-6' },
small: { icon: 'w-6 h-6', button: 'w-10 h-10' },
+ smaller: { icon: 'w-6 h-6', button: 'w-8 h-8' },
// TODO: audit the sizes after new header is done.
'new-small': { icon: 'w-4 h-4', button: 'w-8 h-8' },
'search-small': {
diff --git a/src/components/VInputField/VInputField.vue b/src/components/VInputField/VInputField.vue
index 3137dd64b..9ce8ad91a 100644
--- a/src/components/VInputField/VInputField.vue
+++ b/src/components/VInputField/VInputField.vue
@@ -1,11 +1,13 @@
<template>
<div
- class="input-field group flex flex-row items-center overflow-hidden rounded-sm border p-0.5px focus-within:border-1.5 focus-within:border-pink focus-within:bg-dark-charcoal-06 focus-within:p-0 focus:border-pink group-hover:bg-dark-charcoal-06"
+ class="input-field group flex flex-row items-center overflow-hidden rounded-sm border p-0.5px focus-within:border-1.5 focus-within:border-pink focus-within:bg-dark-charcoal-06 focus-within:p-0 group-hover:bg-dark-charcoal-06"
:class="[
{
// Padding is set to 1.5px to accommodate the border that will appear later.
- 'ps-1.5px rounded-s-none border-s-0': connectionSides.includes('start'),
- 'pe-1.5px rounded-e-none border-e-0': connectionSides.includes('end'),
+ 'ps-1.5px rounded-s-none border-s-0 focus-within:ps-1.5px focus-within:rounded-s-none focus-within:border-s-0':
+ connectionSides.includes('start'),
+ 'pe-1.5px rounded-e-none border-e-0 focus-within:pe-1.5px focus-within:rounded-e-none focus-within:border-e-0':
+ connectionSides.includes('end'),
},
sizeClass,
]"
diff --git a/src/components/VInputFieldOld/VInputFieldOld.vue b/src/components/VInputFieldOld/VInputFieldOld.vue
new file mode 100644
index 000000000..3137dd64b
--- /dev/null
+++ b/src/components/VInputFieldOld/VInputFieldOld.vue
@@ -0,0 +1,128 @@
+<template>
+ <div
+ class="input-field group flex flex-row items-center overflow-hidden rounded-sm border p-0.5px focus-within:border-1.5 focus-within:border-pink focus-within:bg-dark-charcoal-06 focus-within:p-0 focus:border-pink group-hover:bg-dark-charcoal-06"
+ :class="[
+ {
+ // Padding is set to 1.5px to accommodate the border that will appear later.
+ 'ps-1.5px rounded-s-none border-s-0': connectionSides.includes('start'),
+ 'pe-1.5px rounded-e-none border-e-0': connectionSides.includes('end'),
+ },
+ sizeClass,
+ ]"
+ >
+ <input
+ :id="fieldId"
+ v-bind="$attrs"
+ :type="type"
+ class="h-full w-full appearance-none rounded-none bg-tx text-2xl font-semibold leading-none placeholder-dark-charcoal-70 ms-4 focus:outline-none md:text-base"
+ :value="modelValue"
+ :aria-label="labelText"
+ @input="updateModelValue"
+ v-on="$listeners"
+ />
+
+ <!-- @slot Extra information goes here -->
+ <slot />
+ </div>
+</template>
+
+<script lang="ts">
+import { computed, defineComponent, PropType } from '@nuxtjs/composition-api'
+
+import { defineEvent } from '~/types/emits'
+
+export const FIELD_SIZES = {
+ small: 'h-10 text-md',
+ medium: 'h-12',
+ large: 'h-14',
+ standalone: 'h-full',
+} as const
+export type FieldSize = keyof typeof FIELD_SIZES
+
+/**
+ * Provides a control to enter text as input.
+ */
+export default defineComponent({
+ name: 'VInputField',
+ inheritAttrs: false,
+ model: {
+ prop: 'modelValue',
+ event: 'update:modelValue',
+ },
+ props: {
+ /**
+ * the textual content of the input field
+ */
+ modelValue: {
+ type: String,
+ default: '',
+ },
+ /**
+ * the textual content of the label associated with this input field; This
+ * label is SR-only.
+ */
+ labelText: {
+ type: String,
+ required: true,
+ },
+ /**
+ * the ID to assign to the field; This can be used to attach custom labels
+ * to the field.
+ */
+ fieldId: {
+ type: String,
+ required: true,
+ },
+ /**
+ * list of sides where the field is connected to other controls
+ */
+ connectionSides: {
+ type: Array,
+ default: () => [],
+ validator: (v: string[]) =>
+ v.every((item) => ['start', 'end'].includes(item)),
+ },
+ /**
+ * Small size is for mobile header/scrolled
+ * Medium size is for desktop header
+ * Large size is for mobile header/non-scrolled
+ * Standalone size is for homepage
+ */
+ size: {
+ type: String as PropType<keyof typeof FIELD_SIZES>,
+ required: true,
+ validator: (v: string) => Object.keys(FIELD_SIZES).includes(v),
+ },
+ },
+ // using non-native event name to ensure the two are not mixed
+ emits: {
+ 'update:modelValue': defineEvent<[string]>(),
+ },
+ setup(props, { emit, attrs }) {
+ const type = typeof attrs['type'] === 'string' ? attrs['type'] : 'text'
+
+ const updateModelValue = (event: Event) => {
+ emit('update:modelValue', (event.target as HTMLInputElement).value)
+ }
+ const sizeClass = computed(() => FIELD_SIZES[props.size])
+
+ return {
+ emit,
+ type,
+
+ sizeClass,
+ updateModelValue,
+ }
+ },
+})
+</script>
+
+<style scoped>
+.input-field:focus-within .info {
+ @apply text-dark-charcoal;
+}
+
+.input-field input::placeholder {
+ font-weight: normal;
+}
+</style>
diff --git a/src/components/VInputFieldOld/meta/VInputFieldOld.stories.mdx b/src/components/VInputFieldOld/meta/VInputFieldOld.stories.mdx
new file mode 100644
index 000000000..4d9544fb1
--- /dev/null
+++ b/src/components/VInputFieldOld/meta/VInputFieldOld.stories.mdx
@@ -0,0 +1,138 @@
+import {
+ ArgsTable,
+ Canvas,
+ Description,
+ Meta,
+ Story,
+} from '@storybook/addon-docs'
+
+import VInputFieldOld from '~/components/VInputFieldOld/VInputFieldOld.vue'
+
+<Meta
+ title="Components/VInputFieldOld"
+ component={VInputFieldOld}
+ argTypes={{
+ 'update:modelValue': {
+ action: 'update:modelValue',
+ },
+ }}
+/>
+
+export const Template = (args) => ({
+ template: `
+ <VInputFieldOld v-bind="args" v-on="args" label-text="Test label">
+ Extra info
+ </VInputFieldOld>
+ `,
+ components: { VInputFieldOld },
+ setup() {
+ return { args }
+ },
+})
+
+# Input field
+
+<Description of={VInputFieldOld} />
+
+<ArgsTable of={VInputFieldOld} />
+
+The component emits an `input` event with the new contents of the field whenever
+the field receives an input.
+
+<Canvas>
+ <Story
+ name="Default"
+ args={{
+ value: 'Text goes here',
+ }}
+ >
+ {Template.bind({})}
+ </Story>
+</Canvas>
+
+The recommended way to use it is with `v-model` mapping to a `String`.
+
+export const vModelTemplate = () => ({
+ template: `
+ <div>
+ <VInputFieldOld v-model="text">
+ {{ text.length }}
+ </VInputFieldOld>
+ {{ text }}
+ </div>
+ `,
+ components: { VInputFieldOld },
+ data() {
+ return {
+ text: 'Hello, World!',
+ }
+ },
+})
+
+<Canvas>
+ <Story name="v-model">{vModelTemplate.bind({})}</Story>
+</Canvas>
+
+The component is a transparent wrapper over `<input>` so all attributes of the
+input element can be applied to it, e.g. `placeholder`. It is recommended not to
+change the type as the field is specifically designed for text.
+
+<Canvas>
+ <Story
+ name="With placeholder"
+ args={{
+ placeholder: 'Enter something here',
+ }}
+ >
+ {Template.bind({})}
+ </Story>
+</Canvas>
+
+For a11y, it is recommended that the input field be associated with a label. For
+this reason, the field is rendered with an SR-only label. The text can be set
+via the `labelText` prop.
+
+<Canvas>
+ <Story
+ name="With label text"
+ args={{
+ labelText: 'Label:',
+ }}
+ >
+ {Template.bind({})}
+ </Story>
+</Canvas>
+
+To provide a custom label, skip the `labelText` prop (to remove the SR-only
+label) and set the `id` attribute on the component (which is passed to the
+`<input>` element). Now use the ID as the `for` attribute of your custom
+`<label>` element.
+
+export const labelTemplate = () => ({
+ template: `
+ <div>
+ <label for="field">Label:</label>
+ <VInputFieldOld id="field"/>
+ </div>
+ `,
+ components: { VInputFieldOld },
+})
+
+<Canvas>
+ <Story name="With custom label">{labelTemplate.bind({})}</Story>
+</Canvas>
+
+The field can be conjoined with other controls on either the start or the end
+side and as such it provides the `connectionSides` prop to make the connections
+seamless. The field has no border or rounded corners on the connected sides.
+
+<Canvas>
+ <Story
+ name="With connections"
+ args={{
+ connectionSides: ['start', 'end'],
+ }}
+ >
+ {Template.bind({})}
+ </Story>
+</Canvas>
diff --git a/src/locales/en.json b/src/locales/en.json
index 5bb0682c1..c82231f87 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -374,7 +374,8 @@
"model-3d": "3D Models",
"all": "content",
"collection-placeholder": "Search this collection",
- "button": "Search"
+ "button": "Search",
+ "clear": "Clear"
},
"license-description": {
"title": "License CC",
diff --git a/test/playwright/utils/breakpoints.ts b/test/playwright/utils/breakpoints.ts
index 7ea271bbe..3d58c7189 100644
--- a/test/playwright/utils/breakpoints.ts
+++ b/test/playwright/utils/breakpoints.ts
@@ -139,12 +139,17 @@ const describeEvery = describeEachBreakpoint(
Object.keys(VIEWPORTS) as Breakpoint[]
)
const describeEachDesktop = describeEachBreakpoint(desktopBreakpoints)
+const describeEachDesktopExceptMd = describeEachBreakpoint(
+ desktopBreakpoints.filter((b) => b !== 'md')
+)
const describeEachMobile = describeEachBreakpoint(mobileBreakpoints)
export default {
...breakpointTests,
describeEachBreakpoint,
describeEvery,
+ // TODO: replace with describeEachDesktopExceptMd when the new header is ready
describeEachDesktop,
+ describeEachDesktopExceptMd,
describeEachMobile,
}
diff --git a/test/playwright/utils/navigation.ts b/test/playwright/utils/navigation.ts
index 49cbbbf3d..89e0fe123 100644
--- a/test/playwright/utils/navigation.ts
+++ b/test/playwright/utils/navigation.ts
@@ -243,7 +243,7 @@ export const goToSearchTerm = async (
await page.goto(pathWithDir(path, dir))
await dismissTranslationBanner(page)
} else {
- await page.goto(pathWithDir('/', dir))
+ await page.goto(pathWithDir(`/${query}`, dir))
await dismissTranslationBanner(page)
// Select the search type
if (searchType !== 'all') {
@@ -262,7 +262,7 @@ export const goToSearchTerm = async (
}
await scrollDownAndUp(page)
const pageWidth = page.viewportSize()?.width
- if (pageWidth && pageWidth > smWidth) {
+ if (pageWidth && pageWidth > smWidth && query !== '&ff_new_header=on') {
await page.waitForSelector(`[aria-label="${t('header.aria.menu', dir)}"]`)
}
}
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts b/test/playwright/visual-regression/components/header-old.spec.ts
new file mode 100644
index 000000000..cf8410e11
--- /dev/null
+++ b/test/playwright/visual-regression/components/header-old.spec.ts
@@ -0,0 +1,68 @@
+import { test } from '@playwright/test'
+
+import breakpoints from '~~/test/playwright/utils/breakpoints'
+import { hideInputCursors } from '~~/test/playwright/utils/page'
+import {
+ closeFilters,
+ goToSearchTerm,
+ languageDirections,
+ scrollToBottom,
+ sleep,
+} from '~~/test/playwright/utils/navigation'
+
+test.describe.configure({ mode: 'parallel' })
+
+const headerSelector = '.main-header'
+
+test.describe('header-old snapshots', () => {
+ for (const dir of languageDirections) {
+ test.describe(dir, () => {
+ test.beforeEach(async ({ page }) => {
+ await goToSearchTerm(page, 'birds', { dir: dir })
+ })
+
+ test.describe('header-old', () => {
+ breakpoints.describeEachDesktop(({ expectSnapshot }) => {
+ test('filters open', async ({ page }) => {
+ await page.mouse.move(0, 150)
+ await expectSnapshot(
+ `filters-open-${dir}`,
+ page.locator(headerSelector)
+ )
+ })
+ })
+
+ breakpoints.describeEvery(({ expectSnapshot }) => {
+ test('resting', async ({ page }) => {
+ // By default, filters are open. We need to close them.
+ await closeFilters(page)
+ // Make sure the header is not hovered on
+ await page.mouse.move(0, 150)
+ await expectSnapshot(`resting-${dir}`, page.locator(headerSelector))
+ })
+
+ test('scrolled', async ({ page }) => {
+ await closeFilters(page)
+ await scrollToBottom(page)
+ await page.mouse.move(0, 150)
+ await sleep(200)
+ await expectSnapshot(
+ `scrolled-${dir}`,
+ page.locator(headerSelector)
+ )
+ })
+
+ test('searchbar hovered', async ({ page }) => {
+ await closeFilters(page)
+ await page.hover('input')
+ await hideInputCursors(page)
+ await expectSnapshot(
+ `searchbar-hovered-${dir}`,
+ page.locator(headerSelector)
+ )
+ })
+ })
+ })
+ })
+ }
+})
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-2xl-linux.png
new file mode 100644
index 000000000..78ef9efe7
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-lg-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-lg-linux.png
new file mode 100644
index 000000000..31143b5c3
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-md-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-md-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-md-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-md-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-xl-linux.png
new file mode 100644
index 000000000..9ff7016e6
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-2xl-linux.png
new file mode 100644
index 000000000..10f7179bb
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-lg-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-lg-linux.png
new file mode 100644
index 000000000..26b43bc2c
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-md-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-md-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-md-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-md-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-xl-linux.png
new file mode 100644
index 000000000..14bf7332a
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/filters-open-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-2xl-linux.png
new file mode 100644
index 000000000..359f2c040
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-lg-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-lg-linux.png
new file mode 100644
index 000000000..8f1d0eaae
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-md-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-md-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-md-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-md-linux.png
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-sm-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-sm-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-sm-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-sm-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-xl-linux.png
new file mode 100644
index 000000000..9c35104c5
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-xs-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-xs-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-xs-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-ltr-xs-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-2xl-linux.png
new file mode 100644
index 000000000..1acda4400
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-lg-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-lg-linux.png
new file mode 100644
index 000000000..e71441bb0
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-md-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-md-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-md-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-md-linux.png
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-sm-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-sm-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-sm-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-sm-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-xl-linux.png
new file mode 100644
index 000000000..28e450725
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-xs-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-xs-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-xs-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/resting-rtl-xs-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-2xl-linux.png
new file mode 100644
index 000000000..0bd2abcce
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-lg-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-lg-linux.png
new file mode 100644
index 000000000..dfb21aed9
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-md-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-md-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-md-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-md-linux.png
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-sm-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-sm-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-sm-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-sm-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-xl-linux.png
new file mode 100644
index 000000000..8442d3da9
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-xs-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-xs-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-xs-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-ltr-xs-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-2xl-linux.png
new file mode 100644
index 000000000..77b46c68e
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-lg-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-lg-linux.png
new file mode 100644
index 000000000..89b7dda2f
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-md-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-md-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-md-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-md-linux.png
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-sm-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-sm-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-sm-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-sm-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-xl-linux.png
new file mode 100644
index 000000000..6a3949084
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-xs-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-xs-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-xs-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/scrolled-rtl-xs-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-2xl-linux.png
new file mode 100644
index 000000000..bfdf8a417
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-lg-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-lg-linux.png
new file mode 100644
index 000000000..0fd4bba29
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-md-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-md-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-md-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-md-linux.png
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-sm-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-sm-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-sm-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-sm-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-xl-linux.png
new file mode 100644
index 000000000..6ed44eaa9
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-xs-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-xs-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-xs-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-ltr-xs-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-2xl-linux.png
new file mode 100644
index 000000000..85b7de2b7
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-lg-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-lg-linux.png
new file mode 100644
index 000000000..ef785dc16
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-md-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-md-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-md-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-md-linux.png
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-sm-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-sm-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-sm-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-sm-linux.png
diff --git a/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-xl-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-xl-linux.png
new file mode 100644
index 000000000..1fb3ea922
Binary files /dev/null and b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-xs-linux.png b/test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-xs-linux.png
similarity index 100%
rename from test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-xs-linux.png
rename to test/playwright/visual-regression/components/header-old.spec.ts-snapshots/searchbar-hovered-rtl-xs-linux.png
diff --git a/test/playwright/visual-regression/components/header.spec.ts b/test/playwright/visual-regression/components/header.spec.ts
index 7b560c19b..6dc194d31 100644
--- a/test/playwright/visual-regression/components/header.spec.ts
+++ b/test/playwright/visual-regression/components/header.spec.ts
@@ -18,11 +18,14 @@ test.describe('header snapshots', () => {
for (const dir of languageDirections) {
test.describe(dir, () => {
test.beforeEach(async ({ page }) => {
- await goToSearchTerm(page, 'birds', { dir: dir })
+ await goToSearchTerm(page, 'birds', {
+ dir: dir,
+ query: 'ff_new_header=on',
+ })
})
test.describe('header', () => {
- breakpoints.describeEachDesktop(({ expectSnapshot }) => {
+ breakpoints.describeEachDesktopExceptMd(({ expectSnapshot }) => {
test('filters open', async ({ page }) => {
await page.mouse.move(0, 150)
await expectSnapshot(
@@ -30,9 +33,7 @@ test.describe('header snapshots', () => {
page.locator(headerSelector)
)
})
- })
- breakpoints.describeEvery(({ expectSnapshot }) => {
test('resting', async ({ page }) => {
// By default, filters are open. We need to close them.
await closeFilters(page)
@@ -61,7 +62,18 @@ test.describe('header snapshots', () => {
page.locator(headerSelector)
)
})
+
+ test('searchbar active', async ({ page }) => {
+ await closeFilters(page)
+ await hideInputCursors(page)
+ await page.click('input')
+ await expectSnapshot(
+ `searchbar-active-${dir}`,
+ page.locator(headerSelector)
+ )
+ })
})
+ // TODO: add mobile tests
})
})
}
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-2xl-linux.png
index 78ef9efe7..259c1b3b9 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-lg-linux.png
index 31143b5c3..39da68b75 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-xl-linux.png
index 9ff7016e6..339bd3baf 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-2xl-linux.png
index 10f7179bb..7ff98f7e5 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-lg-linux.png
index 26b43bc2c..bf7717714 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-xl-linux.png
index 14bf7332a..5935b1b18 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/filters-open-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-2xl-linux.png
index 359f2c040..23d7f9393 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-lg-linux.png
index 8f1d0eaae..e0b7ea2f3 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-xl-linux.png
index 9c35104c5..8da302301 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-2xl-linux.png
index 1acda4400..3e525ad05 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-lg-linux.png
index e71441bb0..590b7eb7d 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-xl-linux.png
index 28e450725..fba3b2176 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/resting-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-2xl-linux.png
index 0bd2abcce..a696be429 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-lg-linux.png
index dfb21aed9..5ad5fd651 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-xl-linux.png
index 8442d3da9..8bc36a3be 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-2xl-linux.png
index 77b46c68e..a8ebdd01e 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-lg-linux.png
index 89b7dda2f..b87c0ebe3 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-xl-linux.png
index 6a3949084..c8832fed3 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/scrolled-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-2xl-linux.png
new file mode 100644
index 000000000..4d800956d
Binary files /dev/null and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-lg-linux.png
new file mode 100644
index 000000000..667590c2f
Binary files /dev/null and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-xl-linux.png
new file mode 100644
index 000000000..74904f2c7
Binary files /dev/null and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-2xl-linux.png
new file mode 100644
index 000000000..7db9341fb
Binary files /dev/null and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-lg-linux.png
new file mode 100644
index 000000000..57da63fb5
Binary files /dev/null and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-xl-linux.png
new file mode 100644
index 000000000..dc92a579b
Binary files /dev/null and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-active-rtl-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-2xl-linux.png
index bfdf8a417..1e8ab2e83 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-lg-linux.png
index 0fd4bba29..7ca305b2f 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-xl-linux.png
index 6ed44eaa9..422507ba8 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-2xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-2xl-linux.png
index 85b7de2b7..fc949986a 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-2xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-lg-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-lg-linux.png
index ef785dc16..c6c9bd654 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-lg-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-xl-linux.png b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-xl-linux.png
index 1fb3ea922..84804e4d8 100644
Binary files a/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-xl-linux.png and b/test/playwright/visual-regression/components/header.spec.ts-snapshots/searchbar-hovered-rtl-xl-linux.png differ