Skip to content

added the animation in hero.tsx sectionnin your bussiness deserve a w…#94

Merged
hrx01-dev merged 3 commits into
hrx01-dev:mainfrom
krishnnag998-del:typing-animation
Jun 21, 2026
Merged

added the animation in hero.tsx sectionnin your bussiness deserve a w…#94
hrx01-dev merged 3 commits into
hrx01-dev:mainfrom
krishnnag998-del:typing-animation

Conversation

@krishnnag998-del

@krishnnag998-del krishnnag998-del commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

description

Screenshot 2026-06-21 163712 add a animation in hero.tsx section "Your Business Deserves a Website That" — A smooth light shimmer sweeps continuously across the text from left to right, like a glossy shine effect. • "Converts" — A deep indigo/purple glow pulses in and out, making it pop with premium neon energy. ( ( the typing effect will not look good so i can add glowing and shimming effect )) closes #89

Summary by CodeRabbit

  • Style
    • Updated the hero headline’s highlighted word to use a shimmering gradient sweep and a continuously pulsing glow, replacing the prior typing-style animation.
    • Added matching visual behavior for dark mode to keep the shimmer and glow consistent across themes.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 54767edc-d0ba-450e-b3e3-664d3288ef45

📥 Commits

Reviewing files that changed from the base of the PR and between 9f37d09 and 315cd49.

📒 Files selected for processing (2)
  • src/app/components/Hero.tsx
  • src/styles/theme.css
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/styles/theme.css

📝 Walkthrough

Walkthrough

The hero headline's "Converts" text animation is switched from a TypingText JS component to pure CSS. Two new animations are defined in theme.css (shimmer-sweep for gradient text and glow-pulse for a drop-shadow effect), and Hero.tsx is updated to use static spans with the corresponding CSS classes.

Changes

Hero Headline CSS Animation Replacement

Layer / File(s) Summary
shimmer-sweep and glow-pulse CSS definitions
src/styles/theme.css
Adds shimmer-sweep keyframes and .hero-shimmer gradient-text class (with .dark variant using swapped color stops), plus glow-pulse keyframes and .converts-glow class applying an infinite drop-shadow pulse.
Hero component: replace TypingText with shimmer/glow spans
src/app/components/Hero.tsx
Replaces the TypingText-driven "Converts" element with two nested static spans carrying the hero-shimmer and converts-glow classes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • hrx01-dev/Servio#85: Directly related — that PR introduced the TypingText component for "Converts" in Hero.tsx which this PR replaces with CSS-driven shimmer/glow spans.
  • hrx01-dev/Servio#66: May overlap on reduced-motion preferences and hero animation styling in theme.css.

Suggested reviewers

  • hrx01-dev

Poem

🐇 Hop hop, no more typing delay,
The word "Converts" now shimmers away!
A gradient sweeps, a glow gently glows,
Pure CSS magic wherever it goes.
No JavaScript needed — just style and flair,
The rabbit approves of this shimmer-swept air! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (1 warning, 2 inconclusive)

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.
Title check ❓ Inconclusive The title is incomplete and vague with a truncation ('w…'). It mentions 'animation in hero.tsx' which relates to the changes, but the truncated wording and lack of clarity make it insufficient. Complete and clarify the title to accurately describe the main changes, e.g., 'Add shimmer and glow animations to hero section' or similar descriptive phrase.
Linked Issues check ❓ Inconclusive Issue #89 requests typing animation, but the PR implements shimmer and glow effects instead. The PR author notes typing would not work well, substituting alternative visual effects that improve the hero section presentation. Clarify whether the alternative animations (shimmer and glow) satisfy the issue requirements or if the issue #89 should be updated to reflect the new approach.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Out of Scope Changes check ✅ Passed All changes are scoped to the hero section animations: Hero.tsx component modifications and theme.css animation definitions. No unrelated changes detected outside the stated objectives.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
src/app/components/Hero.tsx (1)

66-72: ⚡ Quick win

CSS animations bypass the component's existing reduced-motion infrastructure.

