Skip to content

feat(landing): PR for issue #714 Improve Gallery Feature Interaction (hover delay + cursor cleanup) #715

Merged
rahulharpal1603 merged 2 commits into
AOSSIE-Org:mainfrom
Supritha-gurazala:fix/gallery-hover-delay
Feb 4, 2026
Merged

feat(landing): PR for issue #714 Improve Gallery Feature Interaction (hover delay + cursor cleanup) #715
rahulharpal1603 merged 2 commits into
AOSSIE-Org:mainfrom
Supritha-gurazala:fix/gallery-hover-delay

Conversation

@Supritha-gurazala
Copy link
Copy Markdown
Contributor

@Supritha-gurazala Supritha-gurazala commented Dec 11, 2025

Summary:

Summary by CodeRabbit

  • Style

    • Doubled the marquee scroll distance on the Demo page for a longer horizontal animation.
    • FAQ items now use conditional border styling to visually distinguish open vs closed states.
  • Behavior

    • "How It Works" steps now activate on hover (1-second delay) and deactivate on mouse leave, replacing the previous click toggle.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 11, 2025

Walkthrough

Adjusts three landing-page UI behaviors: doubles marquee scroll distance, replaces click-to-toggle with a 1s hover-activation (with per-index timers) for HowItWorks steps, and makes FAQ container border classes conditional on open state.

Changes

Cohort / File(s) Summary
Marquee Animation
landing-page/src/Pages/Demo/marqu.tsx
Animation target changed from -100% to -200%, doubling horizontal travel distance; loop/duration/transition untouched.
Hover-Based Step Activation
landing-page/src/Pages/HowItWorks/HowItWorks.tsx
Replaced click toggle with onMouseEnter/onMouseLeave; added useRef hoverTimers to track per-index 1s activation timers and cancel on leave; active-state now hover-driven.
FAQ Border Styling
landing-page/src/Pages/FaqPage/FAQ.tsx
Replaced static container classes with a conditional template string to apply different border classes when isOpen is true vs false; visual-only change.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

enhancement

Suggested reviewers

  • rahulharpal1603

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The marqu.tsx marquee animation change (-100% to -200%) appears unrelated to the #714 requirements of hover delay and cursor cleanup, representing an out-of-scope modification. Remove the marqu.tsx animation distance change or clarify its relationship to issue #714 requirements. This modification should be in a separate PR if intentional.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references issue #714 and describes the main changes: hover delay and cursor cleanup for gallery feature interaction, which directly aligns with the changeset.
Linked Issues check ✅ Passed The PR implements the core requirements from #714: 1s hover delay before card expansion (HowItWorks.tsx) and cursor styling changes. However, unit tests remain uncompleted as noted in the issue checklist.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
landing-page/src/Pages/Demo/marqu.tsx (1)

35-41: Confirm intended marquee speed after increasing travel distance

Changing x from -100% to -200% with the same duration: 10 doubles the scroll speed. If the goal was only to lengthen the loop while keeping the old pace, consider bumping duration to ~20s to preserve the previous feel.

landing-page/src/Pages/HowItWorks/HowItWorks.tsx (2)

2-3: Tighten hover timer typing and add unmount cleanup

The hoverTimers pattern is good, but two small refinements would make it more robust:

  • Use ReturnType<typeof setTimeout> instead of number to avoid env-specific timer ID assumptions.
  • Clear any pending timers on unmount to avoid possible “state update on unmounted component” warnings.

For example:

-import { useState, useRef } from "react";
+import { useState, useRef, useEffect } from "react";

 const [activeStep, setActiveStep] = useState<number | null>(null);
-const hoverTimers = useRef<Record<number, number | null>>({});
+const hoverTimers = useRef<Record<number, ReturnType<typeof setTimeout> | null>>({});

+useEffect(() => {
+  return () => {
+    Object.values(hoverTimers.current).forEach((t) => {
+      if (t != null) clearTimeout(t);
+    });
+  };
+}, []);

Also applies to: 36-38


57-75: Hover delay logic looks correct; confirm 1s vs 2s requirement and add non-hover fallback

The enter/leave handlers implement a 1s intentional-hover delay and cancel activation when the user leaves early, and they immediately collapse the card on leave when active — all aligned with the “reduce accidental flashes” goal.

Two follow-ups to consider:

  • Your PR text mentions cancelling expansion if hover is less than 2s, but the code uses a 1s timer. If you truly need a 2s threshold, adjust the timeout value here (and any UX copy) accordingly.
  • Activation is currently mouse-hover only. For touch and keyboard users, you may want a fallback (e.g., onClick and/or onFocus/onBlur mirroring this logic, or making the card a focusable button/anchor) so the details remain discoverable and accessible.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d07d817 and 0443340.

