From 5534d050afea91123a056aaa163477f96d93b68a Mon Sep 17 00:00:00 2001 From: devops Date: Sat, 17 Oct 2026 09:31:34 +0000 Subject: [PATCH] fix(ux): replace overlay button with clean gradient mask for mobile catalog filters --- frontend/application/app/globals.css | 12 ++++------ .../application/components/ArchivePage.tsx | 23 +++---------------- .../components/__tests__/ArchivePage.test.tsx | 1 - 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/frontend/application/app/globals.css b/frontend/application/app/globals.css index dd9e9d1d..1d726b95 100644 --- a/frontend/application/app/globals.css +++ b/frontend/application/app/globals.css @@ -140,10 +140,11 @@ background: var(--color-canina-blue); } -/* Mobile catalog filter edge affordances */ -.catalog-filter-fade { position:absolute; top:0; bottom:0.625rem; width:2.5rem; z-index:10; pointer-events:none; } -.catalog-filter-fade-start { inset-inline-start:0; background:linear-gradient(to right, rgba(248,250,252,1), rgba(248,250,252,0)); } -.catalog-filter-fade-end { inset-inline-end:0; background:linear-gradient(to left, rgba(248,250,252,1), rgba(248,250,252,0)); } +/* Mobile catalog filter edge affordances (clean mask-based fade) */ +.mobile-filter-mask { + -webkit-mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent 100%); + mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent 100%); +} /* Micro horizontal scrollbar for dark backgrounds (catalog etc.) */ .micro-hscroll-dark { @@ -185,6 +186,3 @@ .animate-marquee:hover { animation-play-state: paused; } - -[dir="rtl"] .catalog-filter-fade-start { background:linear-gradient(to left, rgba(248,250,252,1), rgba(248,250,252,0)); } -[dir="rtl"] .catalog-filter-fade-end { background:linear-gradient(to right, rgba(248,250,252,1), rgba(248,250,252,0)); } \ No newline at end of file diff --git a/frontend/application/components/ArchivePage.tsx b/frontend/application/components/ArchivePage.tsx index b4bee550..c331a873 100644 --- a/frontend/application/components/ArchivePage.tsx +++ b/frontend/application/components/ArchivePage.tsx @@ -829,7 +829,7 @@ export default function ArchivePage({ {/* Horizontal Scrollable Row for Sort, Pet Type, Solutions & Symptoms Filter */}
-
+
{/* 1. View Mode Switch: 2 Buttons (List / Card) */}
@@ -1052,25 +1052,8 @@ export default function ArchivePage({ )}
-
diff --git a/frontend/application/components/__tests__/ArchivePage.test.tsx b/frontend/application/components/__tests__/ArchivePage.test.tsx index 9e9c033a..740f7edc 100644 --- a/frontend/application/components/__tests__/ArchivePage.test.tsx +++ b/frontend/application/components/__tests__/ArchivePage.test.tsx @@ -170,7 +170,6 @@ describe("ArchivePage Component", () => { const filterRow = screen.getByTestId("mobile-catalog-filters"); expect(filterRow).toHaveAttribute("aria-label", "فیلترهای محصولات"); expect(screen.getByTestId("mobile-catalog-filters-edge")).toBeInTheDocument(); - expect(screen.getByTestId("mobile-catalog-more-filters")).toHaveAttribute("aria-label", "مشاهده فیلترهای بیشتر"); });