Skip to content

Comments

Refactor: Split monolithic map component into modular structure#20

Open
alamenai wants to merge 11 commits intoAnmolSaini16:mainfrom
alamenai:ala/refactor-main-component
Open

Refactor: Split monolithic map component into modular structure#20
alamenai wants to merge 11 commits intoAnmolSaini16:mainfrom
alamenai:ala/refactor-main-component

Conversation

@alamenai
Copy link

@alamenai alamenai commented Jan 3, 2026

What

  • Refactored the monolithic 1,248-line map.tsx into a clean, modular structure with 9 focused files.

Changes

  • Split component into logical modules (types, hooks, map, marker, controls, popup, route, cluster).
  • Context providers now live in their respective component files.
  • Barrel exports maintain same developer experience.
  • Updated registry.json for shadcn multi-file support.

Benefits

✅ Better code organization and maintainability.
✅ Easier to locate and modify specific features.
✅ Better separation of concerns.
✅ Same imports and API for users.
✅ Build verified and passing.

Developer Impact

No breaking changes

All imports remain the same via barrel exports:

  import { Map, MapMarker, useMap } from "@/components/ui/map";

Ready to create the PR!

@vercel
Copy link

vercel bot commented Jan 3, 2026

@alamenai is attempting to deploy a commit to the anmolsaini16's projects Team on Vercel.

A member of the Team first needs to authorize it.

@alamenai
Copy link
Author

alamenai commented Jan 3, 2026

You should know that this may affect the other open pull requests if they touched the map.tsx file.

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