Skip to content

Fix: Profile dropdown closes smoothly and on navigation#183

Merged
SrigadaAkshayKumar merged 1 commit into
SrigadaAkshayKumar:mainfrom
Jaiminkansagara1327:fix-profile-dropdown
Sep 7, 2025
Merged

Fix: Profile dropdown closes smoothly and on navigation#183
SrigadaAkshayKumar merged 1 commit into
SrigadaAkshayKumar:mainfrom
Jaiminkansagara1327:fix-profile-dropdown

Conversation

@Jaiminkansagara1327

Copy link
Copy Markdown
Contributor

Pull Request for Stock Analyzer

Thank you for contributing to the Stock Analyzer open-source project!

Issue Title

Profile Dropdown Does Not Close Smoothly / Stays Open on Navigation

Contributor Details

Closes

Closes #180

Describe Your Changes

Added logic to automatically close the dropdown on navigation (Login, Profile, Logout).

Implemented outside-click detection using useRef and useEffect.

Replaced conditional rendering with CSS class toggling for smoother open/close transitions.

Updated Header.css with fade + slide animation for the dropdown.

Screenshots

provide screenshots if applicable, demo video for easy to understand(optional)

what are the files you have changed

src/components/Header.jsx

src/components/Header.css

How Has This Been Tested?

Manually tested by navigating to Login/Profile/Logout pages → dropdown closes automatically.

Verified that clicking outside the dropdown closes it.

Checked smooth animation when opening/closing dropdown.

Tested in both light and dark themes.

Type of Change

Select all that apply:

  • [ ✓] Bug fix (fixes an existing issue)
  • New feature (adds new functionality)
  • [ ✓] Code style update (formatting, refactoring)
  • Breaking change (may affect existing features)
  • Documentation update

Checklist

  • [ ✓] My code follows the project’s guidelines and best practices.
  • [ ✓] I have performed a self-review of my code.
  • [ ✓] I have added meaningful comments where necessary.
  • [ ✓] I have updated documentation wherever applicable.
  • [ ✓] My changes do not generate any new warnings or errors.
  • [ ✓] I have included screenshots, graphs, or test logs (if applicable).
  • [ ✓] Any dependent changes have been merged and documented.

Thank you for helping improve Stock Analyzer!

@github-actions

Copy link
Copy Markdown

Thanks for opening this Pull Request! A maintainer will review it shortly. Please make sure you've followed all contribution guidelines.

Join our Discord Community for discussions, questions, and real-time collaboration!

@SrigadaAkshayKumar SrigadaAkshayKumar merged commit b80c263 into SrigadaAkshayKumar:main Sep 7, 2025
1 check passed
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] Profile Dropdown Does Not Close Smoothly

2 participants