Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Integrate TaskSequenceHandler with DataCollectionViewModel #2986

Closed
wants to merge 49 commits into from

Conversation

shobhitagarwal1612
Copy link
Member

@shobhitagarwal1612 shobhitagarwal1612 commented Jan 7, 2025

Fixes #2958

@... PTAL?

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.

Project coverage is 63.32%. Comparing base (a8e71ac) to head (1b17eb0).

Files with missing lines Patch % Lines
...round/ui/datacollection/DataCollectionViewModel.kt 84.61% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2986      +/-   ##
============================================
- Coverage     63.43%   63.32%   -0.12%     
+ Complexity     1259     1248      -11     
============================================
  Files           269      269              
  Lines          6548     6525      -23     
  Branches        927      924       -3     
============================================
- Hits           4154     4132      -22     
+ Misses         1793     1791       -2     
- Partials        601      602       +1     
Files with missing lines Coverage Δ
...ground/ui/datacollection/DataCollectionFragment.kt 38.54% <ø> (-0.64%) ⬇️
...id/ground/ui/datacollection/TaskSequenceHandler.kt 100.00% <100.00%> (ø)
...round/ui/datacollection/DataCollectionViewModel.kt 77.07% <84.61%> (-2.49%) ⬇️

@shobhitagarwal1612 shobhitagarwal1612 marked this pull request as ready for review January 8, 2025 15:00
@shobhitagarwal1612
Copy link
Member Author

Let's hold this one until the latest release candidate is cut.

@shobhitagarwal1612 shobhitagarwal1612 marked this pull request as draft January 8, 2025 16:21
@shobhitagarwal1612
Copy link
Member Author

The problem with current existing and proposed is that we aren't caching the value of sequence. It getting generated 5-10 times during each screen. Ideally, we only need to generate the sequence when data is updated.

@shobhitagarwal1612 shobhitagarwal1612 force-pushed the ashobhit/2958/task-sequence-2 branch from af94eb3 to a511ecb Compare January 9, 2025 09:21
# Conflicts:
#	ground/src/main/java/com/google/android/ground/ui/datacollection/DataCollectionViewModel.kt
#	ground/src/main/java/com/google/android/ground/ui/datacollection/TaskSequenceHandler.kt
#	ground/src/test/java/com/google/android/ground/ui/datacollection/TaskSequenceHandlerTest.kt
# Conflicts:
#	ground/src/main/java/com/google/android/ground/ui/datacollection/TaskDataHandler.kt
# Conflicts:
#	app/src/main/java/com/google/android/ground/ui/datacollection/DataCollectionViewModel.kt
#	app/src/main/java/com/google/android/ground/ui/datacollection/tasks/AbstractTaskFragment.kt
# Conflicts:
#	app/src/main/java/com/google/android/ground/ui/datacollection/TaskSequenceHandler.kt
#	app/src/test/java/com/google/android/ground/ui/datacollection/TaskSequenceHandlerTest.kt
@shobhitagarwal1612
Copy link
Member Author

Closing in favour of #3008

@shobhitagarwal1612 shobhitagarwal1612 deleted the ashobhit/2958/task-sequence-2 branch January 16, 2025 03:56
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.

[Code health] Move task sequence calculation / handling into a separate handler
1 participant