fix: Remove id property from core models and generate identifiers on-the-fly#134
Merged
arturgesiarz merged 4 commits intomainfrom Feb 9, 2026
Merged
fix: Remove id property from core models and generate identifiers on-the-fly#134arturgesiarz merged 4 commits intomainfrom
arturgesiarz merged 4 commits intomainfrom
Conversation
Member
Author
|
This change is part of the following stack: Change managed by git-spice. |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the core map models to remove stored id properties and instead generate identifiers on-the-fly based on object properties. The change moves from instance-based identity (using UUID) to value-based identity (using content hashing).
Changes:
- Removed
idproperties from Marker, Circle, Polygon, Polyline, and Cluster data classes - Added
getId()extension functions that compute IDs usingcontentDeepHashCodeof object properties - Introduced
ClusterJSDTO for JVM platform to preserve JavaScript-generated cluster IDs - Added
@JsonIgnoreUnknownKeysto Marker for backward compatibility with JSON deserialization
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| kmp-maps/core/src/commonMain/kotlin/com/swmansion/kmpmaps/core/MapTypes.kt | Core refactoring: removed id properties from data classes and added getId() functions for Marker, Circle, Polygon, Polyline; removed Cluster id |
| kmp-maps/core/src/jvmMain/kotlin/com/swmansion/kmpmaps/core/MapEventHandlers.kt | Updated event handlers to use getId() calls; introduced ClusterJS DTO to handle JavaScript-generated cluster IDs |
| kmp-maps/core/src/jvmMain/kotlin/com/swmansion/kmpmaps/core/Extensions.kt | Updated JSON serialization to use getId() for markers, circles, polygons, and polylines |
| kmp-maps/core/src/iosMain/kotlin/com/swmansion/kmpmaps/core/Utils.kt | Updated cluster ID generation to use getId() for markers |
| kmp-maps/core/src/iosMain/kotlin/com/swmansion/kmpmaps/core/MapDelegate.kt | Updated marker lookup and image caching to use getId() |
| kmp-maps/core/src/iosMain/kotlin/com/swmansion/kmpmaps/core/Map.kt | Updated marker rendering and caching to use getId() with Compose key() |
| kmp-maps/core/src/androidMain/kotlin/com/swmansion/kmpmaps/core/Map.kt | Updated Compose key() to use getId() for markers |
| kmp-maps/google-maps/src/iosMain/kotlin/com/swmansion/kmpmaps/googlemaps/MarkerClusterManagerDelegate.kt | Updated marker cache lookups to use getId() |
| kmp-maps/google-maps/src/iosMain/kotlin/com/swmansion/kmpmaps/googlemaps/MapDelegate.kt | Updated marker lookup to use getId() |
| kmp-maps/google-maps/src/iosMain/kotlin/com/swmansion/kmpmaps/googlemaps/Map.kt | Updated marker rendering and caching to use getId() |
| kmp-maps/google-maps/src/iosMain/kotlin/com/swmansion/kmpmaps/googlemaps/Extensions.kt | Updated marker cache lookup to use getId() |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kmp-maps/core/src/commonMain/kotlin/com/swmansion/kmpmaps/core/MapTypes.kt
Outdated
Show resolved
Hide resolved
patrickmichalik
approved these changes
Feb 6, 2026
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.
No description provided.