Skip to content

Feature/geoportal refactor#432

Closed
mxfh wants to merge 45 commits intodevfrom
feature/geoportal-refactor
Closed

Feature/geoportal refactor#432
mxfh wants to merge 45 commits intodevfrom
feature/geoportal-refactor

Conversation

@mxfh
Copy link
Contributor

@mxfh mxfh commented Oct 8, 2025

large refactor of monorepo

consider splitting PR and merging by topical cherrypicked spin-off PRs

Done:

  • Refactored commons into more atomic units that all pass strict type checks.
  • Add Geo library for common Geo operation and porivde centralized Projection handling in geo/proj
  • Provide typed Unit of Measurement Support in carma/commons/units
  • Provide Common Carma types in carma/types

Done but with blocking dependencies

  • Geoportal Architecture, needs Cesium Lib and Oblique Mode

WIP:

  • Move Oblique Mode to own nx project lib
  • Cesium Lib Engine refactor to no use rerenders and redux state.
  • Provide Legacy Cesium Lib Engine for Floodingmap or Refactor.
  • Optional: port old playgrounds to new engine or provide legacy version

Before Merge

  • check for buildability and functionality of Geoportalmap and ObliqueMode
  • check for builda
  • remove or review all remaining "@ts-nocheck" and related

@mxfh mxfh marked this pull request as ready for review October 8, 2025 11:43
@mxfh mxfh self-assigned this Oct 8, 2025
@mxfh mxfh requested a review from Copilot October 8, 2025 11:43
Copy link

Copilot AI left a 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 is a large refactoring pull request that modernizes the Cesium integration in the geoportal codebase. The main purpose is to improve the architecture by removing dependencies on the CesiumContextType and moving towards direct scene and instance management, while also updating transition state handling and fixing various Cesium-related issues.

  • Refactored Cesium context to use direct scene references instead of context dependencies
  • Updated all hooks and utilities to work with scene instances directly rather than through context callbacks
  • Replaced viewer animation map with scene-based animation map for better encapsulation
  • Modernized transition state management with lifecycle handlers instead of Redux state

Reviewed Changes

Copilot reviewed 100 out of 101 changed files in this pull request and generated no comments.

Show a summary per file
File Description
playgrounds/cesium/src/app/views/tests/standalone/HQ500.tsx Updated to use destructured context instead of ctx variable
playgrounds/cesium-reference/src/views/NavigationControl.tsx Renamed animation map variables and updated function calls
playgrounds/carmamap/src/app/components/CarmaMap/topicmap.utils.ts Simplified type imports using Leaflet namespace
libraries/mapping/engines/cesium/src/lib/utils/tiledMapToCesium.ts Major refactor to use elevation providers async callback instead of context
libraries/mapping/engines/cesium/src/lib/utils/sceneStyles.ts Updated to work with scene instances and callbacks instead of context
libraries/mapping/engines/cesium/src/lib/hooks/useZoomControls.ts Refactored to use scene ref and animation map instead of context
libraries/mapping/engines/cesium/src/lib/CesiumContextProvider.tsx Added scene ref and transition state management
apps/geoportal/src/app/oblique/hooks/useObliqueInitializer.ts Updated to use scene ref instead of viewer ref for camera controls
Comments suppressed due to low confidence (2)

libraries/mapping/engines/cesium/src/lib/utils/cesiumHelpers.ts:1

  • Corrected spelling of 'resoures' to 'resources'.
import {

libraries/mapping/engines/cesium/src/lib/utils/cesiumCameraForceOblique.ts:1

  • Corrected spelling of 'wasing' to 'easing'.
import { clampToToleranceRange } from "@carma-commons/utils";

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mxfh mxfh mentioned this pull request Oct 8, 2025
1 task
@mxfh mxfh force-pushed the feature/geoportal-refactor branch from 18587f1 to abd934d Compare October 8, 2025 14:59
mxfh added 12 commits October 9, 2025 10:33
- Split GeoportalMap into TopicMapComponentWrapper and CesiumMapComponentWrapper
- Separate hash routing logic for Leaflet-like maps (useMapHashRoutingLeafletLike) and Cesium (useMapHashRoutingCesium)
- Extract feature info lifecycle hooks and modal menu logic
- Remove transition state from Redux store to avoid unnecessary rerenders
- Track transition state via ref in MapTypeSwitcher for better performance
- Improve topicmap hooks organization and stability
- Add overlay helper hooks
- Stabilize onChange handlers with refs to prevent rerender triggers
- Handle oblique mode lifecycle via ref
- Clean up topicmap utilities and Leaflet zoom controls
@mxfh mxfh force-pushed the feature/geoportal-refactor branch from 1ff376e to 6a6df0b Compare October 9, 2025 08:34
@mxfh mxfh force-pushed the feature/geoportal-refactor branch from ba4bfec to 9a32b23 Compare October 9, 2025 19:02
@mxfh mxfh marked this pull request as draft October 15, 2025 18:43
@mxfh mxfh mentioned this pull request Oct 15, 2025
3 tasks
mxfh added 22 commits October 16, 2025 04:12
…to core and api move oblique mode into cesium engine scope
- Created CesiumErrorIndicator component with error count and timestamp
- Re-enabled error handling in cesium/core with recovery mode
- Auto-remount widget on render errors (no full page reload)
- Modal shows error history and stack traces
- Fixed 'This object was destroyed' crashes
@mxfh
Copy link
Contributor Author

mxfh commented Nov 11, 2025

superseeeded see #441

@mxfh mxfh closed this Nov 11, 2025
@mxfh mxfh added app:geoportal app geoportal lib:cesium Cesium Library dx:refactor labels Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:geoportal app geoportal dx:refactor lib:cesium Cesium Library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant