Repository navigation
Conversation
Each sidebar icon plays a small motion when the pointer rests on its row. The motion is CSS on the icon parts, with no new dependency.
|
✅ No security or compliance issues detected. Reviewed everything up to 1265eb2. Security OverviewDetected Code Changes
|
📊 Build Bundle StatsThe latest build generated the following assets: |
Contributor
There was a problem hiding this comment.
🟢 Approved
No active review issues remain for the sidebar icon hover-animation changes.
No open issues 🎉
What changed in this PR
Adds dependency-free hover animations to sidebar icons, bringing motion to navigation while keeping icons still for touch input and reduced-motion preferences.
Changes:
- Introduces a 150ms pointer-dwell trigger that lets animations finish without restarting on re-entry.
- Adds distinct CSS motions for the dashboard, wallet, neuron, vote, and settings icons.
- Tests trigger timing, touch handling, animation completion, and unmount cleanup.
| File | Description |
|---|---|
src/governance-app-frontend/src/common/hooks/useIconMotion.ts |
Manages pointer dwell and animation lifecycle. |
src/governance-app-frontend/src/common/hooks/useIconMotion.test.tsx |
Tests motion-trigger behavior and cleanup. |
src/governance-app-frontend/src/common/components/navigation/Sidebar.tsx |
Attaches motion handlers to navigation rows. |
src/governance-app-frontend/src/common/components/icons/NeuronIcon.tsx |
Adds a CSS targeting class while preserving caller classes. |
src/governance-app-frontend/src/app/styles/main.css |
Defines icon animations gated by reduced-motion preferences. |
Review effort: Balanced
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
The sidebar icons felt static. The control panel now plays a small motion on each nav icon, in the style of Resend (dfinity/control-panel#4806). This brings the same feel here, with CSS on the icon parts and no new dependency.
Changes
useIconMotion, which plays the motion after the pointer rests on a row for 150ms.neuron-iconclass, so the CSS can find the custom neuron icon.Screenshots