feat(FN-817): add expand button and swipe-friendly touch behavior for board cards

- Add expand button to TaskCard for opening task detail modal on mobile
- Implement CSS scroll-snap on board columns for swipe-friendly navigation
- Add touch-action and overscroll-behavior styles for smoother mobile scrolling
- Add comprehensive tests for mobile scroll snap behavior and expand button
- Document expand button and swipe-friendly board behavior in README
This commit is contained in:
gsxdsm
2026-04-03 22:40:00 -07:00
parent d67290a7f4
commit 16e8feebd3
5 changed files with 127 additions and 7 deletions

View File

@@ -59,4 +59,20 @@ describe("scroll-snap CSS", () => {
expect(afterMedia).toContain("scroll-snap-align: center");
});
});
describe("card touch-action", () => {
it("allows horizontal panning so board swipes work when starting on a card", () => {
const cardBlockMatch = css.match(/\.card\s*\{[^}]*\}/s);
expect(cardBlockMatch).not.toBeNull();
expect(cardBlockMatch![0]).toContain("touch-action: pan-x pan-y");
});
it("does not use touch-action: pan-y alone (which blocks horizontal swipes)", () => {
// The card should NOT have just pan-y; it needs pan-x too
const cardBlockMatch = css.match(/\.card\s*\{[^}]*\}/s);
expect(cardBlockMatch).not.toBeNull();
const cardBlock = cardBlockMatch![0];
expect(cardBlock).not.toMatch(/touch-action:\s*pan-y\s*;/);
});
});
});