Skip to content

feat(ui): tab icon pop animation and logo tap target - #324

Merged
tiero merged 8 commits into
masterfrom
feat/tab-animation-logo
Feb 25, 2026
Merged

tiero merged 8 commits into
masterfrom
feat/tab-animation-logo

Conversation

@sahilc0

@sahilc0 sahilc0 commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add pop animation to tab bar icons on tap (scale 1→1.18→1, 250ms spring easing)
  • Increase logo easter egg tap target from ~47px to 71px using invisible padding
  • Respect prefers-reduced-motion for all animations

Files changed

  • src/App.tsx — AnimatedTabIcon component, animation trigger on tab selection
  • src/index.css — @keyframes tab-pop, .tab-icon-animated wrapper, reduced-motion media query
  • src/icons/Logo.tsx — padding 18px / margin -18px for larger tap area

Test plan

  • Tap each tab (Wallet, Apps, Settings) — icon should pop/scale briefly
  • Tap logo — easter egg should trigger easily with the larger tap target
  • Enable "Reduce motion" in OS accessibility settings — animations should be disabled
  • Verify no layout shift from logo padding change

Summary by CodeRabbit

  • New Features
    • Tab icons now feature a subtle pop animation when selected, giving clearer visual feedback.
    • Logo hit area and layout improved for easier tapping/clicking.
    • Respect for reduced-motion accessibility preferences added to disable these animations when requested.

Add pop animation to tab bar icons on tap using CSS keyframes.
AnimatedTabIcon component triggers scale animation on tab selection
with spring easing and prefers-reduced-motion support.

Increase logo tap target from ~47px to 71px using invisible padding
(18px around the 35px icon) so the easter egg is easier to activate.

Files: src/App.tsx, src/index.css, src/icons/Logo.tsx
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 23, 2026 •

Copy link
Copy Markdown

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4e865cb
Status: ✅  Deploy successful!
Preview URL: https://f0dc6982.wallet-bitcoin.pages.dev
Branch Preview URL: https://feat-tab-animation-logo.wallet-bitcoin.pages.dev

View logs

@coderabbitai

coderabbitai Bot commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds per-tab icon animations: App component gains animatingTab state and a triggerTabAnim callback; tab click handlers invoke it. Icons for Wallet, Apps, and Settings are wrapped with an AnimatedTabIcon component. CSS keyframes and classes provide the scale “pop” animation with reduced-motion support.

Changes

Cohort / File(s) Summary
Tab Animation Feature
src/App.tsx, src/index.css
Adds animatingTab state and triggerTabAnim callback in App.tsx; introduces AnimatedTabIcon wrapper and updates tab click handlers to trigger animations. index.css adds .tab-icon-animated, .tab-anim-pop, and @keyframes tab-pop plus reduced-motion rules.
Logo Layout Adjustment
src/icons/Logo.tsx
Modifies outer div inline styles to include padding: 18, margin: -18, and boxSizing: 'content-box', adjusting hit-area/layout only.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • pietro909
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding tab icon pop animations and improving the logo tap target area.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/tab-animation-logo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 23, 2026 •

Copy link
Copy Markdown

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4e865cb
Status: ✅  Deploy successful!
Preview URL: https://10d2a4d6.arkade-wallet.pages.dev
Branch Preview URL: https://feat-tab-animation-logo.arkade-wallet.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/index.css`:
- Around line 199-222: The new CSS block for the tab animation
(.tab-icon-animated, `@keyframes` tab-pop, .tab-anim-pop and the
prefers-reduced-motion media query) is not formatted per project Prettier rules;
run Prettier (or your project's formatting command) on src/index.css and commit
the resulting formatted block so the animation styles match the repository's
styling conventions and clear the CI Prettier warning.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76980ec and 1928576.

📒 Files selected for processing (3)
  • src/App.tsx
  • src/icons/Logo.tsx
  • src/index.css

Comment thread src/index.css Resolved
Comment thread src/App.tsx Outdated
if (!animating || !ref.current) return
const el = ref.current
el.classList.remove(animClass)
void el.offsetWidth

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing? Seems like a no-op

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

void el.offsetWidth forces a browser reflow — it's a standard trick to reset CSS animations. Without it, removing and re-adding the animation class in the same frame has no effect because the browser batches DOM changes. Reading offsetWidth forces the browser to recalculate layout between the remove and add, so the animation plays again. Added a comment to clarify.

^ written by Claude

@bordalix bordalix left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, check @pietro909 comment

@tiero

tiero commented Feb 24, 2026

Copy link
Copy Markdown
Member

@sahilc0 pull before doing more changes solved conflicts for you

Comment thread src/App.tsx
const el = ref.current
el.classList.remove(animClass)
void el.offsetWidth
void el.offsetWidth // Force reflow so removing + re-adding the class triggers the animation

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/App.tsx (1)

40-51: Hoist animClass to module scope to silence react-hooks/exhaustive-deps.

animClass is defined inside the component but used in useEffect without being listed as a dependency. It's a constant string so behavior is correct, but ESLint's exhaustive-deps rule will flag it. Moving it outside the component is the idiomatic fix.

♻️ Proposed fix
+const ANIM_CLASS = 'tab-anim-pop'
+
 function AnimatedTabIcon({ children, animating }: { children: React.ReactNode; animating: boolean }) {
   const ref = useRef<HTMLDivElement>(null)
-  const animClass = 'tab-anim-pop'
 
   useEffect(() => {
     if (!animating || !ref.current) return
     const el = ref.current
-    el.classList.remove(animClass)
+    el.classList.remove(ANIM_CLASS)
     void el.offsetWidth // Force reflow so removing + re-adding the class triggers the animation
-    el.classList.add(animClass)
-    const handleEnd = () => el.classList.remove(animClass)
+    el.classList.add(ANIM_CLASS)
+    const handleEnd = () => el.classList.remove(ANIM_CLASS)
     el.addEventListener('animationend', handleEnd)
     return () => el.removeEventListener('animationend', handleEnd)
   }, [animating])
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/App.tsx` around lines 40 - 51, animClass is defined inside the component
but used in the useEffect hook without being listed as a dependency, which
triggers react-hooks/exhaustive-deps; move the const animClass = 'tab-anim-pop'
out of the component to module scope (above the component declaration) and leave
all uses in the effect and component (references to animClass in the useEffect
that manipulates ref.current, el.classList, handleEnd, and the animating
dependency) unchanged so the string is stable and the linter no longer requires
it in the dependency array.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/App.tsx`:
- Around line 40-51: animClass is defined inside the component but used in the
useEffect hook without being listed as a dependency, which triggers
react-hooks/exhaustive-deps; move the const animClass = 'tab-anim-pop' out of
the component to module scope (above the component declaration) and leave all
uses in the effect and component (references to animClass in the useEffect that
manipulates ref.current, el.classList, handleEnd, and the animating dependency)
unchanged so the string is stable and the linter no longer requires it in the
dependency array.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89ca15f and 9655b17.

📒 Files selected for processing (2)
  • src/App.tsx
  • src/icons/Logo.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/icons/Logo.tsx

@tiero
tiero merged commit ca6d0ad into master Feb 25, 2026
5 checks passed
@bordalix
bordalix deleted the feat/tab-animation-logo branch March 4, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants