diff --git a/frontend/src/components/VImageCell/VImageCell.vue b/frontend/src/components/VImageCell/VImageCell.vue
index fab2eea00c9..b041940ab9f 100644
--- a/frontend/src/components/VImageCell/VImageCell.vue
+++ b/frontend/src/components/VImageCell/VImageCell.vue
@@ -1,10 +1,14 @@
-
+
@@ -12,22 +16,18 @@
itemprop="image"
itemscope
itemtype="https://schema.org/ImageObject"
- class="absolute w-full rounded-sm"
- :class="{ 'relative aspect-square': isSquare }"
- :style="styles.figure"
+ class="grid w-full rounded-sm"
+ :class="{ 'aspect-square': isSquare }"
>
{{
- shouldBlur
- ? $t("sensitiveContent.title.image").toString()
- : image.title
+ shouldBlur ? `${$t("sensitiveContent.title.image")}` : image.title
}}
-
+
-
@@ -116,6 +122,7 @@ export default defineComponent({
const imageUrl = computed(() => {
// TODO: check if we have blurry panorama thumbnails
+ // Use the main image file and not the thumbnails for panorama images to
// fix for blurry panorama thumbnails, introduced in
// https://github.com/cc-archive/cccatalog-frontend/commit/4c9bdac5
if (isPanorama.value) {
@@ -199,3 +206,15 @@ export default defineComponent({
},
})
+
+
diff --git a/frontend/src/components/VImageCell/meta/VImageCell.stories.mdx b/frontend/src/components/VImageCell/meta/VImageCell.stories.mdx
index f47b4c2783d..cbecc80d03a 100644
--- a/frontend/src/components/VImageCell/meta/VImageCell.stories.mdx
+++ b/frontend/src/components/VImageCell/meta/VImageCell.stories.mdx
@@ -17,7 +17,7 @@ export const Template = (args, { argTypes }) => ({
template: `
({
parameters={{
viewport: { defaultViewport: "sm" },
}}
- args={{
- aspectRatio: "intrinsic",
- image: image,
- }}
argTypes={{
aspectRatio: {
options: ["square", "intrinsic"],
@@ -51,6 +47,10 @@ export const Template = (args, { argTypes }) => ({
control: { type: "object" },
},
}}
+ args={{
+ aspectRatio: "intrinsic",
+ image: { ...image, url: base64Image },
+ }}
>
{Template.bind({})}
diff --git a/frontend/src/components/VSearchResultsGrid/VImageGrid.vue b/frontend/src/components/VSearchResultsGrid/VImageGrid.vue
index e1623710275..4d24a918a4b 100644
--- a/frontend/src/components/VSearchResultsGrid/VImageGrid.vue
+++ b/frontend/src/components/VSearchResultsGrid/VImageGrid.vue
@@ -1,5 +1,5 @@
-
+
{
+const getImgAspectRatio = (aspect: number) => {
if (aspect > maxAspect) return maxAspect
if (aspect < minAspect) return minAspect
return aspect
@@ -30,46 +30,30 @@ export const useImageCellSize = ({
isSquare.value ? squareSize : imageSize.width || defaultImgSize
)
- const imageAspect = computed(() => imgWidth.value / imgHeight.value)
- const isPanorama = computed(() => imageAspect.value > panoramaAspect)
+ const naturalAspectRatio = computed(() => imgWidth.value / imgHeight.value)
+ const isPanorama = computed(() => naturalAspectRatio.value > panoramaAspect)
/**
- * Returns the style declarations for container, figure and i padding.
+ * Returns the style declarations for the container width, aspect ratio and flex-grow value.
* For the square cell, the styles are empty.
*/
const styles = computed(() => {
- const aspect = imageAspect.value
-
- if (isSquare.value)
- return {
- container: "",
- figure: "",
- iPadding: "",
- }
-
- const containerAspect = getContainerAspect(aspect)
- const containerWidth = containerAspect * widthBasis
-
- let imageWidth, imageLeft, imageTop
-
- if (aspect < maxAspect) {
- imageWidth = 100
- imageLeft = 0
- } else {
- imageWidth = (aspect / maxAspect) * 100
- imageLeft = ((aspect - maxAspect) / maxAspect) * -50
+ const styles = {}
+ if (isSquare.value) {
+ return styles
}
- if (aspect > minAspect) {
- imageTop = 0
- } else {
- imageTop = ((minAspect - aspect) / (aspect * minAspect * minAspect)) * -50
- }
+ const aspect = naturalAspectRatio.value
+ /**
+ * The aspect-ratio for `img` is clamped between the min and max aspect ratios.
+ */
+ const imgAspectRatio = getImgAspectRatio(aspect)
+ const containerWidth = Math.round(imgAspectRatio * widthBasis)
return {
- container: `width: ${containerWidth}px;flex-grow: ${containerWidth}`,
- figure: `width: ${imageWidth}%; top: ${imageTop}%; left:${imageLeft}%;`,
- iPadding: `padding-bottom:${(1 / containerAspect) * 100}%`,
+ "--container-width": `${containerWidth}px`,
+ "--container-grow": containerWidth,
+ "--img-aspect-ratio": imgAspectRatio,
}
})
diff --git a/frontend/tailwind.config.ts b/frontend/tailwind.config.ts
index 227f34cfb21..222b09af7f0 100644
--- a/frontend/tailwind.config.ts
+++ b/frontend/tailwind.config.ts
@@ -229,6 +229,7 @@ export default {
},
outlineWidth: {
1.5: "1.5px",
+ 3: "3px",
},
typography: (theme: PluginAPI["theme"]) => ({
DEFAULT: {
diff --git a/frontend/test/playwright/utils/breakpoints.ts b/frontend/test/playwright/utils/breakpoints.ts
index ac2575511ba..df9b22d11c5 100644
--- a/frontend/test/playwright/utils/breakpoints.ts
+++ b/frontend/test/playwright/utils/breakpoints.ts
@@ -155,6 +155,7 @@ const describeEachMobileWithoutMd = describeEachBreakpoint(
mobileBreakpoints.filter((b) => b !== "md")
)
const describeMobileAndDesktop = describeEachBreakpoint(["sm", "xl"])
+const describeMobileXsAndDesktop = describeEachBreakpoint(["xs", "xl"])
export default {
...breakpointTests,
@@ -168,4 +169,6 @@ export default {
// For testing functionality in e2e tests, we need to test mobile and desktop screens.
// Having two breakpoints should be enough and should save testing time.
describeMobileAndDesktop,
+ // All tests
+ describeMobileXsAndDesktop,
}
diff --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.png
index 100865bc8a6..cbb6d36f4eb 100644
Binary 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 differ
diff --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.png
index b9bfdc02090..d9f9c88a8a6 100644
Binary 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 differ
diff --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.png
index 964a84e9564..812314cd4ed 100644
Binary 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 differ
diff --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.png
index 2901f982b98..70aec20342f 100644
Binary 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 differ
diff --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.png
index 3dc48e53848..b07ae68ce50 100644
Binary 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 differ
diff --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.png
index 52a12de7d18..64672a4ddc9 100644
Binary 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 differ
diff --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.png
index 82076288339..cf731feff09 100644
Binary 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 differ
diff --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.png
index 00c90dc2552..9e936e6de19 100644
Binary 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 differ
diff --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.png
index 72d249ad245..49d4578a1e4 100644
Binary 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 differ
diff --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.png
index cf981653468..800c778a82d 100644
Binary 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 differ
diff --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.png
index 131b945f735..09eea17e1d1 100644
Binary 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 differ
diff --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.png
index 63198f9a6f0..4996b89e140 100644
Binary 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 differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts
index 6f29b1e1994..abf16c86801 100644
--- a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts
+++ b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts
@@ -2,6 +2,8 @@ import { expect, test } from "@playwright/test"
import { makeGotoWithArgs } from "~~/test/storybook/utils/args"
+import breakpoints from "~~/test/playwright/utils/breakpoints"
+
import type { AspectRatio } from "~/types/media"
const imageCell = "a[itemprop='contentUrl']"
@@ -11,45 +13,51 @@ const screenshotEl = ".sb-main-padded"
test.describe.configure({ mode: "parallel" })
-test.describe("VImageCell", () => {
- const gotoWithArgs = makeGotoWithArgs("components-vimagecell--v-image-cell")
- const aspectRatios: AspectRatio[] = ["square", "intrinsic"]
-
- for (const ratio of aspectRatios) {
- test(`${ratio} loaded`, async ({ page }) => {
- await gotoWithArgs(page, { aspectRatio: ratio })
- const mainEl = page.locator(imageCell)
- await expect(mainEl).toBeVisible()
- expect(await page.locator(screenshotEl).screenshot()).toMatchSnapshot({
- name: `v-image-cell-${ratio}-loaded.png`,
+breakpoints.describeMobileXsAndDesktop(({ expectSnapshot }) => {
+ test.describe("VImageCell", () => {
+ const gotoWithArgs = makeGotoWithArgs("components-vimagecell--v-image-cell")
+ const aspectRatios: AspectRatio[] = ["square", "intrinsic"]
+
+ for (const ratio of aspectRatios) {
+ test(`${ratio} loaded`, async ({ page }) => {
+ await gotoWithArgs(page, { aspectRatio: ratio })
+ const mainEl = page.locator(imageCell)
+ await expect(mainEl).toBeVisible()
+ await expectSnapshot(
+ `v-image-cell-${ratio}-loaded`,
+ page.locator(screenshotEl)
+ )
})
- })
-
- test(`${ratio} focused`, async ({ page }) => {
- await gotoWithArgs(page, { aspectRatio: ratio })
- await page.focus(imageCell)
- await page.locator(imageCell).click()
- expect(await page.locator(screenshotEl).screenshot()).toMatchSnapshot({
- name: `v-image-cell-${ratio}-focused.png`,
+
+ test(`${ratio} focused`, async ({ page }) => {
+ await gotoWithArgs(page, { aspectRatio: ratio })
+ await page.focus(imageCell)
+ await page.locator(imageCell).click()
+ await expectSnapshot(
+ `v-image-cell-${ratio}-focused`,
+ page.locator(screenshotEl)
+ )
})
- })
- test(`${ratio} hovered`, async ({ page }) => {
- await gotoWithArgs(page, { aspectRatio: ratio })
- await page.hover(imageCell)
- expect(await page.locator(screenshotEl).screenshot()).toMatchSnapshot({
- name: `v-image-cell-${ratio}-hovered.png`,
+ test(`${ratio} hovered`, async ({ page }) => {
+ await gotoWithArgs(page, { aspectRatio: ratio })
+ await page.hover(imageCell)
+ await expectSnapshot(
+ `v-image-cell-${ratio}-hovered`,
+ page.locator(screenshotEl)
+ )
})
- })
-
- test(`${ratio} focused hovered`, async ({ page }) => {
- await gotoWithArgs(page, { aspectRatio: ratio })
- await page.focus(imageCell)
- await page.hover(imageCell)
- await page.locator(imageCell).click()
- expect(await page.locator(screenshotEl).screenshot()).toMatchSnapshot({
- name: `v-image-cell-${ratio}-focused-hovered.png`,
+
+ test(`${ratio} focused hovered`, async ({ page }) => {
+ await gotoWithArgs(page, { aspectRatio: ratio })
+ await page.focus(imageCell)
+ await page.hover(imageCell)
+ await page.locator(imageCell).click()
+ await expectSnapshot(
+ `v-image-cell-${ratio}-focused-hovered`,
+ page.locator(screenshotEl)
+ )
})
- })
- }
+ }
+ })
})
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-linux.png
deleted file mode 100644
index 4a21e455736..00000000000
Binary files a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-linux.png and /dev/null differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-xl-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-xl-linux.png
new file mode 100644
index 00000000000..5bd7d73ad94
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-xs-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-xs-linux.png
new file mode 100644
index 00000000000..1e7d268d4bf
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-hovered-xs-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-linux.png
deleted file mode 100644
index 4a21e455736..00000000000
Binary files a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-linux.png and /dev/null differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-xl-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-xl-linux.png
new file mode 100644
index 00000000000..5bd7d73ad94
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-xs-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-xs-linux.png
new file mode 100644
index 00000000000..1e7d268d4bf
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-focused-xs-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-hovered-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-hovered-xl-linux.png
similarity index 100%
rename from frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-hovered-linux.png
rename to frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-hovered-xl-linux.png
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-hovered-xs-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-hovered-xs-linux.png
new file mode 100644
index 00000000000..778a40063b0
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-hovered-xs-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-loaded-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-loaded-xl-linux.png
similarity index 100%
rename from frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-loaded-linux.png
rename to frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-loaded-xl-linux.png
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-loaded-xs-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-loaded-xs-linux.png
new file mode 100644
index 00000000000..4dd1bc6cf35
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-intrinsic-loaded-xs-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-linux.png
deleted file mode 100644
index 30b261001f7..00000000000
Binary files a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-linux.png and /dev/null differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-xl-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-xl-linux.png
new file mode 100644
index 00000000000..140cf6105d5
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-xs-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-xs-linux.png
new file mode 100644
index 00000000000..957c85aaee3
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-hovered-xs-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-linux.png
deleted file mode 100644
index 30b261001f7..00000000000
Binary files a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-linux.png and /dev/null differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-xl-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-xl-linux.png
new file mode 100644
index 00000000000..140cf6105d5
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-xs-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-xs-linux.png
new file mode 100644
index 00000000000..957c85aaee3
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-focused-xs-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-linux.png
deleted file mode 100644
index 5485a3ea824..00000000000
Binary files a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-linux.png and /dev/null differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-xl-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-xl-linux.png
new file mode 100644
index 00000000000..af5da0b7342
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-xs-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-xs-linux.png
new file mode 100644
index 00000000000..c2d3aed2780
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-hovered-xs-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-linux.png
deleted file mode 100644
index 22ac8df2576..00000000000
Binary files a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-linux.png and /dev/null differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-xl-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-xl-linux.png
new file mode 100644
index 00000000000..7aad81c572d
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-xl-linux.png differ
diff --git a/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-xs-linux.png b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-xs-linux.png
new file mode 100644
index 00000000000..b9c8c0f544b
Binary files /dev/null and b/frontend/test/storybook/visual-regression/v-image-cell.spec.ts-snapshots/v-image-cell-square-loaded-xs-linux.png differ
diff --git a/frontend/test/unit/specs/composables/use-image-cell-size.spec.js b/frontend/test/unit/specs/composables/use-image-cell-size.spec.js
index 636bcd60fd4..a4965fb1ae0 100644
--- a/frontend/test/unit/specs/composables/use-image-cell-size.spec.js
+++ b/frontend/test/unit/specs/composables/use-image-cell-size.spec.js
@@ -12,7 +12,7 @@ describe("useImageCellSize", () => {
expect(imgHeight.value).toEqual(250)
expect(imgWidth.value).toEqual(250)
expect(isPanorama.value).toEqual(false)
- expect(styles.value).toEqual({ container: "", figure: "", iPadding: "" })
+ expect(styles.value).toEqual({})
})
it("Should return correct values for intrinsic panorama image", () => {
@@ -27,9 +27,9 @@ describe("useImageCellSize", () => {
expect(imgWidth.value).toEqual(WIDTH)
expect(isPanorama.value).toEqual(true)
expect(styles.value).toEqual({
- container: "width: 450px;flex-grow: 450",
- figure: "width: 675%; top: 0%; left:-287.5%;",
- iPadding: "padding-bottom:56.25%",
+ "--container-grow": 250,
+ "--container-width": "250px",
+ "--img-aspect-ratio": 1.7777777777777777,
})
})
@@ -45,9 +45,9 @@ describe("useImageCellSize", () => {
expect(imgWidth.value).toEqual(WIDTH)
expect(isPanorama.value).toEqual(false)
expect(styles.value).toEqual({
- container: "width: 189.84375px;flex-grow: 189.84375",
- figure: "width: 100%; top: -711.1111111111111%; left:0%;",
- iPadding: "padding-bottom:133.33333333333331%",
+ "--container-grow": 105,
+ "--container-width": "105px",
+ "--img-aspect-ratio": 0.75,
})
})
@@ -63,9 +63,9 @@ describe("useImageCellSize", () => {
expect(imgWidth.value).toEqual(WIDTH)
expect(isPanorama.value).toEqual(false)
expect(styles.value).toEqual({
- container: "width: 253.125px;flex-grow: 253.125",
- figure: "width: 100%; top: 0%; left:0%;",
- iPadding: "padding-bottom:100%",
+ "--container-grow": 141,
+ "--container-width": "141px",
+ "--img-aspect-ratio": 1,
})
})
})