Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Lower the number of columns when sidebar is open (#1178)
Olga Bulat64b6c0ed5476
diff --git a/frontend/src/components/VSearchResultsGrid/VAllResultsGrid.vue b/frontend/src/components/VSearchResultsGrid/VAllResultsGrid.vueindex 471f3447a..f1092a206 100644--- a/frontend/src/components/VSearchResultsGrid/VAllResultsGrid.vue+++ b/frontend/src/components/VSearchResultsGrid/VAllResultsGrid.vue@@ -2,7 +2,12 @@<div><divv-if="!noResults"- class="results-grid mb-4 grid grid-cols-2 gap-4 lg:grid-cols-5 2xl:grid-cols-6"+ class="results-grid mb-4 grid gap-4"+ :class="+ isSidebarVisible+ ? 'grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4'+ : 'grid-cols-2 lg:grid-cols-5 2xl:grid-cols-6'+ "><VContentLinkv-for="[mediaType, count] in resultCounts"@@ -26,7 +31,12 @@/><divv-else- class="results-grid grid grid-cols-2 gap-4 lg:grid-cols-5 2xl:grid-cols-6"+ class="results-grid grid grid-cols-2 gap-4"+ :class="+ isSidebarVisible+ ? 'lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5'+ : 'sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6'+ "><div v-for="item in allMedia" :key="item.id"><VImageCell@@ -119,6 +129,8 @@ export default defineComponent({uiStore.hideInstructionsSnackbar()}+ const isSidebarVisible = computed(() => uiStore.isFilterVisible)+return {searchTerm,isError,@@ -131,6 +143,8 @@ export default defineComponent({contentLinkPath,+ isSidebarVisible,+isSnackbarVisible,showSnackbar,hideSnackbar,diff --git a/frontend/test/playwright/utils/navigation.ts b/frontend/test/playwright/utils/navigation.tsindex d26b58391..83ba47c7f 100644--- a/frontend/test/playwright/utils/navigation.ts+++ b/frontend/test/playwright/utils/navigation.ts@@ -383,6 +383,7 @@ export const openFirstResult = async (page: Page, mediaType: MediaType) => {await firstResult.click({ position: { x: 32, y: 32 } })await scrollDownAndUp(page)await page.waitForURL(firstResultHref)+ await page.mouse.move(0, 0)}/**diff --git a/frontend/test/playwright/visual-regression/components/external-sources-section.spec.ts-snapshots/external-all-sources-popover-ltr-png-sm-linux.png b/frontend/test/playwright/visual-regression/components/external-sources-section.spec.ts-snapshots/external-all-sources-popover-ltr-png-sm-linux.pngindex 8f3f84b31..ac85aabc6 100644Binary files a/frontend/test/playwright/visual-regression/components/external-sources-section.spec.ts-snapshots/external-all-sources-popover-ltr-png-sm-linux.png and b/frontend/test/playwright/visual-regression/components/external-sources-section.spec.ts-snapshots/external-all-sources-popover-ltr-png-sm-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 0955191b9..ca97fff68 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-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.pngindex d1b724942..4994b9d87 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-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 d5dc1bd19..fc8d9d210 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.spec.ts-snapshots/search-page-rtl-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-page-rtl-lg-linux.pngindex 3e13b6c26..2577350d0 100644Binary files a/frontend/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-page-rtl-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-page-rtl-lg-linux.png differ