Skip to content

bug(search): Restored search on mobile layout#17123

Open
sfanahata wants to merge 4 commits intomasterfrom
bug/search-on-mobile
Open

bug(search): Restored search on mobile layout#17123
sfanahata wants to merge 4 commits intomasterfrom
bug/search-on-mobile

Conversation

@sfanahata
Copy link
Contributor

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.

  • Urgent deadline (GA date, etc.): ASAP
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@sfanahata sfanahata requested a review from sergical March 25, 2026 19:55
@vercel
Copy link

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Mar 25, 2026 10:15pm
sentry-docs Ready Ready Preview, Comment Mar 25, 2026 10:15pm

Request Review

@sfanahata sfanahata changed the title Bug(search) Restored search on mobile layout bug(search): Restored search on mobile layout Mar 25, 2026
@sergical
Copy link
Member

@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

@sfanahata
Copy link
Contributor Author

@sfanahata looks like this also brings back / enforces some formatting causing a huge number of file changes.

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
@sfanahata sfanahata force-pushed the bug/search-on-mobile branch from 1c45a3a to d034e26 Compare March 25, 2026 20:06
@sfanahata
Copy link
Contributor Author

Oh, I see. I accidentally branched from the ESLint work I was doing instead of master. Pushed a commit to clean this up @sergical

@sergical
Copy link
Member

@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) */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

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.
@sergical
Copy link
Member

sergical commented Mar 26, 2026

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants