Added hover interaction to FAQ items#27
Added hover interaction to FAQ items#27Akash22-cyber wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
WalkthroughUpdated FAQ accordion item card animations and styling in the component. Replaced scroll-based view animations with hover-triggered interactions, modified border styling logic from dynamic pink/grey emphasis to fixed green/grey variants, and adjusted background animation layering to sit behind content with improved visual hierarchy. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 2
🤖 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/Pages/FaqPage/FAQ.tsx`:
- Line 159: Summary: Remove the negative z-index from the background layer to
avoid stacking issues. Locate the div whose className contains "absolute inset-0
-z-10 pointer-events-none overflow-hidden" in FAQ.tsx and remove the "-z-10"
token (leave "absolute inset-0 pointer-events-none overflow-hidden"); if you
need an explicit stacking order, replace "-z-10" with "z-0" instead of a
negative z value so the background stays behind content without risking being
pushed behind sibling sections.
- Around line 99-116: The FAQ card wrapper currently only animates border and
shadow but not the card surface tint; update the className logic on the
container that uses isOpen (the JSX with className={`... ${isOpen ? ... :
...}`}) to also apply a background tint class when isOpen is true and mirror
that same tint for interactive states by adding hover:... and focus-within:...
(and dark: variants) so the surface color changes on open, hover, and keyboard
focus; keep existing border and shadow classes and ensure the tint classes are
present alongside them so whileHover/transition props (y, scale, boxShadow)
continue to work.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ccaa079a-09c0-470b-bfab-912f0533fa23
⛔ Files ignored due to path filters (2)
dist/index.htmlis excluded by!**/dist/**,!**/dist/**package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
src/Pages/FaqPage/FAQ.tsx
| function BackgroundAnimation({ darkMode }: { darkMode: boolean }) { | ||
| return ( | ||
| <div className="absolute inset-0 overflow-hidden"> | ||
| <div className="absolute inset-0 -z-10 pointer-events-none overflow-hidden"> |
There was a problem hiding this comment.
Drop the negative z-index from the background layer.
pointer-events-none already prevents the background from blocking hover. Keeping -z-10 here is risky because the parent section does not create its own stacking context, so this layer can end up behind the section itself or adjacent sections.
Suggested patch
- <div className="absolute inset-0 -z-10 pointer-events-none overflow-hidden">
+ <div className="absolute inset-0 z-0 pointer-events-none overflow-hidden">📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div className="absolute inset-0 -z-10 pointer-events-none overflow-hidden"> | |
| <div className="absolute inset-0 z-0 pointer-events-none overflow-hidden"> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/Pages/FaqPage/FAQ.tsx` at line 159, Summary: Remove the negative z-index
from the background layer to avoid stacking issues. Locate the div whose
className contains "absolute inset-0 -z-10 pointer-events-none overflow-hidden"
in FAQ.tsx and remove the "-z-10" token (leave "absolute inset-0
pointer-events-none overflow-hidden"); if you need an explicit stacking order,
replace "-z-10" with "z-0" instead of a negative z value so the background stays
behind content without risking being pushed behind sibling sections.
Addressed Issues:
This PR fixes the hover interaction issue in the FAQ section by improving responsiveness and animation smoothness.
Fixes #5
Screenshots/Recordings:
After:
Recording.2026-03-24.164717.mp4
Additional Notes:
- -z-10
- pointer-events-none
- subtle elevation (y, scale)
- soft shadow transitions
Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Summary by CodeRabbit