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

[Data collection] Restore position to last active task when restoring from draft #2871

Merged
merged 13 commits into from
Dec 5, 2024

Conversation

shobhitagarwal1612
Copy link
Member

@shobhitagarwal1612 shobhitagarwal1612 commented Nov 24, 2024

Fixes #2832

Reuses currentTaskId mechanism to set the initial task position when restoring from draft.

draft-position.webm

@sufyanAbbasi there is some weirdness with task sequence when moving to previous task from restored position. Do you have any ideas?

@sufyanAbbasi @gino-m PTAL?

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

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

Project coverage is 62.67%. Comparing base (859283c) to head (b71f5bf).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ome/mapcontainer/HomeScreenMapContainerFragment.kt 0.00% 2 Missing ⚠️
...ground/ui/datacollection/DataCollectionFragment.kt 0.00% 0 Missing and 1 partial ⚠️
...oogle/android/ground/ui/home/HomeScreenFragment.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2871      +/-   ##
============================================
+ Coverage     62.64%   62.67%   +0.02%     
- Complexity     1206     1209       +3     
============================================
  Files           269      269              
  Lines          6366     6373       +7     
  Branches        878      879       +1     
============================================
+ Hits           3988     3994       +6     
- Misses         1829     1832       +3     
+ Partials        549      547       -2     
Files with missing lines Coverage Δ
.../src/main/java/com/google/android/ground/Config.kt 100.00% <ø> (ø)
...android/ground/model/submission/DraftSubmission.kt 100.00% <100.00%> (ø)
...oid/ground/persistence/local/room/LocalDatabase.kt 100.00% <ø> (ø)
...d/persistence/local/room/converter/ConverterExt.kt 83.98% <100.00%> (+0.10%) ⬆️
...istence/local/room/entity/DraftSubmissionEntity.kt 100.00% <100.00%> (ø)
.../android/ground/repository/SubmissionRepository.kt 80.00% <100.00%> (ø)
...round/ui/datacollection/DataCollectionViewModel.kt 72.58% <100.00%> (+2.03%) ⬆️
...ground/ui/datacollection/DataCollectionFragment.kt 54.54% <0.00%> (-2.03%) ⬇️
...oogle/android/ground/ui/home/HomeScreenFragment.kt 58.33% <0.00%> (-0.55%) ⬇️
...ome/mapcontainer/HomeScreenMapContainerFragment.kt 16.66% <0.00%> (-0.20%) ⬇️

@shobhitagarwal1612 shobhitagarwal1612 changed the title [Data collection] Restore position to last task when restoring draft [Data collection] Restore position to last active task when restoring draft Nov 24, 2024
@shobhitagarwal1612 shobhitagarwal1612 changed the title [Data collection] Restore position to last active task when restoring draft [Data collection] Restore position to last active task when restoring from draft Nov 24, 2024
@shobhitagarwal1612 shobhitagarwal1612 marked this pull request as ready for review November 27, 2024 18:08
@auto-assign auto-assign bot requested a review from gino-m November 27, 2024 18:08
# Conflicts:
#	ground/src/main/java/com/google/android/ground/ui/home/HomeScreenFragment.kt
#	ground/src/main/java/com/google/android/ground/ui/home/mapcontainer/HomeScreenMapContainerFragment.kt
#	ground/src/test/java/com/google/android/ground/ui/datacollection/DataCollectionFragmentTest.kt
@shobhitagarwal1612 shobhitagarwal1612 merged commit 85ac644 into master Dec 5, 2024
4 checks passed
@shobhitagarwal1612 shobhitagarwal1612 deleted the ashobhit/2832/draft-position branch December 5, 2024 17:10
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.

[Data collection] Data collection returns to first task/step after draft state restored
3 participants