-
Notifications
You must be signed in to change notification settings - Fork 117
feat: header facelift v2 #1676
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
feat: header facelift v2 #1676
Conversation
This reverts commit dd1e237.
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.
Bug: Mobile Sidebar Closes on Search Click
Clicking the search bar in the mobile sidebar incorrectly closes the sidebar instead of activating search functionality. This is caused by the onSearchClick
handler, passed to the SearchBar
component, which calls event.preventDefault()
and mobileSidebar.toggle()
, rendering mobile search unusable.
apify-docs-theme/src/theme/Navbar/MobileSidebar/Header/index.jsx#L15-L42
apify-docs/apify-docs-theme/src/theme/Navbar/MobileSidebar/Header/index.jsx
Lines 15 to 42 in fb52d88
function onSearchClick(event) { | |
event.preventDefault(); | |
mobileSidebar.toggle(); | |
} | |
return ( | |
<> | |
<div className="navbar-sidebar__brand"> | |
<NavbarLogo /> | |
<button | |
type="button" | |
className="clean-btn navbar-sidebar__close" | |
onClick={mobileSidebar.toggle} | |
aria-label="Close navigation bar" | |
> | |
<IconClose /> | |
</button> | |
</div> | |
<div className="navbar-sidebar__actions"> | |
<div className="navbar-sidebar__actions__container"> | |
<NavbarCTA /> | |
{!searchBarItem && ( | |
<NavbarSearch> | |
<SearchBar onClick={onSearchClick} /> | |
</NavbarSearch> | |
)} | |
</div> |
Comment bugbot run
to trigger another review on this PR
Was this report helpful? Give feedback by reacting with 👍 or 👎
Preview for this PR was built for commit |
closes https://github.com/apify/apify-web/issues/4926
@docusaurus
dependencies to^3.7.0
(there was version mismatch that caused react providers not being recognized)