generated from lucas/rust-webserver-template
fix(view): make the log list the scroll container #48
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat/Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Tag/Good First Issue
Tag/Help Wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/logview!48
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-43-log-list-scroller"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes: #43
The log list, not the window, now owns the vertical scrolling, and nowrap rows paint across the full scroll width.
What changed
Scroller.
body:has(.log-list)becomes a flex column of100dvh; the section and its container pass the bound down, and.log-listtakes what the chrome leaves (flex: 1; min-height: 0). Theoverflow-y: autothatoverflow-x: autoalready implied is now the vertical scroller.This is a flex chain rather than
height: calc(100dvh - navbar - view-bar): the view bar's height is not a constant (title line vs..button.is-smallmetrics), and the issue names both failure modes of guessing it wrong — a double scrollbar or a clipped last row. The flex chain derives it instead. Scoped on:has(.log-list)so the error and empty states keep the window scroller and stay fully readable: an upstream error is surfaced verbatim and untruncated, and must not be clipped by a viewport-height body.Chrome.
position: sticky/top/z-indexare gone from.navbarand.view-bar, together with the opaquebackgroundon the view bar that existed only to cover what was scrolling underneath it. Both bars sit in normal flow; the hairline rules stay. The zero-padding rules at the section and container stay too, but their comment no longer cites the Firefox sticky-strip hazard, which no longer applies — only the edge-to-edge density argument remains.Nowrap width.
width: max-content; min-width: 100%moves off.log-rowand onto the list asgrid-template-columns: minmax(max-content, 1fr). A row's ownmin-width: 100%resolves against the list's visible width, never its scroll width, which is exactly why short rows stopped painting where the scrolled-to region began. The track holds at the widest row's width and grows to fill the list when every row is narrower; rows stretch to it either way.The
padding-bottomthat keeps the newest row clear of Firefox's overlay horizontal scrollbar is still needed — with the list as scroller the bar overlays the list's own bottom edge — and is joined by a matchingscroll-padding-bottom, otherwisescrollIntoViewwould align the row with the scrollport edge and put it straight back under the bar.JS.
window.scrollTo(0, document.body.scrollHeight)→list.lastElementChild?.scrollIntoView({ block: "end" }).Verification
just test(12 + 2 integration tests, unit tests — no assertion moved),cargo clippy --all-targets -- -D warnings,cargo fmt --check, stylelint and Biome all pass.None of the behaviour above is observable to that harness, and CI has no browser, so it was measured in headless Chromium against the compiled stylesheet and a fixture reproducing the rendered page (200 rows, one much wider than the viewport, 1280×800):
documentScrollHeight == innerHeightpositionrelative(Bulma's own) /staticscrollHeight4712 vsclientHeight696scrollWidth3371 vsclientWidth1280scrollWidth == clientWidth)scrollTop == maxScrollTop, last row's bottom 12px (0.75rem) above the list's edgeFirefox's overlay scrollbar itself is not reproducible headless, so the
padding-bottom/scroll-padding-bottompair still wants a look in a real Firefox.The
.is-readyopacity gate is untouched;tests/views.rsasserts rendered HTML only and needed no change.Not done here
docs/STATUS.mdis stale in ways unrelated to this change (it claimssrc/views/,templates/views/andtemplates/partials/log_row.htmldo not exist). Left alone, as the issue asks.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.