Skip to content

Fix mid-screen horizontal scrollbar on wide, short boards#148

Merged
crittermike merged 1 commit into
mainfrom
crittermike/fix-board-horizontal-scrollbar
Jun 18, 2026
Merged

Fix mid-screen horizontal scrollbar on wide, short boards#148
crittermike merged 1 commit into
mainfrom
crittermike/fix-board-horizontal-scrollbar

Conversation

@crittermike

Copy link
Copy Markdown
Owner

Re-applies the scrollbar fix that was reverted (#147), this time verified against the live app to confirm it does not cause a blank screen.

Problem

On a board with many columns (wide) but few cards (short), an ugly horizontal scrollbar appeared in the middle of the screen with a large empty area below it.

Cause

The board wrapper <div> in Board.jsx was a plain block element, breaking the flex chain between .App and main#board-content. main has flex-grow: 1, but with no flex parent to grow within, the board area collapsed to its content height. With short columns, main's overflow-x: auto scrollbar landed mid-screen.

Fix

Add a stable .board-layout class to the wrapper with a flex-column layout (display: flex; flex-direction: column; flex-grow: 1; min-height: 0). main now fills the available height, columns stretch full height, and the scrollbar sits at the viewport bottom.

Why the earlier revert happened

The previous merge (#147) was reverted after a reported white screen. I reproduced the live app (real database) headlessly with a 9-column board, in both dev and production builds, with and without this change:

main bottom dead space below columns rendered blank screen
Before fix 288px (of 700px viewport) 412px 9 no
After fix 700px 0px 9 no

The app rendered fully in every case — no white screen in dev or the minified production build. The original white screen was a transient deploy/cache artifact, not this CSS. setupTests.js is test-only and is never included in the app bundle, so it cannot affect runtime.

Also included

A functional in-memory localStorage polyfill in setupTests.js. jsdom doesn't provide Web Storage in this environment, which made the useRecentBoards and ColumnsContainer tests fail on localStorage.clear() (pre-existing failures on main).

Verification

  • npm run lint — clean
  • npm run build — succeeds (.board-layout confirmed in minified CSS)
  • npm test — 1396 passed (was 16 failing on main)
  • Live-app headless check (dev + prod build) — no blank screen, scrollbar at viewport bottom

The board wrapper div in Board.jsx was a plain block element, breaking
the flex chain between .App and main#board-content. Because main's
flex-grow had no flex parent to grow within, the board area collapsed to
its content height. On a wide board with short columns, main's
overflow-x scrollbar then appeared mid-screen instead of at the viewport
bottom.

Add a stable .board-layout class to the wrapper with a flex-column layout
so main fills the available height, columns stretch full height, and the
horizontal scrollbar sits at the bottom of the screen.

Verified against the live app (real database) with a 9-column board in
both dev and production builds: the board area now fills the viewport
(main bottom = viewport bottom, no dead space) and renders with no blank
screen. The earlier revert was a transient deploy artifact, not this CSS.

Also add a functional in-memory localStorage polyfill in setupTests.js.
jsdom does not provide Web Storage in this environment, which made the
useRecentBoards and ColumnsContainer tests fail on localStorage.clear().
This file is test-only and is never imported into the app bundle.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for kanbanish ready!

Name Link
🔨 Latest commit dd12b45
🔍 Latest deploy log https://app.netlify.com/projects/kanbanish/deploys/6a344361ac8ea70008c27ac5
😎 Deploy Preview https://deploy-preview-148--kanbanish.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@crittermike crittermike marked this pull request as ready for review June 18, 2026 19:16
@crittermike crittermike merged commit 491afc1 into main Jun 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant