Skip to content

Fix viewport overflow, board drift, and SQL input layout#5

Merged
Devn913 merged 1 commit intomainfrom
copilot/fix-page-size-and-add-scroll-bar
Apr 21, 2026
Merged

Fix viewport overflow, board drift, and SQL input layout#5
Devn913 merged 1 commit intomainfrom
copilot/fix-page-size-and-add-scroll-bar

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

Appending SQL queries caused the page to grow indefinitely, pushing the chess board down the page. The SQL input section lacked visual consistency with the rest of the panel header.

Layout / overflow

  • #app: min-height: 100vhheight: 100vh; overflow: hidden — hard-caps the shell to the viewport
  • body: overflow-xoverflow: hidden — blocks any axis from scrolling at page level
  • Removed justify-content: center from .chess-panel — this was the root cause of board drift; centering a flex column with overflow-y: auto causes the container to inflate rather than scroll

Board sizing

  • --board-sz now includes calc(100vh - 280px) as a min() constraint, preventing vertical overflow regardless of panel height
  • Mobile breakpoint adds calc(55vh) for short-screen devices

SQL panel

  • Width: 25% → 30%
  • sql-input-section: border-topborder-bottom (section sits at top of content area, separator belongs below)
  • .sql-input-bar padding aligned to match .sql-panel-header (0.6rem 1rem, min-height: 44px)
  • Textarea rows 4 → 3 for a more compact input block

Move history

  • max-height: 120px → 160px; scrollbar-width: thin added for consistent visible scroll

Mobile (≤900px)

  • app-main scrolls vertically instead of chess-panel
  • SQL panel uses height: 45vh; min-height: 260px replacing the old max-height approach

@Devn913 Devn913 marked this pull request as ready for review April 21, 2026 10:27
Copilot AI review requested due to automatic review settings April 21, 2026 10:27
@Devn913 Devn913 merged commit a0d451a into main Apr 21, 2026
7 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the app’s layout/overflow behavior to keep the chess board anchored within the viewport while SQL query output grows, and refines SQL panel sizing and input styling for visual consistency.

Changes:

  • Caps the app shell to the viewport and shifts scrolling to internal containers (desktop) / main container (mobile).
  • Updates board sizing constraints to better respect available viewport height and reduces board “drift” by removing flex centering.
  • Tweaks SQL panel width and SQL input/move-history sizing for a more consistent UI.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
index.html Reduces SQL textarea rows to make the input block more compact.
css/style.css Reworks overflow/scroll containers, adjusts board sizing constraints, refines SQL panel sizing, and improves scroll/UI consistency (move history, SQL content).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread css/style.css
Comment on lines +16 to +18
Also constrained by viewport height (subtracting ~280px for header 56px +
player bars ~80px + controls ~40px + move history ~100px + gaps ~4px). */
--board-sz: clamp(300px, min(calc(70vw - var(--chess-panel-padding) * 2), calc(100vh - 280px)), 720px);
Comment thread css/style.css
Comment on lines 72 to +76
#app {
display: flex;
flex-direction: column;
min-height: 100vh;
height: 100vh;
overflow: hidden;
Comment thread css/style.css

:root { --board-sz: min(90vw, 420px); }
/* Mobile: limit by both viewport width and height to handle short screens */
:root { --board-sz: min(90vw, 440px, calc(55vh)); }
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.

3 participants