-
Notifications
You must be signed in to change notification settings - Fork 40
feat: enhance homepage header with search functionality/visibility #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the homepage header by adding a search component and making both the search bar and the "Aspire" title appear in the header when scrolling past the hero section. The implementation removes a previously hidden datetime display and adds scroll-based visibility toggling.
- Adds Search component import and integration into the homepage header
- Implements scroll-based visibility logic to show/hide search and title based on hero section position
- Removes the hidden datetime component that was previously in the title wrapper
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| checkScroll(); | ||
|
|
||
| // Check on scroll | ||
| window.addEventListener('scroll', checkScroll, { passive: true }); |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each time initHomepageHeader is called, a new scroll event listener is added without removing the previous one. This creates a memory leak and causes checkScroll to be called multiple times per scroll event after page transitions. Consider storing the listener reference and removing it before adding a new one, or use an AbortController to manage the listener lifecycle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@IEvangelist I've opened a new pull request, #242, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Fix scroll event listener memory leak using AbortController Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> * Add non-null assertion for scrollController.signal access Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Related to #179