Skip to content

refactor(ui): migrate MapView dialog to Compose M3 + drop legacy material dependency#5988

Merged
jamesarich merged 2 commits into
mainfrom
claude/dazzling-napier-cf212a
Jun 28, 2026
Merged

refactor(ui): migrate MapView dialog to Compose M3 + drop legacy material dependency#5988
jamesarich merged 2 commits into
mainfrom
claude/dazzling-napier-cf212a

Conversation

@jamesarich

@jamesarich jamesarich commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Removes the maintenance-only com.google.android.material:material (1.14.0) View library, whose only remaining use was a single MaterialAlertDialogBuilder call in the F-Droid MapView. The app is otherwise fully Compose Multiplatform, so the legacy MDC dependency was pure dead weight. This purges com.google.android.material from both flavors' runtime classpaths.

🛠️ Refactoring & Architecture

  • Android View → Compose migration: Replaced the MaterialAlertDialogBuilder delete-waypoint dialog in MapView.kt (F-Droid flavor) with a Compose Material 3 AlertDialog, driven by a new showDeleteWaypointDialog state (mirrors the existing showEditWaypointDialog pattern).
  • Button parity preserved: Cancel (dismiss), Delete for me, and Delete for everyone — the last still gated on locked_to/connection exactly as before.
  • Swapped the post-splash host theme from Theme.Material3.DynamicColors.DayNight.NoActionBar to Theme.AppCompat.DayNight.NoActionBar. The app is pure Compose (setContent), and dynamic color is already supplied by Compose's dynamicColorScheme — the XML theme only governs the splash→Compose window handoff.

🧹 Chores

  • Removed material from gradle/libs.versions.toml and androidApp/build.gradle.kts.
  • Declared androidx.appcompat directly in androidAppAppCompatActivity/AppCompatResources/AppCompatDelegate were previously satisfied transitively through the material library.
  • Dropped the unused dd-sdk-android-session-replay-material Datadog extension (google flavor): Session Replay never registered it (addExtensionSupport(MaterialExtensionSupport()) was never called) and it pulled com.google.android.material back in transitively. Removing it purges the View library from googleDebugRuntimeClasspath entirely.

Reviewer notes

  • The theme swap is the only runtime-behavior change. Verified safe: MainActivity uses setContent with no setContentView/LayoutInflater under the activity theme, and the sole layout XML (a Glance widget preview, rendered outside the activity) references no ?attr/... Material theme attributes — so nothing resolves Material3-only attrs at inflation time.
  • Confirmed com.google.android.material no longer appears in :androidApp:dependencies --configuration googleDebugRuntimeClasspath.
  • Baseline validation passed locally: spotlessApply spotlessCheck detekt assembleDebug test allTests (both google + fdroid flavors assemble; full KMP test suite green); assembleGoogleDebug re-verified after the Datadog change.

…terial dependency

Replace the F-Droid MapView delete-waypoint dialog (the last
MaterialAlertDialogBuilder call site) with a Compose Material 3 AlertDialog
driven by a showDeleteWaypointDialog state, then drop the maintenance-only
com.google.android.material:material View library entirely.

- Convert showDeleteMarkerDialog into showDeleteWaypointDialog state + M3 AlertDialog
- Preserve all actions: Cancel (dismiss), Delete for me, and Delete for everyone
  (the last gated on lock/connection as before)
- Remove com.google.android.material:material from libs.versions.toml and androidApp
- Declare androidx.appcompat directly (AppCompatActivity/AppCompatResources were
  previously satisfied transitively via material)
- Swap the post-splash host theme from Theme.Material3.DynamicColors.DayNight to
  Theme.AppCompat.DayNight.NoActionBar; Compose already supplies dynamic color

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the refactor no functional changes label Jun 28, 2026
@jamesarich jamesarich enabled auto-merge June 28, 2026 14:03
@jamesarich jamesarich disabled auto-merge June 28, 2026 14:07
…flavor

The dd-sdk-android-session-replay-material extension is only needed when
Session Replay must record Material View components, but it was never
registered (no addExtensionSupport(MaterialExtensionSupport()) call) and the
app is fully Compose. It also pulled com.google.android.material transitively,
re-introducing into the google flavor the very View library this PR removes.

Removing it purges com.google.android.material from googleDebugRuntimeClasspath
entirely, completing the legacy-material cleanup across both flavors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jamesarich jamesarich enabled auto-merge June 28, 2026 14:18
@jamesarich jamesarich added this pull request to the merge queue Jun 28, 2026
Merged via the queue into main with commit 23c6d24 Jun 28, 2026
23 checks passed
@jamesarich jamesarich deleted the claude/dazzling-napier-cf212a branch June 28, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor no functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant