Skip to content

Show existing LOIs in draw area and drop pin tasks - #3871

Open
andreia-ferreira wants to merge 2 commits into
masterfrom
andreia/3842/show-other-collectors-in-task
Open

Show existing LOIs in draw area and drop pin tasks#3871
andreia-ferreira wants to merge 2 commits into
masterfrom
andreia/3842/show-other-collectors-in-task

Conversation

@andreia-ferreira

@andreia-ferreira andreia-ferreira commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #3482

Screen_recording_20260805_193830.webm

@shobhitagarwal1612 PTAL?

…p pin and draw area tasks to see existing features in the map
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.07%. Comparing base (ea42f2d) to head (74b1560).

Files with missing lines Patch % Lines
...tacollection/tasks/point/DropPinTaskMapFragment.kt 0.00% 2 Missing ⚠️
...ollection/tasks/polygon/DrawAreaTaskMapFragment.kt 0.00% 2 Missing ⚠️
...oundplatform/android/ui/common/BaseMapViewModel.kt 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3871      +/-   ##
============================================
+ Coverage     68.03%   68.07%   +0.04%     
- Complexity     1883     1886       +3     
============================================
  Files           411      411              
  Lines         10881    10899      +18     
  Branches       1426     1427       +1     
============================================
+ Hits           7403     7420      +17     
  Misses         2735     2735              
- Partials        743      744       +1     
Files with missing lines Coverage Δ
...oundplatform/android/ui/common/BaseMapViewModel.kt 64.06% <94.44%> (+4.60%) ⬆️
...tacollection/tasks/point/DropPinTaskMapFragment.kt 13.33% <0.00%> (-0.96%) ⬇️
...ollection/tasks/polygon/DrawAreaTaskMapFragment.kt 47.82% <0.00%> (ø)

... 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.

override fun renderFeatures(): Flow<Set<Feature>> =
taskViewModel.draftArea.map { feature: Feature? ->
if (feature == null) setOf() else setOf(feature)
combine(getMapViewModel().existingLoiFeatures, taskViewModel.draftArea) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we give some toggle button to the users instead of forcefully enabling it for everyone?
Was this not considered due to some reason?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except for own submissions, polygon visibility is already controlled by the survey's data visibility setting (whether data is visible to all participants or not). An in-app toggle wasn't added since the immediate goal was to prevent data collectors from drawing overlapping geometries because they can't see what's already on the map. But if needed we can always add a toggle later 👍

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.

[Map] Show sites already added during geometry-making task

2 participants