fix(vote): hide sticky submit bar when empty after success banner expires - #133
Open
DavidSchmidt00 wants to merge 1 commit into
Open
fix(vote): hide sticky submit bar when empty after success banner expires#133DavidSchmidt00 wants to merge 1 commit into
DavidSchmidt00 wants to merge 1 commit into
Conversation
…ner expires The .vote-submit-row div has a sticky gradient background that remained visible as an empty black strip after sessionSubmitted flipped back to false (10 s after submit). Wrap the div in a conditional so it is only rendered when there is actual content to show. Co-Authored-By: AI Agent <noreply@agent>
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.
Problem
After submitting a vote, the success banner ("✓ Stimme abgegeben") auto-hides after 10 seconds (
sessionSubmitted→false). However, the.vote-submit-rowcontainer — which hasposition: sticky,padding, and a gradientbackground— remained rendered with no children, appearing as a persistent empty black strip at the bottom of the page.Root cause
The conditional logic only controlled the content inside the div, not the div itself. When both
submittedVotes !== nullandsessionSubmitted === false, the inner expression evaluates tonullbut the wrapper<div className="vote-submit-row">still rendered with its background and padding.Fix
Wrap the entire
<div className="vote-submit-row">in a conditional:The bar now only renders when there is actual content: either the name input + submit button (pre-submit), or the success label (10 s window post-submit).
Test plan
https://claude.ai/code/session_01Y9SKqkQP7DxXSe1TnXynin
Generated by Claude Code