Skip to content

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

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#147
crittermike merged 1 commit into
mainfrom
crittermike/fix-board-horizontal-scrollbar

Conversation

@crittermike

Copy link
Copy Markdown
Owner

Problem

On a board with many columns (wide) but few cards (short), an ugly horizontal scrollbar appeared in the middle of the screen with empty space 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 instead of at the viewport bottom.

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). Now main fills the available height, columns stretch full height (they already had height: 100%), and the horizontal scrollbar sits at the bottom of the screen.

Also included

  • Add 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(). All 1396 tests now pass.

Verification

  • npm run lint — clean
  • npm run build — succeeds
  • npm test — 1396 passed (previously 16 failing)

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.

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().

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 b990ab1
🔍 Latest deploy log https://app.netlify.com/projects/kanbanish/deploys/6a3409310af51000084269d5
😎 Deploy Preview https://deploy-preview-147--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 15:06
@crittermike crittermike merged commit 7080aa3 into main Jun 18, 2026
6 checks passed
crittermike added a commit that referenced this pull request Jun 18, 2026
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