📒 Files selected for processing (2)
  • landing-page/src/Pages/Demo/marqu.tsx (1 hunks)
  • landing-page/src/Pages/HowItWorks/HowItWorks.tsx (3 hunks)

@github-actions github-actions Bot added UI documentation Improvements or additions to documentation good first issue Good for newcomers labels Dec 15, 2025
@Supritha-gurazala
Copy link
Copy Markdown
Contributor Author

Demo video :

PR1.demo.mp4

This clip demonstrates the updated hover behavior for Gallery feature cards:

  • Introduces a 1s hover delay before expansion
  • After 1s sustained hover, the card expands to reveal content

This resolves the earlier issue where cards expanded instantly on hover and used an emoji cursor, leading to accidental content flashes and inconsistent desktop interactions.

@rahulharpal1603 added a short demo video showing the updated hover delay behavior and how it resolves the accidental expansion issue.

@Supritha-gurazala Supritha-gurazala changed the title feat(landing): Draft PR for #714 feat(landing): PR for issue #714 Improve Gallery Feature Interaction (hover delay + cursor cleanup) Dec 15, 2025
@Supritha-gurazala
Copy link
Copy Markdown
Contributor Author

PR ready for review @rahulharpal1603

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0443340 and 77781ed.

📒 Files selected for processing (1)
  • landing-page/src/Pages/FaqPage/FAQ.tsx
🔇 Additional comments (1)
landing-page/src/Pages/FaqPage/FAQ.tsx (1)

99-105: Clarify the relationship between FAQ changes and PR objectives.

The PR objectives describe improvements to gallery feature interaction (hover delay, cursor cleanup), but this file modifies FAQ border styling. Please confirm whether:

  • This FAQ change is intentionally included as part of a broader UI polish effort, or
  • The PR contains unrelated changes that should be split into separate PRs.

Comment on lines +99 to +105
className={`rounded-xl overflow-hidden transition-all duration-300
bg-white dark:bg-black
border
${isOpen
? 'border- 6 border-pink-500 dark:border-grey-500'
: 'border- 6 - dark:border-grey-500'}
`}
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.

⚠️ Potential issue | 🔴 Critical

Fix invalid CSS class names with embedded spaces.

Lines 103-104 contain malformed Tailwind CSS classes:

  • 'border- 6 border-pink-500 dark:border-grey-500' — "border- 6" has a space
  • 'border- 6 - dark:border-grey-500' — "border- 6 -" has spaces

These invalid classes will not render, breaking the intended open/closed border styling. Additionally, Tailwind uses gray not grey for color names.

🔎 Proposed fix
-      className={`rounded-xl overflow-hidden transition-all duration-300 
-  bg-white dark:bg-black
-  border
-  ${isOpen 
-    ? 'border- 6 border-pink-500 dark:border-grey-500' 
-    : 'border- 6 - dark:border-grey-500'}
-`}
+      className={`rounded-xl overflow-hidden transition-all duration-300 
+  bg-white dark:bg-black
+  border
+  ${isOpen 
+    ? 'border-2 border-pink-500 dark:border-gray-500' 
+    : 'border-2 border-gray-300 dark:border-gray-700'}
+`}
🤖 Prompt for AI Agents
In landing-page/src/Pages/FaqPage/FAQ.tsx around lines 99 to 105, the Tailwind
class strings contain malformed classes with embedded spaces and the wrong color
name; remove the stray spaces so classes are contiguous (e.g., change 'border-
6' and 'border- 6 -' to a valid Tailwind border utility like 'border-2' or
'border' or an arbitrary value 'border-[6px]'), replace 'grey' with Tailwind's
'gray' (e.g., dark:border-gray-500), and ensure the open/closed branches produce
valid class names (no extra hyphens or spaces) so the border thickness and color
apply correctly.

Copy link
Copy Markdown
Contributor

@rahulharpal1603 rahulharpal1603 left a comment

Choose a reason for hiding this comment

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

@rahulharpal1603 rahulharpal1603 merged commit 2a0d9d0 into AOSSIE-Org:main Feb 4, 2026
3 checks passed
@Supritha-gurazala
Copy link
Copy Markdown
Contributor Author

No problem !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation good first issue Good for newcomers UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Improve Gallery Feature Interaction (hover delay + cursor cleanup)

2 participants