Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 5b50d83

Browse files
Merge branch 'Weaverse:main' into main
2 parents de9ac53 + 94f9f08 commit 5b50d83

File tree

16 files changed

+108
-58
lines changed

16 files changed

+108
-58
lines changed

app/components/layout/cart-drawer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { HandbagIcon, XIcon } from "@phosphor-icons/react";
1+
import { ShoppingBagIcon, XIcon } from "@phosphor-icons/react";
22
import * as Dialog from "@radix-ui/react-dialog";
33
import { type CartReturn, useAnalytics } from "@shopify/hydrogen";
44
import clsx from "clsx";
@@ -23,7 +23,7 @@ export function CartDrawer() {
2323
to="/cart"
2424
className="relative flex items-center justify-center w-8 h-8 focus:ring-border"
2525
>
26-
<HandbagIcon className="w-5 h-5" />
26+
<ShoppingBagIcon className="w-5 h-5" />
2727
</Link>
2828
}
2929
>
@@ -34,17 +34,17 @@ export function CartDrawer() {
3434
onClick={() => publish("custom_sidecart_viewed", { cart })}
3535
className="relative flex items-center justify-center w-8 h-8 focus:ring-border"
3636
>
37-
<HandbagIcon className="w-5 h-5" />
37+
<ShoppingBagIcon className="w-5 h-5" />
3838
{cart?.totalQuantity > 0 && (
3939
<div
4040
className={clsx(
41-
"cart-count",
41+
// "cart-count",
4242
"absolute top-0 -right-1.5",
4343
"flex items-center text-center justify-center min-w-4.5 h-4.5 px-1 rounded-full",
44-
"text-[13px] leading-none text-center font-medium",
44+
"text-[12px] leading-none text-center font-normal",
4545
"transition-colors duration-300",
46-
"group-hover/header:bg-(--color-header-text)",
47-
"group-hover/header:text-(--color-header-bg)"
46+
// "group-hover/header:bg-(--color-header-text)",
47+
// "group-hover/header:text-(--color-header-bg)"
4848
)}
4949
>
5050
<span className="-mr-px">{cart?.totalQuantity}</span>

app/components/layout/desktop-menu.tsx

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as Menubar from "@radix-ui/react-menubar";
22
import { useThemeSettings } from "@weaverse/hydrogen";
33
import clsx from "clsx";
44
import { useState } from "react";
5+
import { useNavigate } from "react-router";
56
import { Image } from "~/components/image";
67
import Link from "~/components/link";
78
import { useShopMenu } from "~/hooks/use-shop-menu";
@@ -12,6 +13,7 @@ export function DesktopMenu() {
1213
const { headerMenu } = useShopMenu();
1314
const { openMenuBy } = useThemeSettings();
1415
const [value, setValue] = useState<string | null>(null);
16+
const navigate = useNavigate();
1517

1618
if (headerMenu?.items?.length) {
1719
const items = headerMenu.items as unknown as SingleMenuItem[];
@@ -43,11 +45,15 @@ export function DesktopMenu() {
4345
setValue(id);
4446
}
4547
}}
48+
onPointerDown={hasSubmenu ? (e) => {
49+
// Allow navigation on left click while preserving submenu behavior
50+
if (e.button === 0 && !e.ctrlKey && !e.metaKey) {
51+
navigate(to);
52+
}
53+
} : undefined}
4654
>
4755
{hasSubmenu ? (
48-
<>
49-
<span>{title}</span>
50-
</>
56+
<span>{title}</span>
5157
) : (
5258
<Link to={to} className="transition-none">
5359
{title}
@@ -106,23 +112,23 @@ function MegaMenu({ items }: { items: SingleMenuItem[] }) {
106112
resource?.image && children.length === 0 ? (
107113
<SlideIn
108114
key={id}
109-
className="flex flex-col gap-5 group/item overflow-hidden"
115+
className="group/item overflow-hidden"
110116
style={{ "--idx": idx } as React.CSSProperties}
111117
>
112-
<Image
113-
sizes="auto"
114-
data={resource.image}
115-
className="group-hover/item:scale-[1.03] transition-transform duration-300 max-w-72 w-72 aspect-square"
116-
width={300}
117-
/>
118118
<Link
119119
to={to}
120120
prefetch="intent"
121-
className={clsx([
122-
"text-left",
123-
"font-normal uppercase",
124-
])}
121+
className={clsx(["text-left", "font-normal uppercase", "flex flex-col gap-5"])}
125122
>
123+
<div className="relative overflow-hidden max-w-72 w-72 aspect-square">
124+
<Image
125+
sizes="auto"
126+
data={resource.image}
127+
className="w-full h-full object-cover"
128+
width={300}
129+
/>
130+
<div className="absolute inset-0 bg-black opacity-0 group-hover/item:opacity-20 transition-opacity duration-300"></div>
131+
</div>
126132
<span>{title}</span>
127133
</Link>
128134
</SlideIn>

app/components/layout/footer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export function Footer() {
165165
variant="primary"
166166
type="submit"
167167
loading={fetcher.state === "submitting"}
168+
className="uppercase"
168169
>
169170
{newsletterButtonText}
170171
</Button>

app/components/product/add-to-cart-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function AddToCartButton({
5050
/>
5151
<Button
5252
type="submit"
53-
variant="secondary"
53+
variant="primary"
5454
className={cn(
5555
className,
5656
"px-6 py-5"

app/components/product/product-card.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export function ProductCard({
5050
pcardQuickShopButtonText,
5151
pcardQuickShopAction,
5252
pcardQuickShopPanelType,
53+
pcardBadgesPosition,
5354
pcardShowSaleBadges,
5455
pcardShowBestSellerBadges,
5556
pcardShowNewBadges,
@@ -73,6 +74,19 @@ export function ProductCard({
7374
.filter(Boolean)
7475
.some(({ key, value }) => key === "best_seller" && value === "true");
7576

77+
// Helper function to get badge position classes
78+
const getBadgePositionClasses = (position: string = "top-right") => {
79+
switch (position) {
80+
case "top-left":
81+
return "flex gap-1 absolute top-2.5 left-2.5";
82+
case "top-center":
83+
return "flex gap-1 absolute top-2.5 left-1/2 -translate-x-1/2";
84+
case "top-right":
85+
default:
86+
return "flex gap-1 absolute top-2.5 right-2.5";
87+
}
88+
};
89+
7690
let [image, secondImage] = images.nodes;
7791
if (selectedVariant) {
7892
if (selectedVariant.image) {
@@ -140,7 +154,7 @@ export function ProductCard({
140154
)}
141155
</Link>
142156
)}
143-
<div className="flex gap-1 absolute top-2.5 right-2.5">
157+
<div className={getBadgePositionClasses(pcardBadgesPosition)}>
144158
{pcardShowSaleBadges && (
145159
<SaleBadge
146160
price={minVariantPrice as MoneyV2}

app/components/product/quick-shop.tsx

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { useThemeSettings } from "@weaverse/hydrogen";
1111
import clsx from "clsx";
1212
import { useEffect, useState } from "react";
1313
import { useFetcher, Link } from "react-router";
14-
import { Button } from "~/components/button";
1514
import { AddToCartButton } from "~/components/product/add-to-cart-button";
1615
import { ProductMedia } from "~/components/product/product-media";
1716
import { QuickShopVariants } from "~/components/product/quick-shop-variants";
@@ -340,19 +339,35 @@ export function QuickShopTrigger({ productHandle }: { productHandle: string }) {
340339
<button
341340
type="button"
342341
className={clsx(
343-
"absolute inset-x-4 bottom-4 !opacity-0 -translate-y-1.5 -translate-x-2 lg:group-hover:!opacity-100 lg:group-hover:translate-x-0 lg:group-hover:translate-y-2 !transition-all duration-500",
344-
"border px-4 py-2",
345-
"text-(--btn-secondary-text)",
346-
"bg-(--btn-secondary-bg)",
347-
"border-(--btn-secondary-bg)",
348-
"hover:bg-(--btn-secondary-text)",
349-
"hover:text-(--btn-secondary-bg)",
350-
"hover:border-(--btn-secondary-text)",
351-
"inline-flex items-center justify-center rounded-none",
352-
"text-base leading-tight font-normal whitespace-nowrap",
342+
// Mobile/Tablet: Always visible circular button at bottom right
343+
"absolute bottom-4 right-4 w-12 h-12 md:opacity-100",
344+
"bg-white rounded-full",
345+
"flex items-center justify-center p-0",
346+
// Desktop: Hide initially, show on hover with text
347+
"lg:opacity-0 lg:inset-x-4 lg:w-auto lg:h-auto lg:rounded-none",
348+
"lg:px-6 lg:py-3",
349+
"lg:text-(--btn-secondary-text) lg:bg-(--btn-secondary-bg) lg:border-(--btn-secondary-bg)",
350+
"lg:-translate-y-1.5 lg:-translate-x-2",
351+
"lg:group-hover:opacity-100 lg:group-hover:translate-x-0 lg:group-hover:translate-y-2",
352+
"lg:font-normal lg:whitespace-nowrap",
353353
)}
354354
>
355-
Quick shop
355+
{/* Shopping bag icon for mobile/tablet */}
356+
<svg
357+
className="w-5 h-5 text-[#29231E] lg:hidden"
358+
fill="none"
359+
stroke="currentColor"
360+
viewBox="0 0 24 24"
361+
>
362+
<path
363+
strokeLinecap="round"
364+
strokeLinejoin="round"
365+
strokeWidth={1.5}
366+
d="M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"
367+
/>
368+
</svg>
369+
{/* Text for desktop */}
370+
<span className="hidden lg:inline uppercase">Quick shop</span>
356371
</button>
357372
</Dialog.Trigger>
358373
<Dialog.Portal>

app/sections/collection-filters/layout-switcher.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export function LayoutSwitcher({
2222
return (
2323
<div
2424
className={cn(
25-
"flex",
26-
"[&>button]:text-[#b7b7b7] [&>button]:border-[#b7b7b7]",
27-
'[&>button[data-active="true"]]:text-[#696662]',
28-
'[&>button[data-active="true"]]:border-[#696662]',
25+
"flex flex-row-reverse md:flex-row",
26+
"[&>button]:text-[#F2F0EE] [&>button]:border-[#F2F0EE]",
27+
'[&>button[data-active="true"]]:text-[#A79D95]',
28+
'[&>button[data-active="true"]]:border-[#A79D95]',
2929
className,
3030
)}
3131
>
@@ -38,7 +38,7 @@ export function LayoutSwitcher({
3838
type="button"
3939
data-active={gridSizeMobile === col}
4040
onClick={() => onGridSizeChange(col, "mobile")}
41-
className="border w-12 h-12 flex lg:hidden items-center justify-center"
41+
className="border w-12 h-12 flex md:hidden items-center justify-center"
4242
>
4343
<Icon className="w-[50px] h-[50px]" />
4444
</button>
@@ -54,7 +54,7 @@ export function LayoutSwitcher({
5454
type="button"
5555
data-active={gridSizeDesktop === col}
5656
onClick={() => onGridSizeChange(col, "desktop")}
57-
className="border w-12 h-12 hidden lg:flex items-center justify-center"
57+
className="border w-12 h-12 hidden md:flex items-center justify-center"
5858
>
5959
<Icon className="w-[50px] h-[50px]" />
6060
</button>
@@ -67,14 +67,14 @@ export function LayoutSwitcher({
6767
function LayoutList(props: IconProps) {
6868
return (
6969
<svg
70-
width="22"
71-
height="22"
72-
viewBox="0 0 22 22"
70+
width="50"
71+
height="50"
72+
viewBox="0 0 50 50"
7373
fill="currentColor"
7474
xmlns="http://www.w3.org/2000/svg"
7575
{...props}
7676
>
77-
<rect width="22" height="22" />
77+
<rect x="14" y="14" width="22" height="22" fill="currentColor" />
7878
</svg>
7979
);
8080
}

app/sections/collection-filters/products-pagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function ProductsLoadedOnScroll(props: ProductsLoadedOnScrollProps) {
157157
<div
158158
className={clsx([
159159
"w-full gap-x-4 gap-y-6 lg:gap-y-10",
160-
"grid grid-cols-(--cols-mobile) lg:grid-cols-(--cols-desktop)",
160+
"grid grid-cols-(--cols-mobile) md:grid-cols-(--cols-desktop)",
161161
])}
162162
>
163163
{nodes.map((product: ProductCardFragment) => (

app/sections/collection-filters/tools-bar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function ToolsBar({
3232
return (
3333
<div className="py-4">
3434
<div className="gap-4 md:gap-8 flex w-full items-center justify-between">
35-
<div className="space-y-2 md:block hidden">
35+
<div className="space-y-4 md:block hidden">
3636
<h3 className="uppercase">{collection.title}</h3>
3737
{showProductsCount && (
3838
<span className="text-center hidden md:inline uppercase">
@@ -41,7 +41,7 @@ export function ToolsBar({
4141
)}
4242
</div>
4343
{(enableSort || (enableFilter && filtersPosition === "drawer")) && (
44-
<div className="flex flex-col w-full gap-2 justify-end md:w-fit">
44+
<div className="flex flex-col w-full gap-4 justify-end md:w-fit">
4545
<div className="flex w-full justify-between items-end md:justify-end md:w-fit gap-2">
4646
<LayoutSwitcher
4747
gridSizeDesktop={gridSizeDesktop}

app/sections/collection-list-dynamic/collection-items.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ let CollectionItems = forwardRef<HTMLDivElement, CollectionItemsProps>(
261261
ref={scope}
262262
{...rest}
263263
className={clsx(
264-
"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-[var(--gap)] w-full pb-8",
264+
"grid grid-cols-2 md:grid-cols-3 gap-[var(--gap)] w-full pb-8",
265265
)}
266266
style={style}
267267
>

0 commit comments

Comments
 (0)