Repository navigation
feat(voting): keep the vote buttons in reach on the proposal page - #490
Merged
Merged
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 300126e. Security OverviewDetected Code Changes
|
📊 Build Bundle StatsThe latest build generated the following assets: |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The jump behavior suppresses visible focus and does not honor reduced-motion preferences.
2 open findings
What changed in this PR
Adds vote shortcuts to proposal details for eligible users.
Changes:
- Adds desktop and mobile jump-to-vote controls.
- Focuses and smoothly scrolls to the voting card.
- Adds visibility and eligibility tests.
| File | Description |
|---|---|
routes/_auth/voting/proposals/$id/index.tsx |
Integrates vote shortcuts. |
i18n/en/proposal.json |
Adds the Vote label. |
features/proposals/utils.ts |
Adds voting-card navigation utilities. |
features/proposals/components/ProposalJumpToVote.tsx |
Implements responsive shortcuts. |
features/proposals/components/ProposalJumpToVote.test.tsx |
Tests shortcut behavior. |
features/proposals/components/ProposalDetailsVoting.tsx |
Makes the voting card focusable. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
yhabib
marked this pull request as draft
October 14, 2026 14:42
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
October 14, 2026 15:10
yhabib
force-pushed
the
ux/proposal-jump-to-vote
branch
from
October 15, 2026 09:42
43d7023 to
af3e4b1
Compare
yhabib
marked this pull request as ready for review
November 5, 2026 10:41
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
For long proposals without a selfDescribingAction, the strict boundary comparison can leave the footer floating at maximum scroll, requiring equality to trigger docking and an exact-boundary test.
1 open issue
1 resolved since last review
Review effort: Balanced
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
November 5, 2026 11:17
artkorotkikh-dfinity
approved these changes
Nov 5, 2026
yhabib
enabled auto-merge
November 5, 2026 15:27
Add a "Vote" badge link to the header badge row. It scrolls smoothly to the voting card and moves the focus to it. Below the lg breakpoint, show a sticky "Vote" button above the bottom navigation. Hide it when the voting card is in view or above it. Show both only when the user can vote on the proposal.
…card Replace the jump link and the sticky jump button with a sticky footer. The Yes/No buttons float at the bottom of the page while the voting card is below it, and dock under the card when the user reaches it. Show the footer only when the user can vote. Keep the "Vote cast" footer inside the card.
…cked footer Recreate the observer when the size of main changes, so the docked state follows the bottom padding at each breakpoint. Draw the footer outline with inset shadows. A transparent top border left a 1px notch in the side borders where the footer joins the card.
The Yes button used a light tint on hover in dark mode, and the No button used a dark tint. Both now use the 900 shade at 10%.
yhabib
force-pushed
the
ux/proposal-jump-to-vote
branch
from
November 5, 2026 15:39
de30fdc to
300126e
Compare
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.

Motivation
On the proposal page, the vote buttons are in the voting card after the summary. A long summary pushes them far down, so users must scroll a lot before they can vote.
Changes
IntersectionObserveron a sentinel to switch between the floating and the docked style.Screenshots
Videos
The page scrolls through the summary to the voting card, back up, and down again.
Mobile
proposal-docking-mobile.mp4
Desktop
proposal-docking-desktop.mp4
Prev. #576 | Next #503