Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Switch to internal header on single results (#981)
Zack Kridab2aba3c4c62e
diff --git a/frontend/src/layouts/content-layout.vue b/frontend/src/layouts/content-layout.vueindex 2188bdc6b..3d7a5699f 100644--- a/frontend/src/layouts/content-layout.vue+++ b/frontend/src/layouts/content-layout.vue@@ -49,10 +49,7 @@ import { useContext } from "@nuxtjs/composition-api"import { PortalTarget as VTeleportTarget } from "portal-vue"import { useWindowScroll } from "~/composables/use-window-scroll"-import {- useMatchSearchRoutes,- useMatchSingleResultRoutes,-} from "~/composables/use-match-routes"+import { useMatchSearchRoutes } from "~/composables/use-match-routes"import { useLayout } from "~/composables/use-layout"import { useUiStore } from "~/stores/ui"@@ -102,13 +99,11 @@ export default defineComponent({})const { matches: isSearchRoute } = useMatchSearchRoutes()- const { matches: isSingleResultRoute } = useMatchSingleResultRoutes()const nuxtError = computed(() => app.nuxt.err)const isSearchHeader = computed(- () =>- !nuxtError.value && (isSearchRoute.value || isSingleResultRoute.value)+ () => !nuxtError.value && isSearchRoute.value)const isDesktopLayout = computed(() => uiStore.isDesktopLayout)diff --git a/frontend/test/playwright/e2e/search-navigation.spec.ts b/frontend/test/playwright/e2e/search-navigation.spec.tsindex 47df42eac..19f28c8b2 100644--- a/frontend/test/playwright/e2e/search-navigation.spec.ts+++ b/frontend/test/playwright/e2e/search-navigation.spec.ts@@ -153,71 +153,3 @@ test.describe("search query param is set on a single page reulst", () => {expect(query).toEqual("cat")})})--test.describe(- "search term inside header should be set correctly when navigating back from a new search",- () => {- test.beforeEach(async ({ page }) => {- // search for cat- await page.goto(`/search?q=cat`)- })-- /**- * # search for cat- * # navigate to the first image type result- * # search for dog- * # go back to single result page of cat- * # search term inside the header should be set to cat- */- test("search term should be set to the search query param on an image type single result page", async ({- page,- }) => {- await openFirstResult(page, "image")-- let searchInput = page.locator('header input[type="search"]')- await searchInput.clear()-- await searchInput.type("dog")-- await Promise.all([- page.waitForNavigation(),- await page.getByRole("button", { name: "Search" }).click(),- ])-- await page.waitForLoadState("load")- await page.goBack()-- searchInput = page.locator('header input[type="search"]')- const queryParam = page.url().substring(page.url().indexOf("=") + 1)-- expect(queryParam).toEqual(await searchInput.inputValue())- })-- /**- * same test as above, but the new serach is performed from an audio type single result page- */- test("search term should be set to the search query param on an audio type single result page", async ({- page,- }) => {- await openFirstResult(page, "audio")-- let searchInput = page.locator('header input[type="search"]')- await searchInput.clear()-- await searchInput.type("dog")-- await Promise.all([- page.waitForNavigation(),- await page.getByRole("button", { name: "Search" }).click(),- ])-- await page.waitForLoadState("load")- await page.goBack()-- searchInput = page.locator('header input[type="search"]')- const queryParam = page.url().substring(page.url().indexOf("=") + 1)-- expect(queryParam).toEqual(await searchInput.inputValue())- })- }-)diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.pngindex cf6b9c436..316870384 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.pngindex 987b245a6..6c388af92 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.pngindex f052f276a..4ba2ccfe9 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.pngindex 6399a11e5..5b232375a 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.pngindex 2bb38af8d..92fc66909 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.pngindex 62ae999f4..87aec9a79 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.pngindex c5c0574d8..7b4dcbe1c 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.pngindex 5ffc77bf9..41e44c5d6 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.pngindex d6e36f028..e401a6942 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.pngindex 9e553764b..5d81f25e3 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.pngindex 46eb83aa4..0205cd199 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.pngindex 24fced96c..54e863ea9 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-2xl-linux.pngindex 00c6f6a23..9dbb98a67 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-2xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-lg-linux.pngindex ab656534c..a30ba90c4 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-lg-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-md-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-md-linux.pngindex e6710afe7..d9b99361b 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-md-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-md-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-sm-linux.pngindex 22b38cc31..e39807e80 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-sm-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xl-linux.pngindex 4b8eecc53..9705c9d11 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xs-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xs-linux.pngindex c8e21b99b..8a7f5df14 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-ltr-from-search-results-xs-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-2xl-linux.pngindex 517534fa0..6ac8f1d3d 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-2xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-lg-linux.pngindex b97f268b7..00a8ceda5 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-lg-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-md-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-md-linux.pngindex ed6256ec1..f19f29af4 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-md-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-md-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-sm-linux.pngindex b19876e31..004cb45b9 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-sm-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xl-linux.pngindex 944255c34..210973aeb 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xs-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xs-linux.pngindex f30283660..067135f69 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/image-rtl-from-search-results-xs-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/ltr-full-page-report-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/ltr-full-page-report-sm-linux.pngindex e43330fdc..63e85da7b 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/ltr-full-page-report-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/ltr-full-page-report-sm-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/ltr-full-page-report-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/ltr-full-page-report-xl-linux.pngindex 601bad435..53336e50b 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/ltr-full-page-report-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/ltr-full-page-report-xl-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/rtl-full-page-report-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/rtl-full-page-report-sm-linux.pngindex 9e2a91ddb..75f3ed43e 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/rtl-full-page-report-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/rtl-full-page-report-sm-linux.png differdiff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/rtl-full-page-report-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/rtl-full-page-report-xl-linux.pngindex 75636d7a3..533e28a9f 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/rtl-full-page-report-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/rtl-full-page-report-xl-linux.png differ