Fix viewport height handling and safe-area layout styles#19
Open
tracygardner wants to merge 1 commit intomainfrom
Open
Fix viewport height handling and safe-area layout styles#19tracygardner wants to merge 1 commit intomainfrom
tracygardner wants to merge 1 commit intomainfrom
Conversation
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.
Motivation
visualViewportwhen available and avoid layout breakage caused by100vhquirks.viewport-fit=coverso UI chrome does not overlap content.Description
adjustViewportblock inmain/view.jsto usewindow.visualViewport?.heightand set both--vhand--app-height, and addedload,resize,orientationchange, andvisualViewport.resizelisteners.:rootCSS block near the top ofstyle.cssdefining--vh,--app-height, and--menu-heightdefaults.html, bodysizing rule to usecalc(var(--vh, 1vh) * 100)fallback and modern100dvh, and addedenv(safe-area-inset-*)paddings tobodyfor safe-area support.#maincontent,#codePanel,#rightAreaand mobile variants to use--app-height/--vhfallbacks and updated#bottomBarto include safe-area-aware bottom padding; removed legacyheight: 100vhandcalc(100vh - ...)usages to avoid conflicts.Testing
rg -n "adjustViewport|100vh|calc\(100vh" main/view.js style.cssto verify the newadjustViewportcode and removal/replacement of direct100vhusages, and the checks returned the expected updated locations.sed/file dumps to confirm the exact replacement blocks are present inmain/view.jsandstyle.css.git status --shortand created a commit (commit succeeded).Codex Task