Fix flash toast clipped behind the sticky admin header #134

Merged
hannah-vernon merged 1 commit from fix/flash-toast-header-clip into dev 2026-09-24 16:12:36 -05:00
Owner

What does this PR do?

Fixes the confirmation toast rendering clipped behind the sticky admin header.

The toast used position: fixed; top: 1rem, but the admin header is position: sticky; top: 0; z-index: 100 and roughly 5rem tall. The toast sat inside the header's vertical band with a lower z-index, so the header painted over it and hid everything above its bottom edge. On /decisions, an approve produces a two-sentence message (Decision approved. Ban action <id> queued for <ip>.), so only the trailing line (the IP) showed below the nav, which looked like a stray fragment.

The fix drops the toast below the header: top: 5.25rem on wide screens (matching the html scroll-padding-top that already reserves that band for fragment jumps) and 6.75rem under 900px, where the header collapses to one row and section-index pages pin a sticky chip row just beneath it. Positioning only; the out-of-flow behaviour, fade timer, and dismissal are unchanged.

How was this tested?

  • dotnet build - not required (CSS-only static asset; no C# changed)
  • dotnet test - not required
  • Manually verified the affected rule against the sticky-header offsets (scroll-padding-top 5rem desktop / 6.5rem mobile, .admin-header z-index 100)

Checklist

  • I have read the Contributing Guide
  • Changes are focused - one logical change per PR
  • Documentation updated (README.md / DECISIONS.md / TODO.md / AGENT-README.md, if applicable) - not applicable (no behavioural or structural change)
  • New dependencies are MIT/Apache-2.0/BSD, security-vetted, and recorded in THIRD-PARTY-NOTICES.md - no new dependencies
  • No secrets, credentials, or real infrastructure identifiers in the diff
  • No commented-out code or debug leftovers
## What does this PR do? Fixes the confirmation toast rendering clipped behind the sticky admin header. The toast used `position: fixed; top: 1rem`, but the admin header is `position: sticky; top: 0; z-index: 100` and roughly 5rem tall. The toast sat inside the header's vertical band with a lower `z-index`, so the header painted over it and hid everything above its bottom edge. On `/decisions`, an approve produces a two-sentence message (`Decision approved. Ban action <id> queued for <ip>.`), so only the trailing line (the IP) showed below the nav, which looked like a stray fragment. The fix drops the toast below the header: `top: 5.25rem` on wide screens (matching the `html scroll-padding-top` that already reserves that band for fragment jumps) and `6.75rem` under 900px, where the header collapses to one row and section-index pages pin a sticky chip row just beneath it. Positioning only; the out-of-flow behaviour, fade timer, and dismissal are unchanged. ## How was this tested? - [ ] `dotnet build` - not required (CSS-only static asset; no C# changed) - [ ] `dotnet test` - not required - [x] Manually verified the affected rule against the sticky-header offsets (`scroll-padding-top` 5rem desktop / 6.5rem mobile, `.admin-header` z-index 100) ## Checklist - [x] I have read the [Contributing Guide](../CONTRIBUTING.md) - [x] Changes are focused - one logical change per PR - [x] Documentation updated (README.md / DECISIONS.md / TODO.md / AGENT-README.md, if applicable) - not applicable (no behavioural or structural change) - [x] New dependencies are MIT/Apache-2.0/BSD, security-vetted, and recorded in THIRD-PARTY-NOTICES.md - no new dependencies - [x] No secrets, credentials, or real infrastructure identifiers in the diff - [x] No commented-out code or debug leftovers
The confirmation toast used position: fixed; top: 1rem while the admin header
is position: sticky; top: 0; z-index: 100 and about 5rem tall.  Because the
toast sits 1rem from the top with a lower z-index, the header rendered over it
and clipped everything above its bottom edge.  On the decisions page an approve
returns a two-sentence message ("Decision approved.  Ban action <id> queued for
<ip>."), so only the trailing line showed below the nav.

Move the toast below the header: top: 5.25rem on wide screens (matching the
html scroll-padding-top that already reserves this band for fragment jumps) and
6.75rem under 900px, where the header collapses to one row and section-index
pages pin a sticky chip row just beneath it.  Positioning only; no change to the
out-of-flow behaviour, fade timer, or dismissal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hannah-vernon/viegard-sentinel!134
No description provided.