fix(ui): mobile search close 1881#2021
fix(ui): mobile search close 1881#2021epifaniofrancisco wants to merge 2 commits intonpmx-dev:mainfrom
Conversation
Adds multiple ways to dismiss the expanded mobile search on subpages: - Click outside the header to close - Press Escape key to close - Click the X close button Fixes npmx-dev#1881
Forces the search input to have the same height as the header buttons on mobile (h-8) and small screens (h-9) for visual consistency.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThe pull request addresses mobile search usability by implementing click-outside and keyboard-escape behaviours to collapse the expanded mobile search interface. Changes include adding onClickOutside composable and onKeyStroke handler to AppHeader.vue, introducing a Close Search button to the UI, and adding responsive height styling to SearchBox.vue. A new i18n key Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/components/AppHeader.vue (1)
287-288: Event listeners will never fire.The
@focusand@blurevent listeners onHeaderSearchBoxare effectively dead code sinceSearchBox.vuedefines these emits but never calls them. ThehandleSearchFocusandhandleSearchBlurhandlers (which controlshowFullSearch) will never execute.This is a pre-existing issue and doesn't block this PR, but the dead listeners should be cleaned up or the emits should be properly wired in
SearchBox.vue.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 11d6ec66-3522-489f-9209-51168c9a2e93
📒 Files selected for processing (4)
app/components/AppHeader.vueapp/components/Header/SearchBox.vuei18n/locales/en.jsoni18n/schema.json
🔗 Linked issue
Resolves #1881
🧭 Context
On mobile, when the search input was expanded on a subpage, there was no way to close it. Users were stuck with the search bar taking up the full header.
📚 Description
Added three ways to dismiss the mobile search:
Also fixed the search input height to match the header buttons for visual consistency.