Skip to content

feat(core)!: rework markers for cluster usage - #921

Open
oeninghe-dataport wants to merge 1 commit into
vue3/migrate-plugin-gfifrom
vue3/gfi-rework-markers
Open

feat(core)!: rework markers for cluster usage#921
oeninghe-dataport wants to merge 1 commit into
vue3/migrate-plugin-gfifrom
vue3/gfi-rework-markers

Conversation

@oeninghe-dataport

Copy link
Copy Markdown
Collaborator

The current implementation used selectedBaseFeature to keep track of which feature to select when zooming in and out. This did not work properly, and is not intuitive either.

Therefore, we split the (meant) hovered or selected feature and its (rendered) hovered or selected cluster. If the layer does not use clustering, cluster and feature are equivalent.

This has the additional advantage that isSelectable does no longer consider the cluster, but an actual feature, such that the implementation is automatically cluster-agnostical now.

This allows the GFI plugin to adapt this new API. When bindWithCoreHoverSelect is used now, the synchronization with the markers is now truly bi-directional and wrapped in a single, easy-to-understand composable. To allow the synchronization from the details view back to the marker store, the selected feature is moved to the GFI main store as a shared state between list view and details view.

One could possibly split these changes into two or three (still atomical) commits. However, the changes only make sense in the context of this refactoring idea, and are therefore combined to one commit on purpose.


This is merged onto the GFI migration, however, as the changes have a lot of changed lines and touch the core significantly, I propose to discuss this changes as a separate PR for clarity.
When this is accepted, it will (hopefully) solve a few threads in #447

The current implementation used `selectedBaseFeature` to keep track of
which feature to select when zooming in and out.  This did not work
properly, and is not intuitive either.

Therefore, we split the (meant) hovered or selected feature and its
(rendered) hovered or selected cluster.  If the layer does not use
clustering, cluster and feature are equivalent.

This has the additional advantage that `isSelectable` does no longer
consider the cluster, but an actual feature, such that the
implementation is automatically cluster-agnostical now.

This allows the GFI plugin to adapt this new API.  When
`bindWithCoreHoverSelect` is used now, the synchronization with the
markers is now truly bi-directional and wrapped in a single,
easy-to-understand composable.  To allow the synchronization from the
details view back to the marker store, the selected feature is moved to
the GFI main store as a shared state between list view and details view.

One could possibly split these changes into two or three (still
atomical) commits.  However, the changes only make sense in the context
of this refactoring idea, and are therefore combined to one commit on
purpose.
@oeninghe-dataport oeninghe-dataport added this to the POLAR@3 milestone Aug 7, 2026
@oeninghe-dataport oeninghe-dataport self-assigned this Aug 7, 2026
@oeninghe-dataport oeninghe-dataport added the bug Something isn't working label Aug 7, 2026
@oeninghe-dataport oeninghe-dataport added the refactor Refactoring of previous code label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://Dataport.github.io/polar/pr-preview/pr-921/

Built to branch gh-pages at 2026-08-07 16:07 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working refactor Refactoring of previous code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant