Skip to content

Migrate data collection fragment to compose and improve UDF#3717

Open
shobhitagarwal1612 wants to merge 21 commits intomasterfrom
compose-data-collection-fragment
Open

Migrate data collection fragment to compose and improve UDF#3717
shobhitagarwal1612 wants to merge 21 commits intomasterfrom
compose-data-collection-fragment

Conversation

@shobhitagarwal1612
Copy link
Copy Markdown
Member

Towards #3709

This PR contains a series of refactorings and improvements to the Data Collection flow, moving it toward a more pure Compose architecture and better Unidirectional Data Flow (UDF) practices.

Key Changes:

  • Converted the xml layout to compose except for the view pager which will be taken up separately.
  • Replaced remaining instances of mutableState with StateFlow
  • Replaced legacy window insets with compose APIs.
  • Removed obsolete TaskUpdated state.
Screen_recording_20260501_164001.webm

@andreia-ferreira PTAL?

@auto-assign auto-assign Bot requested a review from gino-m May 1, 2026 11:16
@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

❌ Patch coverage is 64.28571% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.96%. Comparing base (64bbc38) to head (7f320f8).

Files with missing lines Patch % Lines
.../ui/datacollection/DataCollectionScreenPreviews.kt 0.00% 42 Missing ⚠️
.../android/ui/datacollection/DataCollectionScreen.kt 89.53% 0 Missing and 9 partials ⚠️
...droid/ui/datacollection/DataCollectionViewModel.kt 73.07% 6 Missing and 1 partial ⚠️
...droid/ui/datacollection/DataCollectionViewPager.kt 71.42% 0 Missing and 4 partials ⚠️
...datacollection/DataSubmissionConfirmationScreen.kt 60.00% 0 Missing and 2 partials ⚠️
...ndroid/ui/datacollection/DataCollectionFragment.kt 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3717      +/-   ##
============================================
- Coverage     68.03%   67.96%   -0.07%     
+ Complexity     1582     1573       -9     
============================================
  Files           362      365       +3     
  Lines          9282     9375      +93     
  Branches       1198     1215      +17     
============================================
+ Hits           6315     6372      +57     
- Misses         2312     2336      +24     
- Partials        655      667      +12     
Files with missing lines Coverage Δ
...android/ui/datacollection/DataCollectionUiState.kt 70.37% <ø> (+38.22%) ⬆️
...datacollection/tasks/DataCollectionTaskFragment.kt 57.77% <100.00%> (ø)
...org/groundplatform/android/ui/main/MainActivity.kt 36.90% <ø> (-1.47%) ⬇️
...rg/groundplatform/android/ui/main/MainViewModel.kt 58.33% <ø> (-0.69%) ⬇️
...ndroid/ui/datacollection/DataCollectionFragment.kt 96.00% <87.50%> (+17.17%) ⬆️
...datacollection/DataSubmissionConfirmationScreen.kt 92.68% <60.00%> (-1.15%) ⬇️
...droid/ui/datacollection/DataCollectionViewPager.kt 71.42% <71.42%> (ø)
...droid/ui/datacollection/DataCollectionViewModel.kt 77.32% <73.07%> (-0.36%) ⬇️
.../android/ui/datacollection/DataCollectionScreen.kt 89.53% <89.53%> (ø)
.../ui/datacollection/DataCollectionScreenPreviews.kt 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

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

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.

1 participant