Fix viewport overflow, board drift, and SQL input layout#5
Merged
Conversation
…t panel Agent-Logs-Url: https://github.com/Devn913/SQL_Chess/sessions/052975b6-ec35-4bd5-b064-c6a2d8159115 Co-authored-by: Devn913 <56478595+Devn913@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Devn913
April 21, 2026 10:26
View session
There was a problem hiding this comment.
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 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 on lines
72
to
+76
| #app { | ||
| display: flex; | ||
| flex-direction: column; | ||
| min-height: 100vh; | ||
| height: 100vh; | ||
| overflow: hidden; |
|
|
||
| :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)); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: 100vh→height: 100vh; overflow: hidden— hard-caps the shell to the viewportbody:overflow-x→overflow: hidden— blocks any axis from scrolling at page leveljustify-content: centerfrom.chess-panel— this was the root cause of board drift; centering a flex column withoverflow-y: autocauses the container to inflate rather than scrollBoard sizing
--board-sznow includescalc(100vh - 280px)as amin()constraint, preventing vertical overflow regardless of panel heightcalc(55vh)for short-screen devicesSQL panel
sql-input-section:border-top→border-bottom(section sits at top of content area, separator belongs below).sql-input-barpadding aligned to match.sql-panel-header(0.6rem 1rem,min-height: 44px)rows4 → 3 for a more compact input blockMove history
max-height: 120px → 160px;scrollbar-width: thinadded for consistent visible scrollMobile (
≤900px)app-mainscrolls vertically instead ofchess-panelheight: 45vh; min-height: 260pxreplacing the oldmax-heightapproach