The component already uses useReducedMotion() (line 17) to conditionally disable other animations, but the new hero-shimmer and converts-glow CSS classes run unconditionally. Users who prefer reduced motion will still see these infinite animations. Consider adding conditional classes or relying on the CSS @media (prefers-reduced-motion) fixes suggested in theme.css.

🔄 Example: Apply classes conditionally based on motion preference
-            <h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold mb-6">
-              <span className="hero-shimmer">
+            <h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold mb-6">
+              <span className={reduce ? "" : "hero-shimmer"}>
                 Your Business Deserves a Website That{' '}
               </span>
-              <span className="converts-glow bg-gradient-to-r from-indigo-600 to-purple-600 bg-clip-text text-transparent">
+              <span className={`${reduce ? "" : "converts-glow"} bg-gradient-to-r from-indigo-600 to-purple-600 bg-clip-text text-transparent`}>
                 Converts

Note: This works in combination with the CSS @media (prefers-reduced-motion) fixes for defense-in-depth.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/components/Hero.tsx` around lines 66 - 72, The hero-shimmer and
converts-glow CSS classes are applied unconditionally to the span elements,
bypassing the existing reduced-motion infrastructure. The component already has
access to the useReducedMotion() hook from line 17. Either conditionally apply
the CSS classes based on the motion preference returned by useReducedMotion()
(so animations are excluded when reduced motion is preferred), or ensure the
corresponding hero-shimmer and converts-glow animations in the theme CSS file
are wrapped in `@media` (prefers-reduced-motion: reduce) blocks to disable them at
the CSS level for defense-in-depth.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/app/components/Hero.tsx`:
- Line 3: Remove the unused useEffect import from the React imports in the Hero
component. The import statement currently includes useState, useRef, and
useEffect, but since useEffect is no longer being used after switching to CSS
animations, it should be removed from the destructured import to keep the
dependencies clean.
- Around line 66-72: The Hero component has a TypingText component imported but
unused, and the current implementation uses shimmer/glow effects instead of the
typing animation requested in issue `#89`. Replace the static text content in the
h1 heading with the TypingText component to implement the typing animation
effect as specified in the issue. Wrap the text that should animate with the
TypingText component, and remove the unused TypingText import from line 5 if it
ends up not being needed after the changes.

In `@src/styles/theme.css`:
- Around line 41-52: The glow-pulse animation applied to the .converts-glow
class runs infinitely without respecting user motion preferences. Add a media
query using prefers-reduced-motion: reduce to disable the animation when users
have reduced motion enabled. Within this media query, set the animation property
on the .converts-glow class to none to respect accessibility preferences,
similar to how the shimmer animation is handled elsewhere in the stylesheet.
- Around line 3-39: Add a media query using `@media` (prefers-reduced-motion:
reduce) at the end of the theme.css file to respect user motion preferences for
accessibility. Within this media query, override the animation property for both
the .hero-shimmer class and the .dark .hero-shimmer class to disable the
shimmer-sweep animation by setting animation to none, ensuring users who prefer
reduced motion are not exposed to the continuous animation effect.
- Around line 19-21: Add a fallback `color` property before the
`background-clip: text`, `-webkit-background-clip: text`, and
`-webkit-text-fill-color: transparent` declarations in the gradient text styling
block. This ensures that in browsers that do not support the background-clip
property, the text will still be visible with a solid fallback color instead of
becoming invisible. The color property should be placed above the
background-clip declarations so that it acts as the default when the modern
gradient styling is not supported.

---

Nitpick comments:
In `@src/app/components/Hero.tsx`:
- Around line 66-72: The hero-shimmer and converts-glow CSS classes are applied
unconditionally to the span elements, bypassing the existing reduced-motion
infrastructure. The component already has access to the useReducedMotion() hook
from line 17. Either conditionally apply the CSS classes based on the motion
preference returned by useReducedMotion() (so animations are excluded when
reduced motion is preferred), or ensure the corresponding hero-shimmer and
converts-glow animations in the theme CSS file are wrapped in `@media`
(prefers-reduced-motion: reduce) blocks to disable them at the CSS level for
defense-in-depth.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1468ee8f-352d-4fba-a008-52ef3262ad1d

📥 Commits

Reviewing files that changed from the base of the PR and between e26e5f4 and 6a0756a.

