Skip to content

feat(island): add navigation plugin and settings to island - #1369

Merged
sameerasw merged 8 commits into
sameerasw:developfrom
isaacsa51:feat/island/navigation_plugin_connection
Oct 18, 2026
Merged

sameerasw merged 8 commits into
sameerasw:developfrom
isaacsa51:feat/island/navigation_plugin_connection

Conversation

@isaacsa51

@isaacsa51 isaacsa51 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Enable navigation popup on island when any type of navigation.

Navigation only accepts ongoing notifications that pass isNavigationNotification. That means the channel ID is in the navigation channel list or contains "navigation", or the category contains "navigation".

Maps' Live Update has a progress bar, so it would also qualify for the progress ring. While the island and its Navigation item are on, extractLatestProgressNotification skips navigation notifications, so the progress plugin doesn't show it a second time.

Inside the changes a couple of settings can be enabled inside the toggle:
image

  • New instruction: This options ask the user the behaviour of the island when an going change of direction is headed at. By default this expands the island with all info. (the user can set the island to only Line peek the info, or do nothing)
  • Expand before turn: Kinda self explanatory.
  • Line peek after expanding: Once the user pass a direction and collapses by default, this renders the island with the line peek info, off by default.

This implementation was only tested on a real device and on an emulator with no issues, Waze doesn't create any notification with nav info apart of the only persistent notification to keep the app alive.

Type of change

  • Bug fix
  • New feature
  • UI / visual update
  • Performance improvement
  • Refactoring / cleanup
  • Translations
  • Build / CI tooling

UI changes

Screen-20261012-181522-1791853972543.Mp4.2.mp4
Screen_recording_20261013_115734.webm

Checklist

Before submitting, please make sure:

  • The base branch is set to develop (not main).
  • The app builds cleanly locally with ./gradlew assembleDebug.
  • Unit tests pass with ./gradlew testDebugUnitTest.
  • You tested the changes on a device or emulator (including Shizuku or Root if applicable).
  • New preferences use SettingsRepository for keys and getter/setter methods.
  • New user-facing settings are registered in FeatureRegistry.kt for search indexing.
  • New UI follows the design system in ui/core/ (RoundedCardContainer, IconToggleItem, etc.).
  • Strings are added to res/values/strings.xml and drawables use rounded variants (R.drawable.rounded_*).

…gation_plugin_connection

# Conflicts:
#	app/src/main/java/com/sameerasw/essentials/data/repository/SettingsRepository.kt
#	app/src/main/java/com/sameerasw/essentials/domain/registry/FeatureRegistry.kt
#	app/src/main/java/com/sameerasw/essentials/island/service/IslandCoordinator.kt
#	app/src/main/java/com/sameerasw/essentials/ui/features/display/IslandSettingsUI.kt
#	app/src/main/java/com/sameerasw/essentials/viewmodels/MainViewModel.kt
#	app/src/main/res/values/strings.xml
@isaacsa51
isaacsa51 marked this pull request as ready for review October 13, 2026 22:35
@isaacsa51
isaacsa51 requested a review from sameerasw as a code owner October 13, 2026 22:35
@sameerasw sameerasw added the enhancement New feature or request label Oct 15, 2026

@sameerasw sameerasw left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Should fix

  1. A single unrelated action can become the "Exit" button.

    • NavigationParser.exitActionIndex returns 0 whenever the notification has exactly one action, whatever its label, and exitAction() in the test asserts that (listOf("Something") → 0).
    • An app whose only action is "Mute", "Share ETA" or "Pause" would show it as "Exit" in the expanded island and run it when tapped.
    • Please match by label only, or at least drop the titles.size == 1 fallback. The // ponytail: comment above the function also doesn't describe what the code does.
  2. The PR description doesn't match the defaults.

    • The description says a new instruction expands the island by default and "Line peek after expanding" is off by default.
    • The code defaults to Line peek (getIslandNavigationOnNew() falls back to ISLAND_NAVIGATION_ON_NEW_PEEK) and "Line peek after expanding" to on (getBoolean(KEY_ISLAND_NAVIGATION_PEEK_AFTER_EXPAND, true)).
    • Please fix whichever is wrong. Users will go by the description.
  3. Distance parsing only knows Latin units.

    • isDistance and meters match km|m|mi|ft|yd. In Russian, Chinese or Japanese locales Maps writes units like "м" or "米".
    • Those distances aren't recognised, so the title and text can be swapped and meters() returns null. That silently disables "Expand before a turn" there, with nothing telling the user why.
    • If supporting more units is out of scope, please say in the description that this is English-unit only. Otherwise add the common ones and a test.

Minor

  • Refresh coupling.
    • The navigation update runs inside the progress refresh. If extractLatestProgressNotification throws, the early return@execute skips the navigation update as well.
    • While a trip is active, every 250 ms refresh also re-extracts and re-decodes the large icon bitmap. Reusing the previous bitmap when the notification key and icon are unchanged would avoid that.
  • Settings sheet.
    • IslandNavigationOptionsBottomSheet creates its own SettingsRepository and keeps local state, where the other island sheets go through the ViewModel.
    • MainViewModel has isIslandShowNavigation but no case for it in the settings listener, so a change made elsewhere won't update it.
  • Broad detection.
    • isNavigationNotification matches any ongoing notification whose channel id merely contains "navigation". That method already exists, but this PR means those notifications now appear on the island.
    • Consider limiting the island item to packages that have shown navigation-style content, or at least noting the limitation.
  • Comments. There are several explanatory comments, for example "Navigation shares the progress refresh pass", "The island's navigation item replaces the progress ring for these", "Distance jumped back up: a new maneuver with the same text…" and the comments on the settings getters. Please drop them, per the repo's comment rules.
  • Unrelated change. The diff removes two unused imports in IslandSettingsUI (IslandBorderOutlineOptionsBottomSheet and IslandPulseShadowOptionsBottomSheet). That's harmless, but it's separate from the feature.
  • Tests. There are none for NavigationPlugin's expand and peek decisions, which hold most of the logic. A small test around the approaching, announce and surfaced handling would catch regressions.

@sameerasw
sameerasw marked this pull request as draft October 15, 2026 12:06
@isaacsa51
isaacsa51 marked this pull request as ready for review October 15, 2026 18:45
@isaacsa51
isaacsa51 requested a review from sameerasw October 15, 2026 18:52
@isaacsa51

Copy link
Copy Markdown
Contributor Author

@sameerasw fixed all comments and seems like the branch doesn't have conflicts so it's ready

@sameerasw
sameerasw merged commit b719232 into sameerasw:develop Oct 18, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Essentials Progress Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants