feat(explore): add mobile responsiveness to map view#41
Open
nicholasalanbrown wants to merge 1 commit intomainfrom
Open
feat(explore): add mobile responsiveness to map view#41nicholasalanbrown wants to merge 1 commit intomainfrom
nicholasalanbrown wants to merge 1 commit intomainfrom
Conversation
- Default to map-first layout on mobile (< 768px) via matchMedia on mount - Keep map mounted when switching to list view on mobile to preserve viewport - Add floating map/list toggle pill with accessible labels and touch-friendly sizing - Add touch event support to HybridLayout resize handle (onTouchStart/touchmove) - Resize handle gets touch-none Tailwind class to prevent scroll interference Closes MAI-47
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds mobile responsiveness to the CommonGrid map view (
/explore).Closes MAI-47
What changed
ExplorerShell.tsxMobile-first default layout
< 768px) viamatchMediaand switches tomaplayout by default (was showing the list/hybrid split which collapsed badly on small screens)Keep-alive map on mobile
hiddenclass instead of conditional rendering so Mapbox doesn't need to re-initialize on toggleNew
MobileViewTogglecomponentbg-foreground text-backgroundfor proper contrast in both light/dark modeactive:scale-95for tactile feedback,select-noneto prevent text selection on mobile tapTouch support for
HybridLayoutresize handleonTouchStarthandler alongside existingonMouseDown{ passive: false }ontouchmovesopreventDefaultcan prevent scroll interferencetouch-noneTailwind class to opt that element out of browser touch handlingTesting
tsc --noEmitexits 0)npm run buildexits 0)