📒 Files selected for processing (2)
  • src/app/components/Hero.tsx
  • src/styles/theme.css

Comment thread src/app/components/Hero.tsx Outdated
Comment on lines +66 to 72
<h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold mb-6">
<span className="hero-shimmer">
Your Business Deserves a Website That{' '}
</span>
<span className="converts-glow bg-gradient-to-r from-indigo-600 to-purple-600 bg-clip-text text-transparent">
Converts
</span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Fetch issue `#89` details to confirm requirements

gh issue view 89 --json title,body,labels

Repository: hrx01-dev/Servio

Length of output: 353


🏁 Script executed:

# Check for hero-shimmer and converts-glow CSS definitions
rg "hero-shimmer|converts-glow" --type css --type scss --type ts --type tsx -A 5 -B 2

Repository: hrx01-dev/Servio

Length of output: 89


🏁 Script executed:

# Check git history to see what Hero component looked like before and if TypingText was used
git log --oneline -n 20 src/app/components/Hero.tsx

Repository: hrx01-dev/Servio

Length of output: 157


🏁 Script executed:

# Search for TypingText component usage in the codebase
rg "TypingText" --type ts --type tsx

Repository: hrx01-dev/Servio

Length of output: 88


🏁 Script executed:

# Fix the command - search for hero-shimmer and converts-glow CSS definitions
rg "hero-shimmer|converts-glow" -A 5 -B 2

Repository: hrx01-dev/Servio

Length of output: 1917


🏁 Script executed:

# Check the git diff to see what was replaced in this commit
git diff HEAD~1 HEAD src/app/components/Hero.tsx

Repository: hrx01-dev/Servio

Length of output: 249


🏁 Script executed:

# Search for TypingText component usage
rg "TypingText" -A 2 -B 2

Repository: hrx01-dev/Servio

Length of output: 5400


🏁 Script executed:

# Check if hero-shimmer and converts-glow animations respect prefers-reduced-motion
rg "prefers-reduced-motion" src/styles/theme.css -A 10 -B 2

Repository: hrx01-dev/Servio

Length of output: 1087


🏁 Script executed:

# Look at the full animation definitions for shimmer-sweep and glow-pulse
rg "`@keyframes` (shimmer-sweep|glow-pulse)" src/styles/theme.css -A 10

Repository: hrx01-dev/Servio

Length of output: 653


🏁 Script executed:

# Check the current Hero.tsx to see if TypingText is still imported but unused
cat -n src/app/components/Hero.tsx | head -30

Repository: hrx01-dev/Servio

Length of output: 1772


PR removes typing animation but issue #89 explicitly requests it.

Issue #89 states: "Add Typing Animation in the given ref" for better visual consistency and UX. However, this PR replaces the typing animation with shimmer/glow CSS effects instead. The TypingText component is imported but not used in the headline, and issue #89's explicit requirement contradicts the current implementation.

Clarify the intended approach:

  • Should issue #89 be updated to reflect the shimmer/glow approach?
  • Or should the typing animation be implemented as the issue requests?

Also remove the unused TypingText import from line 5.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/components/Hero.tsx` around lines 66 - 72, The Hero component has a
TypingText component imported but unused, and the current implementation uses
shimmer/glow effects instead of the typing animation requested in issue `#89`.
Replace the static text content in the h1 heading with the TypingText component
to implement the typing animation effect as specified in the issue. Wrap the
text that should animate with the TypingText component, and remove the unused
TypingText import from line 5 if it ends up not being needed after the changes.

