Files
fusion/packages/dashboard/app/components/Board.css
Fusion Agent 29010e0b0a FN-064: preserve bounded Board mouse panning
Keep Board dragging within safe viewport bounds while preserving usable mobile interactions.

- Add a reusable bounded mouse-pan hook and wire it into the Board.
- Preserve Board transforms and cursor behavior through responsive CSS updates.
- Expand desktop and mobile regression coverage and document the interaction.
- Add the published-package changeset for the Board fix.

Files changed:
 .changeset/fn-064-board-safe-mouse-pan.md          |   7 +
 docs/dashboard-guide.md                            |   4 +-
 packages/dashboard/app/components/Board.css        |  10 ++
 packages/dashboard/app/components/Board.tsx        |  17 ++-
 .../app/components/__tests__/Board.test.tsx        |  40 ++++-
 .../app/components/__tests__/board-mobile.test.tsx |  13 +-
 .../app/hooks/__tests__/useBoardMousePan.test.tsx   | 163 +++++++++++++++++++++
 packages/dashboard/app/hooks/useBoardMousePan.ts   | 141 ++++++++++++++++++
 8 files changed, 374 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-064

Fusion-Task-Lineage: 22e9dfeb-b565-414b-89cf-eb10725490a8

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:57:39 +00:00

80 lines
1.9 KiB
CSS

/*
FNXC:BoardWorkflows 2026-06-20-09:02:
The board needs a neutral first-paint shell whenever workflow lanes are enabled but metadata is not ready, so users never see the legacy single-lane board flash before workflow lanes load.
*/
.board.board-workflows-skeleton {
display: flex;
align-items: stretch;
gap: var(--column-gap, var(--space-md));
overflow-x: auto;
overflow-y: hidden;
padding: var(--board-padding, var(--space-md));
background: var(--bg);
}
.board-workflows-skeleton__column {
flex: 1 0 min(24rem, 85vw);
min-width: min(24rem, 85vw);
display: flex;
flex-direction: column;
gap: var(--space-md);
padding: var(--space-md);
border: 1px solid var(--border);
background: var(--surface);
}
.board-workflows-skeleton__header,
.board-workflows-skeleton__card {
border-radius: var(--radius-md);
background: color-mix(in srgb, var(--border) 70%, var(--surface));
animation: board-workflows-skeleton-pulse 1.4s ease-in-out infinite;
}
.board-workflows-skeleton__header {
block-size: var(--space-lg);
inline-size: 55%;
}
.board-workflows-skeleton__card {
block-size: calc(var(--space-2xl) * 2);
inline-size: 100%;
}
.board-workflows-skeleton__card--short {
inline-size: 75%;
}
/*
FNXC:BoardNavigation 2026-08-20-02:44:
Feedback appears only after a qualifying direct-root desktop drag crosses horizontal intent. It
cannot suppress selection for text, cards, controls, the loading skeleton, or mobile touch.
*/
.board.board-workflow-columns.is-mouse-panning {
cursor: grabbing;
user-select: none;
}
@keyframes board-workflows-skeleton-pulse {
0%, 100% {
opacity: 0.55;
}
50% {
opacity: 1;
}
}
@media (max-width: 768px) {
.board.board-workflows-skeleton {
gap: var(--space-sm);
padding: var(--space-sm);
scroll-snap-type: x proximity;
}
.board-workflows-skeleton__column {
flex-basis: 86vw;
min-width: 86vw;
scroll-snap-align: center;
}
}