bug(search): Restored search on mobile layout#17123
bug(search): Restored search on mobile layout#17123
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@sfanahata looks like this also brings back / enforces some formatting causing a huge number of file changes. can we ask the robots to separate it into 2 separate PRs? the formatting and linting could also use some help from oxlint and oxfmt which could be part of the precommit using husky |
Ah yeah, I'll double check what's happening there. Seems unnecessary. |
Add a magnifying glass icon button to the mobile header that opens a full-screen search overlay. Previously, search was only available on desktop viewports after the UI rebuild. - Add MagnifyingGlassIcon from @radix-ui/react-icons - Add mobile search button to the left of Ask AI button - Add full-screen search overlay with close button - Search input auto-focuses when overlay opens
1c45a3a to
d034e26
Compare
|
Oh, I see. I accidentally branched from the ESLint work I was doing instead of master. Pushed a commit to clean this up @sergical |
|
@sfanahata awesome! i think sentry flagged a good issue, once the preview is built, ill test it out, great work! |
- Close mobile search overlay when pathname changes (fixes overlay remaining open after clicking a search result) - Close mobile search when opening home nav menu (and vice versa) to prevent overlays from stacking
| <div className="hidden md:block flex-1 min-w-0"> | ||
| <TopNavClient platforms={platforms} /> | ||
| </div> | ||
| {/* Mobile: show Ask AI button and theme toggle (below md breakpoint) */} |
There was a problem hiding this comment.
Non-home menu and search states desynchronized
Medium Severity
Mobile search state is only coordinated with homeMobileNavOpen, not the non-home sidebar toggle. On non-home pages, opening search can leave the sidebar open behind the overlay, and tapping the hamburger while search is open toggles sidebar invisibly instead of closing search.
Additional Locations (1)
There was a problem hiding this comment.
This seems okay. You cannot close out of search without intentionally closing out. You can click the hamburger, but it doesn't do anything but open behind search, and lose typing focus on search.
- Set search input font-size to 16px on mobile to prevent Safari zoom - Make search overlay take full height with proper overflow scrolling - Center padding on both sides of the overlay - Make search results use relative positioning on mobile for better containment within the overlay
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
The previous mobile styles for .sgs-search-results were applying globally, affecting the home page search dropdown. Now the styles are scoped using a .mobile-search-overlay class that only applies to the header's mobile search overlay.
|
@sfanahata when the search overlay is active i can still scroll the main content if i am scrolling on the sides of the search results, very subtle but annoying especially when search results have their own scrolling. We should also add this to develop-docs, right now there's no search there on mobile Looking way better overall though! |


DESCRIBE YOUR PR
Search was missing from the mobile layout. This brings it back.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: