Skip to content

fixed the moon icon & added animation#670

Open
Luffy-456 wants to merge 2 commits into
GitMetricsLab:mainfrom
Luffy-456:fix/moon-icon
Open

fixed the moon icon & added animation#670
Luffy-456 wants to merge 2 commits into
GitMetricsLab:mainfrom
Luffy-456:fix/moon-icon

Conversation

@Luffy-456
Copy link
Copy Markdown
Contributor

@Luffy-456 Luffy-456 commented Jun 1, 2026

Related Issue


Description

  • Fixed moon icon not visible
  • Added eye pleasing animation when toggle menu mode

How Has This Been Tested?

Using Dev tools on dimensions iPhone SE


Screenshots (if applicable)

image

Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

Summary by CodeRabbit

  • Style
    • Enhanced mobile navigation elements with animation and transition effects for theme toggle and menu buttons
    • Added fade-in animation utility with smooth transitions for improved visual presentation

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit f7259d3
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a1d850ab66ed800089fda66
😎 Deploy Preview https://deploy-preview-670--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

Warning

Review limit reached

@Luffy-456, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 42 minutes and 9 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 778100f1-8874-4fdc-b115-17b994ebd1d7

📥 Commits

Reviewing files that changed from the base of the PR and between a2ba85e and f7259d3.

📒 Files selected for processing (1)
  • src/components/Navbar.tsx
📝 Walkthrough

Walkthrough

This PR fixes the dark mode button visibility on mobile screens and improves menu interactions with smooth animations. A fade-in animation is added to the CSS utilities layer, then applied to mobile navbar components: the theme toggle button, menu toggle button, and menu container. The Moon icon in light mode now explicitly uses black text color for contrast.

Changes

Mobile Dark Mode Button & Animation Enhancements

Layer / File(s) Summary
Fade-in animation foundation
src/index.css
Defines a new Tailwind fade-in keyframes animation starting from low opacity (0%), vertical offset (10px), and heavy blur (30px), transitioning to full opacity with no offset/blur, and a corresponding ani-fade-in utility class with 0.8s duration, ease-out timing, and both fill mode.
Mobile menu and button animations
src/components/Navbar.tsx
Mobile theme toggle button gains animation/transition utilities and Moon icon color explicitly set to text-black in light mode for visibility; mobile menu toggle button and menu container div are extended with animation/transition utilities for smooth opening/closing effects.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

level1, quality:clean, type:accessibility

Poem

🌙 A rabbit hops through mobile screens,
The dark mode Moon now gleams—bright and keen!
With fade-in flair and smooth transitions,
The nav now dances in light conditions.
No more invisible, no more blur,
The theme toggle sparkles; reviewers concur! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the two main changes: fixing the moon icon visibility and adding animation to the menu toggle.
Description check ✅ Passed The description follows the template and includes all essential sections with appropriate details about the bug fix and testing approach.
Linked Issues check ✅ Passed The changes directly address both requirements from issue #667: fixing moon icon visibility on mobile by changing its color to text-black, and adding fade-in animations for smoother menu opening/closing.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue; the Navbar styling updates and CSS animation additions address the responsive design and animation requirements without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

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

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: 2

🧹 Nitpick comments (1)
src/index.css (1)

93-109: ⚡ Quick win

Respect reduced-motion preferences for the new fade animation.

Please gate this utility behind prefers-reduced-motion so motion-sensitive users can opt out cleanly.

Proposed patch
 `@layer` utilities{
   `@keyframes` fade-in{
@@
   .ani-fade-in{
     animation: fade-in 0.8s ease-out both;
   }
+
+  `@media` (prefers-reduced-motion: reduce) {
+    .ani-fade-in {
+      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/index.css` around lines 93 - 109, The new keyframes fade-in and utility
class .ani-fade-in must respect the user's reduced-motion preference: wrap a
rule in a prefers-reduced-motion: reduce media query that disables the animation
for .ani-fade-in (e.g., set animation: none or animation-duration: 0s and remove
transforms/filters) so motion-sensitive users don't get the fade-in; update the
stylesheet to include the prefers-reduced-motion block alongside the existing
`@keyframes` and .ani-fade-in definitions.
🤖 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/components/Navbar.tsx`:
- Around line 106-107: The menu is being unmounted immediately by the {isOpen &&
...} conditional so exit animations never run; change the logic in Navbar to
keep the menu element mounted while animating out (e.g., render the div
unconditionally or via a local state like isMenuMounted) and toggle CSS classes
(ani-fade-in / ani-fade-out or similar) based on isOpen, then remove/unmount
only after the animation end (listen for transitionend/animationend or use a
timeout) so both entry and exit animations run; update references to isOpen and
the menu div's class handling to implement this
mount-then-unmount-after-animation pattern.
- Around line 92-93: The mobile menu toggle handler in Navbar.tsx uses
setIsOpen(!isOpen) which can suffer from stale closure values; change the
onClick handler to use a functional state update like setIsOpen(prev => !prev)
so toggling uses the latest state. Locate the onClick on the toggle element that
references setIsOpen and replace the direct negation with the functional updater
to ensure safe concurrent/rapid updates.

---

Nitpick comments:
In `@src/index.css`:
- Around line 93-109: The new keyframes fade-in and utility class .ani-fade-in
must respect the user's reduced-motion preference: wrap a rule in a
prefers-reduced-motion: reduce media query that disables the animation for
.ani-fade-in (e.g., set animation: none or animation-duration: 0s and remove
transforms/filters) so motion-sensitive users don't get the fade-in; update the
stylesheet to include the prefers-reduced-motion block alongside the existing
`@keyframes` and .ani-fade-in definitions.
🪄 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

Run ID: 4b77e94d-d964-4c84-be2f-103db35f886e

📥 Commits

Reviewing files that changed from the base of the PR and between 53f820b and a2ba85e.

📒 Files selected for processing (2)
  • src/components/Navbar.tsx
  • src/index.css

Comment thread src/components/Navbar.tsx Outdated
Comment thread src/components/Navbar.tsx
@Luffy-456
Copy link
Copy Markdown
Contributor Author

Hello @itsdakshjain ,
Please review this PR

Copy link
Copy Markdown

@itsdakshjain itsdakshjain left a comment

Choose a reason for hiding this comment

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

overall, looks clean and all the pre-merge checks are green.

  • state updater fixed: good call updating the toggle handler to setIsOpen((prev) => !prev) in f7259d3. that completely resolves the first issue the bot pointed out regarding stale state during fast clicks.

  • animation scope: saw your comment to the bot about the exit animation. it is out of scope for the assigned issue fix, but i will leave it up to the maintainers to decide if they want it added here or tracked as a separate issue

looks good to me.
could a maintainer please manually add the mentor:itsdakshjain label to this pr for gssoc tracking? thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Dark Mode button visible on mobile screen

2 participants