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

@@ -1,5 +1,5 @@
import { memo, useCallback, useState, useRef, useEffect, useMemo } from "react";
import { Link, Clock, Layers, Pencil, ChevronDown, Folder } from "lucide-react";
import { Link, Clock, Layers, Pencil, ChevronDown, Folder, Maximize2 } from "lucide-react";
import type { Task, TaskDetail, Column, PrInfo, IssueInfo } from "@fusion/core";
import { fetchTaskDetail, uploadAttachment } from "../api";
import { GitHubBadge } from "./GitHubBadge";
@@ -462,6 +462,11 @@ function TaskCardComponent({
enterEditMode(e);
}, [enterEditMode]);
const handleExpandClick = useCallback((e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
void handleClick();
}, [handleClick]);
// Auto-resize textarea (similar to InlineCreateCard)
const handleDescChange = useCallback((e: React.ChangeEvent<HTMLTextAreaElement>) => {
setEditDescription(e.target.value);
@@ -575,6 +580,14 @@ function TaskCardComponent({
/>
)}
<div className="card-header-actions">
<button
className="card-expand-btn"
onClick={handleExpandClick}
title="Open task details"
aria-label="Open task details"
>
<Maximize2 size={12} />
</button>
{canEdit && (
<button
className="card-edit-btn"