feat(ux): add visible interactive scroll cue for mobile catalog filters
Deploy Canina / deploy (push) Successful in 2m11s
Deploy Canina / deploy (push) Successful in 2m11s
This commit is contained in:
1 parent
dbd7d8b37d
commit
994086e580
2 files changed
+18
No files matched your search
@@ -1054,6 +1054,23 @@ export default function ArchivePage({
|
||||
</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,6 +170,7 @@ 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", "مشاهده فیلترهای بیشتر");
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user