Comment thread src/styles/theme.css
Comment on lines +3 to +39
/* ── Hero headline shimmer sweep ─────────────────────────────────────────── */
@keyframes shimmer-sweep {
0% { background-position: -200% center; }
100% { background-position: 200% center; }
}
.hero-shimmer {
background: linear-gradient(
90deg,
#1e1b4b 0%,
#4338ca 30%,
#ffffff 48%,
#c4b5fd 52%,
#4338ca 70%,
#1e1b4b 100%
);
background-size: 200% auto;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmer-sweep 3.5s linear infinite;
}
.dark .hero-shimmer {
background: linear-gradient(
90deg,
#818cf8 0%,
#a5b4fc 30%,
#ffffff 48%,
#c4b5fd 52%,
#a5b4fc 70%,
#818cf8 100%
);
background-size: 200% auto;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmer-sweep 3.5s linear infinite;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add prefers-reduced-motion support for accessibility.

The shimmer animation runs infinitely for all users, including those who have indicated a preference for reduced motion. This can cause discomfort for users with vestibular disorders. The Hero component already uses useReducedMotion() for other animations, but these CSS animations ignore that preference.

♿ Proposed fix to respect motion preferences
+@media (prefers-reduced-motion: reduce) {
+  .hero-shimmer {
+    animation: none;
+  }
+}
+
 .dark .hero-shimmer {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles/theme.css` around lines 3 - 39, Add a media query using `@media`
(prefers-reduced-motion: reduce) at the end of the theme.css file to respect
user motion preferences for accessibility. Within this media query, override the
animation property for both the .hero-shimmer class and the .dark .hero-shimmer
class to disable the shimmer-sweep animation by setting animation to none,
ensuring users who prefer reduced motion are not exposed to the continuous
animation effect.

Comment thread src/styles/theme.css
Comment thread src/styles/theme.css
Comment on lines +41 to +52
/* ── Hero "Converts" glow pulse ──────────────────────────────────────────── */
@keyframes glow-pulse {
0%, 100% { filter: drop-shadow(0 0 2px rgba(99,102,241,0.2)) drop-shadow(0 0 1px rgba(167,139,250,0.15)); }
50% { filter: drop-shadow(0 0 8px rgba(99,102,241,0.5)) drop-shadow(0 0 4px rgba(167,139,250,0.35)); }
}
.converts-glow {
animation: glow-pulse 2.5s ease-in-out infinite;
display: inline-block;
}



Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add prefers-reduced-motion support for the glow animation.

Like the shimmer animation, the glow pulse runs infinitely without checking user motion preferences.

♿ Proposed fix
 .converts-glow {
   animation: glow-pulse 2.5s ease-in-out infinite;
   display: inline-block;
 }
+
+@media (prefers-reduced-motion: reduce) {
+  .converts-glow {
+    animation: none;
+  }
+}
📝 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.

Suggested change
/* ── Hero "Converts" glow pulse ──────────────────────────────────────────── */
@keyframes glow-pulse {
0%, 100% { filter: drop-shadow(0 0 2px rgba(99,102,241,0.2)) drop-shadow(0 0 1px rgba(167,139,250,0.15)); }
50% { filter: drop-shadow(0 0 8px rgba(99,102,241,0.5)) drop-shadow(0 0 4px rgba(167,139,250,0.35)); }
}
.converts-glow {
animation: glow-pulse 2.5s ease-in-out infinite;
display: inline-block;
}
/* ── Hero "Converts" glow pulse ──────────────────────────────────────────── */
`@keyframes` glow-pulse {
0%, 100% { filter: drop-shadow(0 0 2px rgba(99,102,241,0.2)) drop-shadow(0 0 1px rgba(167,139,250,0.15)); }
50% { filter: drop-shadow(0 0 8px rgba(99,102,241,0.5)) drop-shadow(0 0 4px rgba(167,139,250,0.35)); }
}
.converts-glow {
animation: glow-pulse 2.5s ease-in-out infinite;
display: inline-block;
}
`@media` (prefers-reduced-motion: reduce) {
.converts-glow {
animation: none;
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles/theme.css` around lines 41 - 52, The glow-pulse animation applied
to the .converts-glow class runs infinitely without respecting user motion
preferences. Add a media query using prefers-reduced-motion: reduce to disable
the animation when users have reduced motion enabled. Within this media query,
set the animation property on the .converts-glow class to none to respect
accessibility preferences, similar to how the shimmer animation is handled
elsewhere in the stylesheet.

@hrx01-dev hrx01-dev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

address the changes requested by @coderabbitai

@hrx01-dev hrx01-dev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

CI check green

@hrx01-dev hrx01-dev merged commit da9f0d0 into hrx01-dev:main Jun 21, 2026
5 checks passed
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.

Add Typing Animation in the given ref

2 participants