fix(KB-166): revert mobile board flex layout from KB-164

- Remove mobile board flex/snap-scroll CSS overrides from styles.css
- Remove Board tests asserting direct-child column structure and semantic tag
- Delete fix-mobile-board-double-scrollbar changeset
- Retain mobile modal full-screen overrides
This commit is contained in:
Dustin Byrne
2026-03-28 09:29:10 -04:00
parent 7259b652e6
commit cf7b385549
3 changed files with 3 additions and 61 deletions

View File

@@ -52,23 +52,4 @@ describe("Board", () => {
expect(screen.getByTestId(`column-${col}`)).toBeDefined();
}
});
it("renders all 5 columns as direct children of .board (CSS selector target)", () => {
renderBoard();
const board = screen.getByRole("main");
// The mock Column renders <div data-testid="column-{col}" />, which are direct children
const directChildren = Array.from(board.children);
expect(directChildren).toHaveLength(COLUMNS.length);
// Each direct child should be one of the column test-id elements
for (const col of COLUMNS) {
const colEl = screen.getByTestId(`column-${col}`);
expect(colEl.parentElement).toBe(board);
}
});
it("renders the board element as a <main> tag (semantic structure)", () => {
renderBoard();
const board = screen.getByRole("main");
expect(board.tagName).toBe("MAIN");
});
});

View File

@@ -1296,44 +1296,10 @@ html, body {
font-weight: 600;
}
/* === Mobile Responsive Overrides ===
On narrow viewports (≤768px) the board switches from a 5-column grid to a
horizontally-scrollable flex layout so only one scrollbar appears. Each
column gets a fixed min-width and snap-scrolling for a polished swipe feel.
The modal also goes full-screen with reduced spacing. */
/* === Mobile: Task Detail Modal ===
On narrow viewports (≤768px) the modal goes full-screen, action buttons wrap,
and spacing is reduced to stay usable on screens as small as 320px. */
@media (max-width: 768px) {
/* Prevent ancestor elements from producing a second horizontal scrollbar */
html, body {
overflow: hidden;
}
#root {
overflow: hidden;
}
/* Board: flex layout with single horizontal scroll + snap */
.board {
display: flex;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
scroll-snap-type: x mandatory;
padding: 12px;
gap: 12px;
}
.board > .column {
min-width: 280px;
flex-shrink: 0;
scroll-snap-align: start;
}
/* Reduce header padding to reclaim horizontal space */
.header {
padding: 12px 12px;
}
/* Modal: full-screen on mobile */
.modal-overlay {
padding-top: 0;
align-items: stretch;