[REFACTORING] Indoor Poi Marker Factory#218
Conversation
…to indoor-poi-marker-refactor
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Refactors the indoor map UI by moving indoor-specific components under components/map/indoor-map/ and introducing a factory-based approach for rendering indoor POI markers to make marker rendering more extensible.
Changes:
- Added a
PoiFilterstype to centralize indoor POI filter state typing. - Split indoor map UI into dedicated components (room fields, settings, navigation controls, floor selection).
- Replaced inline POI marker rendering with a
DefaultMarkerFactory+DefaultPoiMarkerimplementation.
Reviewed changes
Copilot reviewed 11 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
types/mapTypes.ts |
Adds shared PoiFilters type for indoor POI filtering. |
components/map/indoor-map/indoor-room-fields.tsx |
New indoor route start/end room inputs with suggestion UI. |
components/map/indoor-map/indoor-poi/default-poi-marker.tsx |
Extracted reusable SVG marker (icon + optional highlight). |
components/map/indoor-map/indoor-poi/default-marker-factory.tsx |
Introduces factory to create POI markers by checkpoint type/metadata. |
components/map/indoor-map/indoor-navigation-controls.tsx |
New component for step/floor navigation controls UI. |
components/map/indoor-map/indoor-map-settings.tsx |
New settings UI for wheelchair routing + POI highlighting toggles. |
components/map/indoor-map/floor-selection-menu.tsx |
New dropdown UI for selecting the active floor. |
components/map/indoor-map/building-floor.tsx |
Indoor floor renderer updated to use the marker factory. |
components/map/building-floor.tsx |
Removes old indoor floor renderer implementation from the prior location. |
app/(tabs)/(map)/[buildingCode].tsx |
Updates imports to new indoor-map component locations. |
__tests__/* |
Updates import/mocking paths to match the new component locations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…to indoor-poi-marker-refactor
YehJordan
left a comment
There was a problem hiding this comment.
I think this is a good refactoring, and it is a good improvement from the previous code. However, I don't think we can call this a textbook Gang of Four factory design pattern since there are no usage of subclasses to decide the POI.
But the way I see it, its more like a typescript version of a factory pattern.
All previous functionalities work like before, and the indoor POI marker features look like they function the same as well. Good work 👍
Yeah I agree it isn't quite the textbook version of it because every component is a "subclass" of the ReactElement so we can't quite use the subclassing aspect of the "product" side of things, but we do have a generic factory type, so its like having half of the textbook I guess? |
Strange4
left a comment
There was a problem hiding this comment.
Looks exactly like when we discussed in the thread. I think that this is a good improvement.
…to indoor-poi-marker-refactor
|



Summary
Attempts to replace the current marker rendering with a simple factory method implementation
Took inspiration from a mix of textbook factory method and this article
Related Issues
Closes: N/A
Changes Made
Testing
Checklist (Author & Reviewer)