Fix hover flickering on “Learn More About Us” button#577
Fix hover flickering on “Learn More About Us” button#577prashantkumarniraj wants to merge 6 commits intoAOSSIE-Org:mainfrom
Conversation
📝 WalkthroughWalkthroughA new organization statistics configuration object is introduced and integrated across multiple pages. Social media icon references are updated from Twitter to X, and certain link components are restructured. The "Learn More About Us" button implementation is reworked, addressing a reported hover flickering issue. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 4❌ Failed checks (4 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/pages/index.jsx (2)
107-110:⚠️ Potential issue | 🟠 MajorOuter shadow span still uses margin-based hover — inconsistent with the flicker fix.
The PR objective is to replace margin transitions with transform-based animations to prevent layout reflow. The inner span (line 104) was correctly updated to use
transition-transformwithtranslate, but this outer span still usesgroup-hover:m-0withtransition-all, which triggers layout reflow on hover. This could still contribute to the flickering.🔧 Proposed fix: convert margin animation to transform
<span - className="absolute bottom-0 right-0 mb-3 mr-2 h-14 w-full rounded-lg bg-[`#00843D`] transition-all duration-200 ease-linear group-hover:m-0 dark:bg-yellow-400" + className="absolute bottom-0 right-0 -translate-x-0 -translate-y-0 mb-3 mr-2 h-14 w-full rounded-lg bg-[`#00843D`] transition-transform duration-200 ease-linear will-change-transform group-hover:translate-x-[0.5rem] group-hover:translate-y-[0.75rem] dark:bg-yellow-400" data-rounded="rounded-lg" ></span>Note: The exact translate values need to be tuned to match the visual effect that
group-hover:m-0was producing (resettingmb-3 mr-2tom-0). The key point is to usetransforminstead ofmarginfor the animation.
99-111:⚠️ Potential issue | 🔴 CriticalAdd missing button text and complete the hover flickering fix.
The button at lines 100–111 is missing its label: the
"Learn More About Us"text was accidentally removed during the hover fix. Additionally, the flickering fix is incomplete—the inner span (line 104–106) was correctly changed to usetransition-transformandgroup-hover:-translate-x-2/-y-2, but the outer shadow span (lines 107–110) still uses the problematic margin-based animation (transition-allandgroup-hover:m-0), which continues to cause layout reflow and flickering. Both the outer span's animation and the missing button text must be restored or corrected.
🧹 Nitpick comments (3)
src/components/Footer.jsx (1)
64-70: Aria-label says "Twitter" but the icon is now X (faXTwitter).The icon was updated to
faXTwitterto reflect the rebranding, but thearia-labelstill reads "Follow on Twitter". For consistency with the icon change, consider updating it to "Follow on X" (same applies to the identical link insrc/pages/index.jsxat line 92).src/pages/index.jsx (1)
104-106: Broken indentation makes the JSX nesting hard to follow.The closing
</span>tags on lines 105–106 lost their indentation, making it difficult to visually trace which opening tag each one corresponds to. This is especially important here since the button text appears to be missing — clean formatting would make the structural issue more obvious.src/pages/about.jsx (1)
189-189: Redundantlg:text-6xl— already covered bysm:text-6xl.Since
sm:text-6xlapplies from thesmbreakpoint upward andlg > sm, thelg:text-6xlclass is redundant here.🧹 Remove redundant breakpoint class
- <h1 className="font-mono text-2xl font-extrabold tracking-tighter text-[`#32a852`] dark:text-yellow-400 sm:text-6xl lg:text-6xl"> + <h1 className="font-mono text-2xl font-extrabold tracking-tighter text-[`#32a852`] dark:text-yellow-400 sm:text-6xl">
This PR fixes a hover flickering issue affecting the “Learn More About Us” button
in both light and dark modes.
The issue was caused by margin-based hover transitions on an absolutely positioned
background element, which triggered layout reflow and hover instability.
The fix replaces margin transitions with transform-based animations, ensuring
a smooth and stable hover effect without altering the visual design.
Fixes #572
Summary by CodeRabbit
New Features
Updates