Repository navigation
[docs] New mobile nav/search - #5137
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,439.18 ms -41.30 ms(-2.8%) | Renders: 78 (+0) | Paint: 2,212.81 ms -84.82 ms(-3.7%)
…and 2 more (+7 within noise) — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
a9ededb to
b627db1
Compare
b2dae08 to
ebac838
Compare
There was a problem hiding this comment.
@dav-is I'm adding analytics to the mobile nav. May I ask you to check if it looks good?
PR reviewOne merge-blocking finding: a unitless Bugs (3)1. 🔴 Unitless
|
|
@atomiks tackled the feedback points:
I also kept the dialog/drawer lazy-loaded, with idle preloading plus immediate request-time loading so the first interaction does not silently no-op while the chunk is loading. |
7e24289 to
f129ac7
Compare
| @@ -1,3 +1,5 @@ | |||
| @layer all, base, theme, components, utilities; | |||
There was a problem hiding this comment.
Adding this to every component to avoid future issues with async loaded components declaring CSS layers before the first @layer all, base, theme, components, utilities; instance and hence causing styles to break.
3242798 to
5048ed9
Compare
Escape during IME composition cancels the composition natively, but the capture handler also cleared the committed query. Skip handling while composing; keyCode 229 covers Safari where isComposing is unreliable. Co-Authored-By: Claude Fable 5 <[email protected]>
The desktop search index build was gated behind onOpenChangeComplete, so the first open showed an empty body during the transition and popped in the default results once indexing landed. Warm the index shortly after mount instead so the default results are ready before the first open, and keep the index active across reopens. Co-Authored-By: Claude Opus 4.8 <[email protected]>
f075cfc to
8bcc6e0
Compare
isSearchPending required isReady, so a query typed before the lazy index finished building fell through as "not pending" while results had already collapsed to the defaults. Consumers then rendered the default list under a real query (reachable on mobile, where the deferred loader activates only after the drawer opens). Treat a not-ready query the same as an in-flight one. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Should be fixed now. |
Before
The "mobile" navigation and search are two separate dialogs that are highly repetitive: before typing in the search input, a set of default search results are displayed, and these results are basically the same as the nav links.
Simulator.Screen.Recording.-.iPhone.17.-.2026-06-30.at.15.37.51.mov
After
A new drawer with a unified nav and search for "mobile": the drawer displays a static link list when opened, but when the user types in the input, the static link list gets hidden and the autocomplete results are displayed in its place, using the same styles.
The mobile nav/search trigger now uses a magnifying glass icon instead of the "menu" icon to help users discover the search capability.
I was a bit worried about hiding/showing the static link list, but after playing a while with it, feels pretty nice. It could get a bit confusing for a keyboard user in a small viewport because the static link list and the autocomplete results have different tab interactions (multiple tab stops vs single tab stop).
An alternative approach would be to remove the static link list altogether and use default autocomplete results instead (same approach as the desktop search).
Simulator.Screen.Recording.-.iPhone.17.-.2026-07-08.at.11.27.51.mov
The drawer radius and handle are inspired by iOS. This is a screenshot from the iOS Maps app.