Skip to content

Refactor JobMapComponentState#3653

Merged
andreia-ferreira merged 8 commits intomasterfrom
andreia/job-component-state
Apr 3, 2026
Merged

Refactor JobMapComponentState#3653
andreia-ferreira merged 8 commits intomasterfrom
andreia/job-component-state

Conversation

@andreia-ferreira
Copy link
Copy Markdown
Collaborator

@andreia-ferreira andreia-ferreira commented Apr 2, 2026

Towards #3439 and #3575

This PR focuses on refactoring the JobMapComponentState in order to clarify its purpose and prevent the components from maintaining their own state, moving towards a reactive unidirectional data flow, before adding new options to the job sheet (sharing the LOI geometry)

The main changes are:

  • Converted JobMapComponentState to a sealed interface with mutually exclusive UI states
  • Removed local showJobSelectionModal state from JobMapComponent, since the visibility of that modal has extra logic, which is better placed in the VM
  • Update JobMapComponentAction with new actions so that VM can better resolve state

@shobhitagarwal1612 PTAL?

@auto-assign auto-assign bot requested a review from gino-m April 2, 2026 14:29
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 53.57143% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.45%. Comparing base (ff74695) to head (646130b).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ome/mapcontainer/HomeScreenMapContainerFragment.kt 0.00% 15 Missing ⚠️
...droid/ui/home/mapcontainer/jobs/JobMapComponent.kt 63.63% 1 Missing and 7 partials ⚠️
...me/mapcontainer/HomeScreenMapContainerViewModel.kt 88.23% 0 Missing and 2 partials ⚠️
.../home/mapcontainer/HomeScreenMapContainerScreen.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3653      +/-   ##
============================================
- Coverage     66.58%   66.45%   -0.14%     
- Complexity     1625     1629       +4     
============================================
  Files           363      363              
  Lines          8976     8979       +3     
  Branches       1147     1154       +7     
============================================
- Hits           5977     5967      -10     
- Misses         2348     2360      +12     
- Partials        651      652       +1     
Files with missing lines Coverage Δ
...oundplatform/android/ui/common/BaseMapViewModel.kt 60.36% <100.00%> (ø)
.../home/mapcontainer/HomeScreenMapContainerScreen.kt 59.25% <0.00%> (-4.38%) ⬇️
...me/mapcontainer/HomeScreenMapContainerViewModel.kt 65.17% <88.23%> (+5.77%) ⬆️
...droid/ui/home/mapcontainer/jobs/JobMapComponent.kt 54.34% <63.63%> (-15.15%) ⬇️
...ome/mapcontainer/HomeScreenMapContainerFragment.kt 29.91% <0.00%> (-6.13%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andreia-ferreira andreia-ferreira merged commit 809e729 into master Apr 3, 2026
9 checks passed
@andreia-ferreira andreia-ferreira deleted the andreia/job-component-state branch April 3, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants