-
-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/clustering and colouring #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds marker clustering and coloring features to a mapping application, allowing users to switch between cluster and heatmap display modes for data sources, and customize colors for markers, folders, and placed markers through a context menu color picker.
Changes:
- Added
MarkerDisplayModeenum with Clusters and Heatmap options, and color configuration fields to the map schema - Implemented a
ColorPalettecomponent for color selection with a predefined palette - Added context menu options for changing display modes and colors across markers, folders, and data sources
- Updated map rendering to support both cluster and heatmap visualizations with custom colors
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/server/models/Map.ts | Added MarkerDisplayMode enum and new optional fields to mapConfigSchema for display modes and color customization |
| src/server/trpc/routers/map.ts | Extended map config update to include new marker display modes and color fields |
| src/components/ColorPalette.tsx | New reusable color picker component with 12-color default palette |
| src/app/map/[id]/components/controls/MarkersControl/SortableMarkerItem.tsx | Added color selection submenu to marker context menu |
| src/app/map/[id]/components/controls/MarkersControl/SortableFolderItem.tsx | Added folder color selection that propagates to all markers in folder |
| src/app/map/[id]/components/controls/MarkersControl/MarkersList.tsx | Updated drag-and-drop logic to inherit folder colors when markers are moved, added color to drag overlay |
| src/app/map/[id]/components/controls/MarkersControl/MarkerDragOverlay.tsx | Updated to display custom colors in drag overlay |
| src/app/map/[id]/components/controls/DataSourceItem.tsx | Added display mode toggle (Clusters/Heatmap) and color selection for data sources |
| src/app/map/[id]/components/controls/ControlWrapper.tsx | Extended to support custom colors for control visual indicators |
| src/app/map/[id]/components/PlacedMarkers.tsx | Updated to use custom marker colors from config in map rendering |
| src/app/map/[id]/components/Markers.tsx | Implemented heatmap display mode, restored hexToRgb utility functions, applied custom colors to clusters and heatmaps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/app/map/[id]/components/controls/MarkersControl/MarkersList.tsx
Outdated
Show resolved
Hide resolved
src/app/map/[id]/components/controls/MarkersControl/MarkersList.tsx
Outdated
Show resolved
Hide resolved
…t.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ev-sc <4164774+ev-sc@users.noreply.github.com>
…e code Co-authored-by: ev-sc <4164774+ev-sc@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/app/map/[id]/components/controls/MarkersControl/SortableFolderItem.tsx
Show resolved
Hide resolved
Add hex color validation to prevent invalid RGBA strings
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…t.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nd add new MarkersList component for enhanced marker management
Description
Motivation and Context
How Can It Be Tested?
How Will This Be Deployed?
Screenshots (if appropriate):
Types of changes
Checklist: