Skip to content

Conversation

@gino-m
Copy link
Collaborator

@gino-m gino-m commented Dec 10, 2025

Overview

This PR refactors multiple Ground components to use Angular Signals, enabling explicit data flow from MainPageComponent. This change moves away from implicit SurveyService subscriptions to a clearer, unidirectional data flow.

Changes

1. Data Flow Refactoring

  • Implicit to Explicit: Transitioned from implicit ActiveSurvey service subscriptions to explicit input<Survey>() signals passed down from MainPageContainerComponent.
  • MainPageContainerComponent: Now uses LoadSurvey$(id) and passes a survey signal to MainPageComponent.
  • MainPageComponent: Accepts activeSurvey signal input and passes it to children.

2. Component Updates

Refactored the following components to accept activeSurvey as an input<Survey>() signal:

3. Signal Propagation

The activeSurvey signal is now propagated down the component tree:
MainPageContainer -> MainPage -> [ Map, DrawingTools, SidePanel, SecondarySidePanel ]
SidePanel -> JobList
SecondarySidePanel -> [ LoiPanel, SubmissionPanel ]

4. Test Updates

Verification

Automated Tests

Run the test suite for the modified components:

npm test src/app/pages/main-page-container/main-page

Manual Verification

  1. Navigate to a Survey: specific survey URL or select from survey list.
  2. Verify Map: Ensure map loads with markers/polygons.
  3. Verify Side Panel: Check if Job List loads.
  4. Verify Secondary Panel: Click an LOI to see details; click a submission to see submission details.
  5. Drawing Tools: Verify adding points works.

Key Design Decisions

  • Signals over Observables: Migrated input properties to Signals for better reactivity and cleaner change detection.
  • Explicit Dependency: Components now explicitly verify they have the required survey data via inputs rather than hidden service dependencies.

Generated with Antigravity.

Towards #2289
Fixed #2286.

@gino-m gino-m force-pushed the gino-m/2289/refactor-router branch from 093e43d to d4a816e Compare December 10, 2025 22:37
@gino-m gino-m changed the title [WIP] Gino m/2289/refactor router Replace global activeSurvey$ w/component inputs Dec 11, 2025
@gino-m gino-m requested a review from rfontanarosa December 11, 2025 19:16
@gino-m gino-m marked this pull request as ready for review December 11, 2025 19:17
@gino-m
Copy link
Collaborator Author

gino-m commented Dec 11, 2025

@rfontanarosa PTAL?

@gino-m
Copy link
Collaborator Author

gino-m commented Dec 12, 2025

Issued identified by @rfontanarosa via Chat:

  • The geometry icon in the LOI panel is black
  • Selecting a submission throws an exception

@gino-m gino-m mentioned this pull request Dec 15, 2025
@rfontanarosa rfontanarosa merged commit e716746 into master Dec 16, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this to Done in Ground Dec 16, 2025
@rfontanarosa rfontanarosa deleted the gino-m/2289/refactor-router branch December 16, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Missing asserLinks.json file

2 participants