Migrate AbstractTaskMapFragment to Jetpack Compose - #3928
Merged
Conversation
shobhitagarwal1612
requested a deployment
to
e2e-approval
September 9, 2026 06:35 — with
GitHub Actions
Waiting
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3928 +/- ##
============================================
- Coverage 69.74% 69.73% -0.02%
- Complexity 1999 2000 +1
============================================
Files 420 422 +2
Lines 11466 11556 +90
Branches 1492 1502 +10
============================================
+ Hits 7997 8058 +61
- Misses 2699 2729 +30
+ Partials 770 769 -1
🚀 New features to boost your workflow:
|
- Replace map_task_frag.xml with pure Compose TaskMapScreen - Update AbstractTaskMapFragment to inflate BasemapLayoutBinding - Drive center crosshair and location info via StateFlows - Remove obsolete map_task_frag.xml layout - Add unit tests for TaskMapScreen and remove dead methods from TaskFragmentRunner
…mponent - Move TaskMapScreen into dedicated ui.datacollection.tasks.map package - Extract LocationInfo and LocationInfoCard leaf component into tasks.map.components package - Update AbstractTaskMapFragment with new package imports - Mirror test structure with TaskMapScreenTest and LocationInfoCardTest in matching packages
- Fix race condition during map pan by guarding location.collect with locationLock check - Fix Fragment coroutine lifecycle scoping with viewLifecycleOwner.repeatOnLifecycle in onViewCreated - Reset location info and crosshairs state in onDestroyView - Hoist DecimalFormat to companion object in AbstractTaskMapFragment - Adopt Material 3 colorScheme tokens, weight(1f), and blank checks in LocationInfoCard - Reorder modifier parameter and convert test tags to top-level const val in TaskMapScreen - Add missing branch and edge-case unit tests in LocationInfoCardTest and TaskMapScreenTest
shobhitagarwal1612
force-pushed
the
map-task
branch
from
September 9, 2026 12:57
5f5b200 to
471b8a8
Compare
shobhitagarwal1612
marked this pull request as ready for review
September 9, 2026 13:06
shobhitagarwal1612
requested a deployment
to
e2e-approval
September 10, 2026 04:11 — with
GitHub Actions
Waiting
…llection with combine operator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards #1795
Description
Migrates
AbstractTaskMapFragmentfrom legacy XML view binding (map_task_frag.xml) to pure Jetpack Compose.The map overlay UI is decomposed into a screen-level composable (
TaskMapScreen) and an extracted leaf component (LocationInfoCard) with dedicated unit and integration tests.Changes
TaskMapScreento host center crosshairs, map type button, recenter button, location lock button, and location info card.LocationInfoCardand@Immutabledata classLocationInfointotasks/map/components/.AbstractTaskMapFragmentto inflateBasemapLayoutBindingand set Compose content withDisposeOnViewTreeLifecycleDestroyed.onViewCreatedusingviewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED)._locationInfofrom GPS stream whenlocationLockis active.DecimalFormatto a companion object constant and reset view state inonDestroyView.map_task_frag.xmllayout.assertInfoCardShown/assertInfoCardHiddenmethods fromTaskFragmentRunner.LocationInfoCardTesttesting coordinate display, good/bad accuracy thresholds, unknown accuracy, and null safety.TaskMapScreenTestverifying center marker, map buttons, recenter toggling, and info card integration.Verification
./gradlew ktfmtCheckpassed./gradlew detektpassed (0 issues)./gradlew testLocalDebugUnitTest jvmTest testAndroidHostTestpassed (all tests green)Before
Screen_recording_20260909_183305.webm
After
Screen_recording_20260909_183035.webm
@andreia-ferreira PTAL?