feat: redesign poll UX for cleaner native feed experience#274
Conversation
Redesign PollDisplay to feel embedded in the feed rather than like a separate component. Key changes: - Remove outer border/padding/background wrapper so polls flow naturally within notes - Remove badge pills (Single choice, Ends date) — metadata condensed into a single footer line: "38 votes · Ends in 2 days" - Image polls: gradient overlay for labels directly on images instead of separate label boxes; check badge for selected/voted state; large percentage overlay on results; subtle progress bar - Text polls: stacked list instead of 2-column grid; lighter 1px borders; horizontal fill bars for results with animated grow; inline SVG checks instead of radio/checkbox indicators - Unified interaction model: both poll types use the same check badge, same footer structure, same result presentation - Better mobile: larger tap targets, less vertical clutter, compact metadata, thumb-friendly spacing - Dark-mode-first color handling with CSS custom properties - Smooth fillGrow animation on result bars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
frontend | e1e0e9e | Mar 26 2026, 10:34 AM |
There was a problem hiding this comment.
Pull request overview
This PR redesigns PollDisplay to make polls visually blend into the native feed UI (removing the “boxed component” feel) while unifying interaction and results presentation for image and text polls.
Changes:
- Reworked poll layout/styling: removed outer wrapper/badges, added unified footer metadata and actions.
- Redesigned image polls (gradient label overlay, percent + progress bar, check badge).
- Redesigned text polls (stacked rows, animated fill bar, inline SVG checkmark).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/components/PollDisplay.svelte |
Major UI/UX refactor for poll rendering, results display, and footer metadata/actions. |
package.json |
Bumps app version to 4.2.122. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/components/PollDisplay.svelte
Outdated
| {/if} | ||
| </div> | ||
| {/if} | ||
| {:else if displayResults && !userVoted && !expired && !voted} |
There was a problem hiding this comment.
The "Back to vote" action will be shown when the viewer is not logged in ($userPublickey is falsy), because displayResults is always true in that case and userVoted is always false. Clicking it only sets showResults = false, but displayResults stays true (due to || !$userPublickey), so the UI cannot switch back to vote mode and the button becomes a no-op. Consider hiding this action unless $userPublickey is present (and the user can actually vote), or adjust the condition to only show it when showResults is true and a vote mode is possible.
| {:else if displayResults && !userVoted && !expired && !voted} | |
| {:else if displayResults && $userPublickey && !userVoted && !expired && !voted} |
src/components/PollDisplay.svelte
Outdated
| {#if pollData.pollType === 'multiplechoice'} | ||
| <span class="poll-meta-dot">·</span> Multiple choice | ||
| {/if} |
There was a problem hiding this comment.
The footer only renders a type label for multiplechoice, but never for singlechoice. The PR description/test plan mentions the footer includes "... · type"; if the type is still meant to be shown consistently, this should also render something like "Single choice" (or update the description/test plan to match the intended behavior).
| .poll-img-card-vote:hover:not(:disabled) { | ||
| border-color: var(--color-primary, #f97316); | ||
| color: inherit; | ||
| font: inherit; |
There was a problem hiding this comment.
.poll-card sets cursor: pointer, but in results mode the markup uses a non-interactive <div class="poll-card">. This will still show a pointer cursor on hover even though the element isn't clickable, which is misleading. Consider moving the pointer cursor styling to button.poll-card only (or overriding cursor to default for the results <div> variant).
| font: inherit; | |
| font: inherit; | |
| } | |
| button.poll-card { |
- Hide "Back to vote" button for logged-out users (displayResults is always true when not signed in, making the button a no-op) - Show poll type label consistently (Single choice / Multiple choice) in footer metadata for all poll types - Move cursor:pointer to button.poll-card only so result-mode divs don't show a misleading pointer cursor Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
38 votes · Ends in 2 days.What changed visually
Test plan
🤖 Generated with Claude Code