fix(ux): replace overlay button with clean gradient mask for mobile catalog filters
Deploy Canina / deploy (push) Successful in 2m7s

This commit is contained in:
devops committed 2026-10-17 09:31:34 +00:00
1 parent 994086e580
commit 5534d050af
3 files changed
+8 -28

No files matched your search

@@ -829,7 +829,7 @@ export default function ArchivePage({
{/* Horizontal Scrollable Row for Sort, Pet Type, Solutions & Symptoms Filter */}
<div className="relative -mx-4 mt-2 mb-4" data-testid="mobile-catalog-filters-edge">
<div data-testid="mobile-catalog-filters" aria-label="فیلترهای محصولات" className="flex items-center gap-2 overflow-x-auto pb-2.5 pt-0.5 micro-hscroll px-4 select-none touch-pan-x">
<div data-testid="mobile-catalog-filters" aria-label="فیلترهای محصولات" className="flex items-center gap-2 overflow-x-auto pb-2.5 pt-0.5 micro-hscroll px-4 select-none touch-pan-x mobile-filter-mask">
{/* 1. View Mode Switch: 2 Buttons (List / Card) */}
<div className="flex-shrink-0 inline-flex items-center bg-white border border-medical-gray-200 rounded-xl p-0.5 shadow-2xs mr-auto">
@@ -1052,25 +1052,8 @@ export default function ArchivePage({
)}
</div>
</div>
<span aria-hidden="true" className="catalog-filter-fade catalog-filter-fade-start" />
<span aria-hidden="true" className="catalog-filter-fade catalog-filter-fade-end" />
<button
type="button"
data-testid="mobile-catalog-more-filters"
onClick={() => {
const el = document.querySelector('[data-testid="mobile-catalog-filters"]');
if (el) {
el.scrollBy({ left: -140, behavior: "smooth" });
}
}}
aria-label="مشاهده فیلترهای بیشتر"
className="absolute left-2 top-1/2 -translate-y-1/2 flex items-center gap-1 bg-white/95 backdrop-blur-xs border border-medical-gray-200 text-medical-gray-700 px-2 py-1 rounded-full text-[10px] font-black shadow-md z-20 hover:bg-medical-gray-50 active:scale-95 transition-all"
>
<span>فیلترهای بیشتر</span>
<svg className="w-3 h-3 text-canina-blue" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2.5} d="M15 19l-7-7 7-7" />
</svg>
</button>
</div>
</div>
@@ -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", "مشاهده فیلترهای بیشتر");
});