@@ -87,9 +94,9 @@ function ProductGallery({ title, slug }: Props) {
)}
{/* Render ALL products */}
-
- {data &&
- pages.map((page) => (
+ {data ? (
+ <>
+ {pages.map((page) => (
))}
-
+ >
+ ) : (
+
+ )}
{/* Prefetch Previous and Next pages */}
{prev !== false && (
diff --git a/src/components/sections/ProductGallery/product-gallery.scss b/src/components/sections/ProductGallery/product-gallery.scss
index f5eea37d6..052b3ffc1 100644
--- a/src/components/sections/ProductGallery/product-gallery.scss
+++ b/src/components/sections/ProductGallery/product-gallery.scss
@@ -1,6 +1,5 @@
@import "src/styles/scaffold";
-// Check it after apply Skeletons.
.product-listing {
--product-listing-row-height: var(--space-6);
@@ -29,19 +28,6 @@
}
}
-.product-listing__data-grid {
- --product-listing-grid-height: 1750px;
- --product-listing-row-height: var(--space-6);
-
- min-height: calc(var(--product-listing-grid-height) - var(--product-listing-row-height));
- contain-intrinsic-size: calc(var(--product-listing-grid-height) - var(--product-listing-row-height));
- content-visibility: auto;
-
- @include media(">=notebook") {
- --product-listing-grid-height: 1016px;
- }
-}
-
.product-listing__filters {
@include media(">=notebook") {
position: sticky;
@@ -62,6 +48,11 @@
padding: var(--space-1) var(--space-3) var(--space-2);
background-color: var(--bg-neutral-lightest);
+ [data-element-variant="text"] {
+ min-width: rem(225px);
+ min-height: var(--space-5);
+ }
+
@include media(">=notebook") {
grid-column: 6 / span 7;
justify-content: flex-end;
@@ -72,6 +63,10 @@
.button[data-store-button] {
display: none;
}
+
+ [data-element-variant="button"] {
+ display: none;
+ }
}
}
@@ -92,9 +87,12 @@
padding: 0;
background-color: unset;
}
+
+ [data-element-variant="text"] {
+ min-width: rem(130px);
+ }
}
-// Check it after apply Skeletons.
.product-listing__results {
--padding: var(--space-1);
diff --git a/src/components/sections/ProductShelf/ProductShelf.tsx b/src/components/sections/ProductShelf/ProductShelf.tsx
index db12a007c..4e1245519 100644
--- a/src/components/sections/ProductShelf/ProductShelf.tsx
+++ b/src/components/sections/ProductShelf/ProductShelf.tsx
@@ -1,5 +1,6 @@
import React from 'react'
import type { ProductSummary_ProductFragment } from '@generated/graphql'
+import ProductShelfSkeleton from 'src/components/skeletons/ProductShelfSkeleton'
import ProductCard from '../../product/ProductCard'
@@ -11,13 +12,15 @@ interface ProductShelfProps {
function ProductShelf({ products }: ProductShelfProps) {
return (
-
- {products.map((product, idx) => (
- -
-
-
- ))}
-
+
+
+ {products.map((product, idx) => (
+ -
+
+
+ ))}
+
+
)
}
diff --git a/src/components/sections/ProductTiles/ProductTiles.tsx b/src/components/sections/ProductTiles/ProductTiles.tsx
index 5c377bf59..fdfa07210 100644
--- a/src/components/sections/ProductTiles/ProductTiles.tsx
+++ b/src/components/sections/ProductTiles/ProductTiles.tsx
@@ -2,6 +2,7 @@ import React from 'react'
import Tiles, { Tile } from 'src/components/ui/Tiles'
import ProductCard from 'src/components/product/ProductCard'
import type { ProductSummary_ProductFragment } from '@generated/graphql'
+import ProductTilesSkeleton from 'src/components/skeletons/ProductTilesSkeleton'
interface TilesProps {
products: ProductSummary_ProductFragment[]
@@ -26,19 +27,21 @@ const getRatio = (products: number, idx: number) => {
const ProductTiles = ({ products }: TilesProps) => {
return (
-
- {products.map((product, idx) => (
-
-
-
- ))}
-
+
+
+ {products.map((product, idx) => (
+
+
+
+ ))}
+
+
)
}
diff --git a/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx b/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx
new file mode 100644
index 000000000..c3642b055
--- /dev/null
+++ b/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx
@@ -0,0 +1,32 @@
+import React from 'react'
+import type { PropsWithChildren } from 'react'
+
+import Shimmer from '../Shimmer'
+import SkeletonElement from '../SkeletonElement'
+import './filter-skeleton.scss'
+
+interface Props {
+ loading?: boolean
+}
+
+function FilterSkeleton({
+ children,
+ loading = true,
+}: PropsWithChildren
) {
+ return loading ? (
+
+ ) : (
+ <>{children}>
+ )
+}
+
+export default FilterSkeleton
diff --git a/src/components/skeletons/FilterSkeleton/filter-skeleton.scss b/src/components/skeletons/FilterSkeleton/filter-skeleton.scss
new file mode 100644
index 000000000..ffffaa89b
--- /dev/null
+++ b/src/components/skeletons/FilterSkeleton/filter-skeleton.scss
@@ -0,0 +1,28 @@
+@import "src/styles/scaffold";
+
+[data-store-filter-skeleton] {
+ margin-top: var(--space-1);
+
+ @include media("
+
+
+
+
+
+
+
+ {showActions && }
+
+
+
+ )
+}
+
+export default ProductCardSkeleton
diff --git a/src/components/skeletons/ProductCardSkeleton/index.ts b/src/components/skeletons/ProductCardSkeleton/index.ts
new file mode 100644
index 000000000..852a53006
--- /dev/null
+++ b/src/components/skeletons/ProductCardSkeleton/index.ts
@@ -0,0 +1 @@
+export { default } from './ProductCardSkeleton'
diff --git a/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.scss b/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.scss
new file mode 100644
index 000000000..4185d7392
--- /dev/null
+++ b/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.scss
@@ -0,0 +1,58 @@
+@import "src/styles/scaffold";
+
+[data-store-product-card-skeleton] {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ min-width: 14vw;
+ height: 100%;
+ padding: var(--space-1) var(--space-1) var(--space-2);
+ overflow: hidden;
+ border: var(--border-width-0) solid transparent;
+ border-radius: var(--border-radius-default);
+
+ @include media(">=notebook") { min-width: 12rem; }
+
+ &[data-bordered="true"] { border: var(--border-width-0) solid var(--color-border-display); }
+
+ [data-product-card-skeleton-image] {
+ [data-element-variant="image"] {
+ height: 45vw;
+
+ @include media(">=notebook") {
+ height: rem(195px);
+ }
+ }
+
+ &[data-sectioned="true"] {
+ [data-element-variant="image"] {
+ min-width: 13rem;
+ height: rem(195px);
+ }
+ }
+ }
+
+ [data-product-card-skeleton-content] {
+ position: relative;
+ height: 20%;
+ margin-top: var(--space-2);
+
+ [data-element-variant="text"] { margin-bottom: var(--space-2); }
+
+ [data-element-variant="button"] { margin-top: var(--space-4); }
+
+ [data-element-variant="badge"] {
+ min-width: 30%;
+
+ @include media(">=notebook") {
+ min-height: var(--space-5);
+ margin-top: var(--space-4);
+ }
+
+ @include media(">=tablet") {
+ min-width: 20%;
+ max-width: 20%;
+ }
+ }
+ }
+}
diff --git a/src/components/skeletons/ProductGridSkeleton/ProductGridSkeleton.tsx b/src/components/skeletons/ProductGridSkeleton/ProductGridSkeleton.tsx
new file mode 100644
index 000000000..71270deb3
--- /dev/null
+++ b/src/components/skeletons/ProductGridSkeleton/ProductGridSkeleton.tsx
@@ -0,0 +1,30 @@
+import React from 'react'
+import type { PropsWithChildren } from 'react'
+import { ITEMS_PER_PAGE } from 'src/constants'
+
+import ProductCardSkeleton from '../ProductCardSkeleton'
+
+import 'src/components/product/ProductGrid/product-grid.scss'
+
+interface Props {
+ loading?: boolean
+}
+
+function ProductGridSkeleton({
+ children,
+ loading = true,
+}: PropsWithChildren