fix(tauri): keep settings dialog Close button visible with sticky header#357
Merged
silverstein merged 1 commit intoJun 25, 2026
Merged
Conversation
|
@maosuarez is attempting to deploy a commit to the evil genius laboratory Team on Vercel. A member of the Team first needs to authorize it. |
The settings dialog body scrolls internally (`.about-card` has `max-height: calc(100vh - 40px)` + `overflow-y: auto`), but its header `.about-top` — which holds the Close button — was a normal-flow child, so it scrolled out of view in the long settings panel. Pin `.about-top` with `position: sticky; top: 0` and the card's own background (`var(--bg-elevated)`). To make the header pin flush to the card's top edge with no gap, the card's 22px top padding is moved into the header (`.about-card` padding `22px 22px 20px` -> `0 22px 20px`, `.about-top` gains `padding-top: 22px`). Full-bleed side margins (`margin: 0 -22px 0`) let the header background reach the card edges so content scrolling underneath is fully covered. Dimensions are unchanged. CSS-only and platform-agnostic; macOS is visually identical — the About and Settings dialogs render pixel-identical at rest, and sticky is inert for the short About dialog that never scrolls. Closes silverstein#354 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
49f6db4 to
f30d51d
Compare
This was referenced Jun 25, 2026
Merged
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.
Summary
The Close button in the Settings dialog scrolls out of view when the panel is taller than the viewport. This pins the dialog header so the button is always reachable.
Closes #354.
Problem
.about-cardscrolls internally (max-height: calc(100vh - 40px); overflow-y: auto). Its child.about-top— which holds the dialog title and the Close button — was a normal-flow element, so it scrolled away with the content. On Windows the Settings panel is long enough to trigger this consistently; the same can happen on any platform whenever the window is short enough to cause overflow.Fix
CSS-only. The header is pinned with
position: sticky, and the card's top padding is moved into the header so it pins flush to the card's top edge:position: sticky; top: 0pins the header at the top of the scrollable card.background: var(--bg-elevated)is the card's own surface token, so content does not show through as it scrolls underneath.22pxtop padding into the header'spadding-topmakes the scrollport start at the card's top border, so the header pins flush with no gap above it — and the full-bleed side margins (margin: 0 -22px 0) let the header background reach the card edges, fully covering content scrolling underneath with no peek at the sides.22px, and the16pxgap below the header is preserved.Why this approach
An earlier iteration used a negative top margin to cover the card padding, but that fights
position: sticky: at rest the negative margin places the header at the card border, whiletop: 0re-anchors it22pxlower (at the padding edge) during scroll — producing a floating gap above the header and overlap below it. Moving the top padding into the header avoids that entirely: the pinned position and the rest position coincide.Platform behaviour
position: stickyis inert when a dialog fits without scrolling..about-top/.about-cardare shared by both the About and Settings dialogs. The About dialog is short and never overflows, so it is unaffected — intended behaviour.No Rust changes. No new dependencies.
Maintainer approval
silverstein green-lit this approach in the issue thread:
Testing
Verified visually by rendering the Settings dialog markup with the patched CSS in a standalone harness (Chrome headless, dark theme), captured at scroll top and mid-scroll:
22pxinset and the usual16pxgap to the first section.No Rust unit tests apply (CSS-only change). macOS path is a visual no-op (sticky is inert without overflow).