Skip to content

Comments

feat(viewer): add support for pure HTML cluster feature - part 2#5505

Open
danpriori wants to merge 18 commits intodanpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part1from
danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part2
Open

feat(viewer): add support for pure HTML cluster feature - part 2#5505
danpriori wants to merge 18 commits intodanpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part1from
danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part2

Conversation

@danpriori
Copy link
Contributor

@danpriori danpriori commented Feb 8, 2026

Type of change

Feat

Jira ticket 📘

https://cognitedata.atlassian.net/browse/BND3D-6392

This PR is part of a stacked PR to support the pure HTML cluster feature with an internal counter.

This PR implements the HTML clustering feature, including rendering and styling.

How has this been tested? 🔍

It was tested by building it locally and testing it on cog-3d in scenes that have a lot of 360s, such as the Hybrid Mapping scene and the Ivar Aasen Demo (CAD, PC, 360).

Test instructions ℹ️

  • Open unified 3d in a scene with a large collection of 360s (example: Hybrid Mapping).
  • Navigate through the 360s and clusters without entering a 360 image.
  • Observe the clusters appearing with the numbering of how many points that cluster represents.
  • Click on one of the clusters.
  • Observe the camera zooming in so that the cluster expands, showing the points it represents.
screen-capture.44.webm

Checklist ☑️

  • I am happy with this implementation.
  • I have performed a self-review of my own code.
  • I have added unit and visuals tests to prove that my feature works to the best of my ability.
  • I have added documentation to new and changed elements; both public and internally shared ones
  • I have refactored the code for testability, readability and extendibility to the best of my ability.
  • I have listed the JIRA tasks covering remaining work or tech debt related to this PR in the description.

@danpriori danpriori requested a review from a team as a code owner February 8, 2026 00:41
…on-part1' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part2
…on-part3' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part2
…ML-version-part3' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part2"

This reverts commit fa70898, reversing
changes made to 9acdca6.
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 90.75829% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.02%. Comparing base (5d6f001) to head (3a9e3d5).

Files with missing lines Patch % Lines
...s/src/icons/clustering/ClusterRenderingStrategy.ts 0.00% 21 Missing and 1 partial ⚠️
...images/src/icons/clustering/HtmlClusterRenderer.ts 96.19% 11 Missing ⚠️
.../packages/360-images/src/icons/clustering/index.ts 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                         Coverage Diff                                         @@
##           danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part1    #5505      +/-   ##
===================================================================================================
+ Coverage                                                            72.87%   73.02%   +0.15%     
===================================================================================================
  Files                                                                  463      467       +4     
  Lines                                                                46607    47026     +419     
  Branches                                                              3616     3663      +47     
===================================================================================================
+ Hits                                                                 33963    34343     +380     
- Misses                                                               12511    12587      +76     
+ Partials                                                               133       96      -37     
Files with missing lines Coverage Δ
viewer/packages/360-images/index.ts 100.00% <100.00%> (ø)
...0-images/src/icons/clustering/htmlClusterStyles.ts 100.00% <100.00%> (ø)
.../packages/360-images/src/icons/clustering/index.ts 0.00% <0.00%> (ø)
...images/src/icons/clustering/HtmlClusterRenderer.ts 96.19% <96.19%> (ø)
...s/src/icons/clustering/ClusterRenderingStrategy.ts 0.00% <0.00%> (ø)

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danpriori
Copy link
Contributor Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an HTML-based clustering feature for 360-degree image icons. The implementation includes rendering logic, styling, and necessary type definitions. The changes are well-structured and include unit tests. My review focuses on a critical memory leak issue in the HtmlClusterRenderer's disposal logic, for which I've provided a detailed explanation and a suggested fix to ensure proper resource cleanup.

…on-part1' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part2
…on-part1' into danpriori/BND3D-6392-pure-3d-clustering-360s-HTML-version-part2
Copy link
Contributor

@haakonflatval-cognite haakonflatval-cognite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comments - nothing big, looking good so far!

Copy link
Contributor

@haakonflatval-cognite haakonflatval-cognite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more nitpicks, but not everything is mandatory 👍 Looks good!

Copy link
Contributor

@haakonflatval-cognite haakonflatval-cognite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@danpriori danpriori added the waiting-for-risk-review Waiting for a member of the risk review team to take an action label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-risk-review Waiting for a member of the risk review team to take an action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants