Fix: Profile dropdown closes smoothly and on navigation#183
Merged
SrigadaAkshayKumar merged 1 commit intoSep 7, 2025
Merged
Conversation
|
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! |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Checklist
Thank you for helping improve Stock Analyzer!