Skip to content

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

Update the search term when users click the back button; extract useSearch (#2046)

Olga Bulatdcc4ed860a29
diff --git a/src/components/VHeader/VHeaderDesktop.vue b/src/components/VHeader/VHeaderDesktop.vue
index e49b6ea1a..585f9e386 100644
--- a/src/components/VHeader/VHeaderDesktop.vue
+++ b/src/components/VHeader/VHeaderDesktop.vue
@@ -47,25 +47,16 @@
</header>
</template>
<script lang="ts">
-import {
- computed,
- defineComponent,
- inject,
- ref,
- useRouter,
-} from "@nuxtjs/composition-api"
+import { computed, defineComponent, inject, ref } from "@nuxtjs/composition-api"
import { useMediaStore } from "~/stores/media"
-import { isSearchTypeSupported, useSearchStore } from "~/stores/search"
+import { useSearchStore } from "~/stores/search"
import { useUiStore } from "~/stores/ui"
-import { ALL_MEDIA, supportedMediaTypes } from "~/constants/media"
import { IsHeaderScrolledKey, IsSidebarVisibleKey } from "~/types/provides"
-import { useI18n } from "~/composables/use-i18n"
-import { useI18nResultsCount } from "~/composables/use-i18n-utilities"
import { useFocusFilters } from "~/composables/use-focus-filters"
-import useSearchType from "~/composables/use-search-type"
+import { useSearch } from "~/composables/use-search"
import { Focus } from "~/utils/focus-management"
import { ensureFocus } from "~/utils/reakit-utils/focus"
@@ -94,98 +85,27 @@ export default defineComponent({
const filterButtonRef = ref<InstanceType<typeof VFilterButton> | null>(null)
const searchBarRef = ref<InstanceType<typeof VSearchBar> | null>(null)
- const i18n = useI18n()
- const router = useRouter()
-
const mediaStore = useMediaStore()
const searchStore = useSearchStore()
const uiStore = useUiStore()
- const content = useSearchType()
-
const isHeaderScrolled = inject(IsHeaderScrolledKey)
const isSidebarVisible = inject(IsSidebarVisibleKey)
const isFetching = computed(() => mediaStore.fetchState.isFetching)
- const resultsCount = computed(() => mediaStore.resultCount)
- const { getI18nCount } = useI18nResultsCount()
- /**
- * Additional text at the end of the search bar.
- * Shows the loading state or result count.
- */
- const searchStatus = computed(() => {
- if (searchStore.searchTerm === "") return ""
- if (isFetching.value) return i18n.t("header.loading")
- return getI18nCount(resultsCount.value)
- })
-
- const localSearchTerm = ref(searchStore.searchTerm)
- let searchTermChanged = computed(() => {
- return searchStore.searchTerm !== localSearchTerm.value
- })
- /**
- * Search term has a getter and setter to be used as a v-model.
- * To prevent sending unnecessary requests, we also keep track of whether
- * the search term was changed.
- */
- const searchTerm = computed({
- get: () => localSearchTerm.value,
- set: (value: string) => {
- localSearchTerm.value = value
- },
- })
+ const { updateSearchState, searchTerm, searchStatus } = useSearch()
const clearSearchTerm = () => {
searchTerm.value = ""
ensureFocus(searchBarRef.value?.$el.querySelector("input") as HTMLElement)
}
- const selectSearchType = async (type) => {
- content.setActiveType(type)
-
- router.push(searchStore.getSearchPath({ type }))
-
- function typeWithoutMedia(mediaType) {
- return mediaStore.resultCountsPerMediaType[mediaType] === 0
- }
-
- const shouldFetchMedia =
- type === ALL_MEDIA
- ? supportedMediaTypes.every((type) => typeWithoutMedia(type))
- : typeWithoutMedia(type)
-
- if (shouldFetchMedia) {
- await mediaStore.fetchMedia()
- }
- }
-
- /**
- * Called when the 'search' button in the header is clicked.
- * There are several scenarios:
- * - search term hasn't changed:
- * - do nothing.
- * - search term changed:
- * - Update the store searchTerm value, update query `q` param, reset media,
- * fetch new media.
- * Updating the path causes the `search.vue` page's route watcher
- * to run and fetch new media.
- */
const handleSearch = async () => {
window.scrollTo({ top: 0, left: 0, behavior: "auto" })
- const mediaStore = useMediaStore()
- const searchStore = useSearchStore()
- const searchType = searchStore.searchType
- if (!searchTermChanged.value || searchTerm.value === "") return
- if (searchTermChanged.value) {
- await mediaStore.clearMedia()
-
- searchStore.setSearchTerm(searchTerm.value)
- }
+
document.activeElement?.blur()
- if (isSearchTypeSupported(searchType)) {
- router.push(searchStore.getSearchPath({ type: searchType }))
- }
+ updateSearchState()
}
const areFiltersDisabled = computed(
() => !searchStore.searchTypeIsSupported
@@ -214,7 +134,6 @@ export default defineComponent({
handleSearch,
clearSearchTerm,
- selectSearchType,
searchStatus,
searchTerm,
toggleSidebar,
diff --git a/src/components/VHeader/VHeaderMobile/VHeaderMobile.vue b/src/components/VHeader/VHeaderMobile/VHeaderMobile.vue
index 762413b72..8d5c39745 100644
--- a/src/components/VHeader/VHeaderMobile/VHeaderMobile.vue
+++ b/src/components/VHeader/VHeaderMobile/VHeaderMobile.vue
@@ -116,7 +116,6 @@ import {
inject,
nextTick,
ref,
- useRouter,
watch,
} from "@nuxtjs/composition-api"
@@ -128,11 +127,10 @@ import { keycodes } from "~/constants/key-codes"
import { IsHeaderScrolledKey } from "~/types/provides"
import { useDialogControl } from "~/composables/use-dialog-control"
-import { useI18n } from "~/composables/use-i18n"
-import { useI18nResultsCount } from "~/composables/use-i18n-utilities"
+import { useSearch } from "~/composables/use-search"
import { useMediaStore } from "~/stores/media"
-import { isSearchTypeSupported, useSearchStore } from "~/stores/search"
+import { useSearchStore } from "~/stores/search"
import VLogoButton from "~/components/VHeader/VLogoButton.vue"
import VInputModal from "~/components/VModal/VInputModal.vue"
@@ -165,8 +163,6 @@ export default defineComponent({
const mediaStore = useMediaStore()
const searchStore = useSearchStore()
- const i18n = useI18n()
- const router = useRouter()
const searchBarIsActive = ref(false)
const contentSettingsOpen = ref(false)
@@ -175,65 +171,11 @@ export default defineComponent({
const isFetching = computed(() => mediaStore.fetchState.isFetching)
- const resultsCount = computed(() => mediaStore.resultCount)
- const { getI18nCount } = useI18nResultsCount()
- /**
- * Additional text at the end of the search bar.
- * Shows the loading state or result count.
- */
- const searchStatus = computed<string>(() => {
- if (searchStore.searchTerm === "") return ""
- if (isFetching.value) return i18n.t("header.loading").toString()
- return getI18nCount(resultsCount.value)
- })
+ const { updateSearchState, searchTerm, searchStatus } = useSearch()
- const localSearchTerm = ref(searchStore.searchTerm)
- let searchTermChanged = computed(() => {
- return searchStore.searchTerm !== localSearchTerm.value
- })
- /**
- * Search term has a getter and setter to be used as a v-model.
- * To prevent sending unnecessary requests, we also keep track of whether
- * the search term was changed.
- */
- const searchTerm = computed({
- get: () => localSearchTerm.value,
- set: (value: string) => {
- localSearchTerm.value = value
- },
- })
-
- /**
- * 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).
- * - search term changed:
- * - on a search route: 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.
- */
const handleSearch = async () => {
window.scrollTo({ top: 0, left: 0, behavior: "auto" })
- const mediaStore = useMediaStore()
- const searchStore = useSearchStore()
- const searchType = searchStore.searchType
- if (!searchTermChanged.value || searchTerm.value === "") return
- if (searchTermChanged.value) {
- await mediaStore.clearMedia()
-
- searchStore.setSearchTerm(searchTerm.value)
- searchStore.setSearchType(searchType)
- }
-
- if (isSearchTypeSupported(searchType)) {
- router.push(searchStore.getSearchPath({ type: searchType }))
- }
+ updateSearchState()
deactivate()
}
@@ -255,8 +197,8 @@ export default defineComponent({
})
} else {
isRecentSearchesModalOpen.value = false
- if (localSearchTerm.value === "" && searchStore.searchTerm !== "") {
- localSearchTerm.value = searchStore.searchTerm
+ if (searchTerm.value === "" && searchStore.searchTerm !== "") {
+ searchTerm.value = searchStore.searchTerm
}
}
})
diff --git a/src/components/VHeaderOld/VHeaderMenu.vue b/src/components/VHeaderOld/VHeaderMenu.vue
index 0eb20a692..2d0cddd9a 100644
--- a/src/components/VHeaderOld/VHeaderMenu.vue
+++ b/src/components/VHeaderOld/VHeaderMenu.vue
@@ -1,15 +1,7 @@
<script lang="ts">
-import {
- computed,
- defineComponent,
- ref,
- useRouter,
-} from "@nuxtjs/composition-api"
+import { computed, defineComponent, ref } from "@nuxtjs/composition-api"
-import { ALL_MEDIA, supportedMediaTypes, SearchType } from "~/constants/media"
import useSearchType from "~/composables/use-search-type"
-import { useMediaStore } from "~/stores/media"
-import { useSearchStore } from "~/stores/search"
import { useUiStore } from "~/stores/ui"
import VMobileMenuModal from "~/components/VContentSwitcherOld/VMobileMenuModal.vue"
@@ -36,34 +28,18 @@ export default defineComponent({
typeof VMobileMenuModal | typeof VSearchTypePopoverOld
> | null>(null)
- const router = useRouter()
-
- const mediaStore = useMediaStore()
- const searchStore = useSearchStore()
const uiStore = useUiStore()
const isDesktopLayout = computed(() => uiStore.isDesktopLayout)
const content = useSearchType()
- const selectSearchType = async (type: SearchType) => {
+ /**
+ * Clicking on the search type link navigates to the search path,
+ * so we only need to close the menu modal here.
+ */
+ const selectSearchType = () => {
menuModalRef.value?.closeMenu()
- content.setActiveType(type)
-
- router.push(searchStore.getSearchPath({ type }))
-
- function typeWithoutMedia(mediaType) {
- return mediaStore.resultCountsPerMediaType[mediaType] === 0
- }
-
- const shouldFetchMedia =
- type === ALL_MEDIA
- ? supportedMediaTypes.every((type) => typeWithoutMedia(type))
- : typeWithoutMedia(type)
-
- if (shouldFetchMedia) {
- await mediaStore.fetchMedia()
- }
}
return {
diff --git a/src/components/VHeaderOld/VHeaderOld.vue b/src/components/VHeaderOld/VHeaderOld.vue
index 0f388fea0..d59fbe0d5 100644
--- a/src/components/VHeaderOld/VHeaderOld.vue
+++ b/src/components/VHeaderOld/VHeaderOld.vue
@@ -49,21 +49,13 @@
</template>
<script lang="ts">
-import {
- computed,
- defineComponent,
- inject,
- ref,
- useRouter,
-} from "@nuxtjs/composition-api"
-
-import { ALL_MEDIA } from "~/constants/media"
+import { computed, defineComponent, inject, ref } from "@nuxtjs/composition-api"
+
import { useMatchSearchRoutes } from "~/composables/use-match-routes"
-import { useI18n } from "~/composables/use-i18n"
-import { useI18nResultsCount } from "~/composables/use-i18n-utilities"
+import { useSearch } from "~/composables/use-search"
import { useMediaStore } from "~/stores/media"
-import { isSearchTypeSupported, useSearchStore } from "~/stores/search"
+import { useSearchStore } from "~/stores/search"
import { useUiStore } from "~/stores/ui"
import { IsSidebarVisibleKey } from "~/types/provides"
@@ -90,9 +82,6 @@ export default defineComponent({
VSearchBarOld,
},
setup() {
- const i18n = useI18n()
- const router = useRouter()
-
const mediaStore = useMediaStore()
const searchStore = useSearchStore()
const uiStore = useUiStore()
@@ -132,70 +121,13 @@ export default defineComponent({
const isFetching = computed(() => mediaStore.fetchState.isFetching)
- const resultsCount = computed(() => mediaStore.resultCount)
- const { getI18nCount } = useI18nResultsCount()
- /**
- * Additional text at the end of the search bar.
- * Shows the loading state or result count.
- */
- const searchStatus = computed(() => {
- if (!isSearchRoute.value || searchStore.searchTerm === "") return ""
- if (isFetching.value) return i18n.t("header.loading")
- return getI18nCount(resultsCount.value)
- })
-
- const localSearchTerm = ref(searchStore.searchTerm)
- let searchTermChanged = computed(() => {
- return searchStore.searchTerm !== localSearchTerm.value
- })
- /**
- * Search term has a getter and setter to be used as a v-model.
- * To prevent sending unnecessary requests, we also keep track of whether
- * the search term was changed.
- */
- const searchTerm = computed({
- get: () => localSearchTerm.value,
- set: (value: string) => {
- localSearchTerm.value = value
- },
- })
+ const { updateSearchState, searchTerm, searchStatus } = useSearch()
- /**
- * 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).
- * - search term changed:
- * - on a search route: 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.
- */
- const handleSearch = async () => {
+ const handleSearch = () => {
window.scrollTo({ top: 0, left: 0, behavior: "auto" })
- const searchType = isSearchRoute.value
- ? searchStore.searchType
- : ALL_MEDIA
- if (
- isSearchRoute.value &&
- (!searchTermChanged.value || searchTerm.value === "")
- )
- return
- if (searchTermChanged.value) {
- await mediaStore.clearMedia()
-
- searchStore.setSearchTerm(searchTerm.value)
- searchStore.setSearchType(searchType)
- }
document.activeElement?.blur()
- if (isSearchTypeSupported(searchType)) {
- router.push(searchStore.getSearchPath({ type: searchType }))
- }
+ updateSearchState()
}
const areFiltersDisabled = computed(
() => !searchStore.searchTypeIsSupported
diff --git a/src/composables/use-i18n-utilities.ts b/src/composables/use-i18n-utilities.ts
index c12f04a4d..596454b0d 100644
--- a/src/composables/use-i18n-utilities.ts
+++ b/src/composables/use-i18n-utilities.ts
@@ -18,6 +18,8 @@ export function useI18nResultsCount() {
const i18n = useI18n()
const getLocaleFormattedNumber = useGetLocaleFormattedNumber()
+ const getLoading = () => i18n.t("header.loading").toString()
+
const getI18nCount = (resultsCount: number) => {
const countKey =
resultsCount === 0
@@ -31,5 +33,6 @@ export function useI18nResultsCount() {
}
return {
getI18nCount,
+ getLoading,
}
}
diff --git a/src/composables/use-search.ts b/src/composables/use-search.ts
new file mode 100644
index 000000000..9276cade1
--- /dev/null
+++ b/src/composables/use-search.ts
@@ -0,0 +1,95 @@
+import { computed, useRouter, watch } from "@nuxtjs/composition-api"
+
+import { useSearchStore } from "~/stores/search"
+import { useMediaStore } from "~/stores/media"
+import { useI18nResultsCount } from "~/composables/use-i18n-utilities"
+import {
+ useMatchSearchRoutes,
+ useMatchSingleResultRoutes,
+} from "~/composables/use-match-routes"
+import { ALL_MEDIA } from "~/constants/media"
+
+export const useSearch = () => {
+ const mediaStore = useMediaStore()
+ const searchStore = useSearchStore()
+ const router = useRouter()
+
+ const { matches: isSearchRoute } = useMatchSearchRoutes()
+ const { matches: isSingleResultRoute } = useMatchSingleResultRoutes()
+
+ const storeSearchTerm = computed(() => searchStore.searchTerm)
+
+ /**
+ * To update the local search term when the route changes, when, for example,
+ * the user clicks the back button, we need to watch the store search term.
+ */
+ watch(storeSearchTerm, (newSearchTerm) => {
+ searchTerm.value = newSearchTerm
+ })
+
+ /**
+ * Search term has a getter and setter to be used as a v-model.
+ * To prevent sending unnecessary requests, we also keep track of whether
+ * the search term was changed.
+ */
+ const searchTerm = computed({
+ get: () => searchStore.localSearchTerm,
+ set: (value: string) => {
+ searchStore.localSearchTerm = value
+ },
+ })
+
+ const searchTermChanged = computed(
+ () => searchStore.searchTerm !== searchTerm.value
+ )
+
+ /**
+ * Called when the 'search' button is clicked in the header.
+ *
+ * No op if the search term is blank.
+ * If the search term hasn't changed from the store version, we do nothing on
+ * a search route. On other routes, we set the search type to 'All content' and
+ * reset the media.
+ *
+ * Then, we update the search term, and update the path.
+ *
+ * Updating the path causes the `search.vue` page's route watcher
+ * to run and fetch new media.
+ */
+ const updateSearchState = () => {
+ if (searchTerm.value === "") return
+ if (!searchTermChanged.value && isSearchRoute.value) return
+ // With the old header, content pages have a search bar.
+ // Reset the search type to All media when searched from content pages.
+ // TODO: remove when new_header is done
+ if (!isSearchRoute.value && isSingleResultRoute.value) {
+ searchStore.setSearchType(ALL_MEDIA)
+ mediaStore.clearMedia()
+ }
+
+ const searchPath = searchStore.updateSearchPath({
+ searchTerm: searchTerm.value,
+ })
+ router.push(searchPath)
+ }
+
+ const isFetching = computed(() => mediaStore.fetchState.isFetching)
+ const resultsCount = computed(() => mediaStore.resultCount)
+
+ const { getI18nCount, getLoading } = useI18nResultsCount()
+ /**
+ * Additional text at the end of the search bar.
+ * Shows the loading state or result count.
+ */
+ const searchStatus = computed(() => {
+ if (searchStore.searchTerm === "") return ""
+ if (isFetching.value) return getLoading()
+ return getI18nCount(resultsCount.value)
+ })
+
+ return {
+ updateSearchState,
+ searchTerm,
+ searchStatus,
+ }
+}
diff --git a/src/pages/search.vue b/src/pages/search.vue
index 1b0c3bcf5..ab25babb9 100644
--- a/src/pages/search.vue
+++ b/src/pages/search.vue
@@ -54,6 +54,18 @@ export default defineComponent({
VSearchGrid,
VSkipToContentContainer,
},
+ beforeRouteEnter(to, from, next) {
+ /**
+ * The order in which beforeRouteEnter and middleware are called is indeterminate.
+ * We need to make sure that query `q` exists before checking if it matches
+ * the store searchTerm.
+ */
+ const searchStore = useSearchStore()
+ if (to.query.q && to.query.q !== searchStore.searchTerm) {
+ searchStore.setSearchTerm(to.query.q)
+ }
+ next()
+ },
middleware({ route, redirect }) {
/**
* This anonymous middleware redirects any search without a query to the homepage.
diff --git a/src/stores/search.ts b/src/stores/search.ts
index e673c8447..b6bc3e81c 100644
--- a/src/stores/search.ts
+++ b/src/stores/search.ts
@@ -32,9 +32,10 @@ import {
mediaFilterKeys,
mediaUniqueFilterKeys,
} from "~/constants/filters"
-import { useProviderStore } from "~/stores/provider"
+import { useProviderStore } from "~/stores/provider"
import { useFeatureFlagStore } from "~/stores/feature-flag"
+import { useMediaStore } from "~/stores/media"
import type { Ref } from "@nuxtjs/composition-api"
@@ -50,6 +51,7 @@ export interface SearchState {
searchType: SearchType
recentSearches: Ref<string[]>
searchTerm: string
+ localSearchTerm: string
filters: Filters
}
@@ -78,6 +80,7 @@ export const useSearchStore = defineStore("search", {
state: (): SearchState => ({
searchType: ALL_MEDIA,
searchTerm: "",
+ localSearchTerm: "",
recentSearches: useStorage<string[]>("recent-searches", []),
filters: deepClone(filterData as DeepWriteable<typeof filterData>),
}),
@@ -204,8 +207,14 @@ export const useSearchStore = defineStore("search", {
},
setSearchTerm(term: string) {
const formattedTerm = term.trim()
+ if (this.searchTerm === formattedTerm) return
this.searchTerm = formattedTerm
+ this.localSearchTerm = formattedTerm
+
this.addRecentSearch(formattedTerm)
+
+ const mediaStore = useMediaStore()
+ mediaStore.clearMedia()
},
/**
* This method need not exist and is only used to fix an odd
@@ -231,7 +240,7 @@ export const useSearchStore = defineStore("search", {
* Add the latest search to the top of the stack,
* then add the existing items, making sure not to exceed
* the max count, and removing existing occurrences of the
- * most latest search term, if there are any.
+ * latest search term, if there are any.
*/
this.recentSearches = [
search,
diff --git a/test/playwright/e2e/search-navigation.spec.ts b/test/playwright/e2e/search-navigation.spec.ts
index 9b5bb1593..fd83bff66 100644
--- a/test/playwright/e2e/search-navigation.spec.ts
+++ b/test/playwright/e2e/search-navigation.spec.ts
@@ -4,6 +4,7 @@ import {
enableNewHeader,
goToSearchTerm,
openFilters,
+ searchFromHeader,
t,
} from "~~/test/playwright/utils/navigation"
import { mockProviderApis } from "~~/test/playwright/utils/route"
@@ -63,6 +64,19 @@ test.describe("search history navigation", () => {
).toBe(true)
})
+ test("should update search term when back button is clicked", async ({
+ page,
+ }) => {
+ await goToSearchTerm(page, "galah")
+
+ await searchFromHeader(page, "cat")
+ expect(await page.locator('input[name="q"]').inputValue()).toBe("cat")
+
+ await page.goBack()
+ await page.waitForSelector('a:has-text("See all images")')
+ expect(await page.locator('input[name="q"]').inputValue()).toBe("galah")
+ })
+
test("navigates to the image detail page correctly", async ({ page }) => {
await goToSearchTerm(page, "honey")
const figure = page.locator("figure").first()
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-2xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-2xl-linux.png
index 991065a9e..6ec8171c9 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-2xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-lg-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-lg-linux.png
index 599142fa5..400d67a72 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-lg-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-lg-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-xl-linux.png
index b5bca717f..dce6c7344 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-ltr-xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-2xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-2xl-linux.png
index 200903774..73af74b85 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-2xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-2xl-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-lg-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-lg-linux.png
index fee3c6692..e1cabca95 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-lg-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-lg-linux.png differ
diff --git a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-xl-linux.png b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-xl-linux.png
index f8a007cb7..e5464ac52 100644
Binary files a/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-xl-linux.png and b/test/playwright/visual-regression/pages/homepage.spec.ts-snapshots/index-rtl-xl-linux.png differ