Skip to content

Fix/final fixes - #16

Merged
mitoperni merged 7 commits into
mainfrom
fix/final-fixes
Feb 6, 2026
Merged

mitoperni merged 7 commits into
mainfrom
fix/final-fixes

Conversation

@mitoperni

Copy link
Copy Markdown
Owner

Description

Add geolocation auto-detection with nearest networks sorting, fix station popup z-index overlap, deduplicate API calls, add Mapbox English language labels, improve country select styling, and fix long text overflow

Type of Change

  • New feature
  • Bug fix
  • Refactoring

Changes Made

  • Created GeolocationProvider context with auto-location detection and permission management
  • Added useMapLanguage hook to set Mapbox labels to English
  • Refactored NearMeButton to use context instead of hook
  • Auto-sort networks by distance when location is available
  • Auto-fly to user location on home page load (only when permission granted)
  • Fix station popup z-index to appear above map markers
  • Deduplicate API calls using React cache() in network detail page
  • Improve country select button hover and focus states
  • Add max-width and truncate to long text in network cards and station rows
  • Migrate geolocation logic to context-based provider
  • Add Mapbox language plugin dependency

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No TypeScript errors
  • All CI checks pass
  • Tested on different screen sizes

Use React's cache() function to memoize fetchNetworkDetail between
generateMetadata and the page component, avoiding duplicate API calls
on each navigation to /network/[id].
- Prevent map click from clearing selection when clicking on station pin
- Set popup z-index above markers in CSS to ensure visibility
@mitoperni mitoperni self-assigned this Feb 6, 2026
@vercel

vercel Bot commented Feb 6, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
cyclemap Ready Ready Preview, Comment Feb 6, 2026 3:44pm

- Add GeolocationProvider context for app-wide location state
- Auto-request location permission on first page load
- Sort networks by distance when user position is available
- Auto-fly map to user location on detection
- Update NearMeButton to use shared geolocation context
- Move geolocation constants to constants.ts
- Remove unused useGeolocation hook

Revert "feat: auto-detect user location and show nearest networks"

This reverts commit cda6dfe.
@mitoperni
mitoperni merged commit d039abf into main Feb 6, 2026
6 checks passed
@mitoperni
mitoperni deleted the fix/final-fixes branch February 6, 2026 15:53

This branch was successfully deployed

1 active deployment
Preview — 87d71d6a Deployed Feb 6, 2026 by vercel[bot]
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.

1 participant