Skip to content

feat: improve Android overlay ordering with LayoutKit - #8

Merged
victorycodedev merged 2 commits into
mainfrom
feat/android-overlay-ordering
Nov 20, 2026
Merged

victorycodedev merged 2 commits into
mainfrom
feat/android-overlay-ordering

Conversation

@victorycodedev

Copy link
Copy Markdown
Owner

What changed?

  • Added optional runtime detection for LayoutKit on Android without introducing a hard dependency.
  • Hosts ToastKit in transparent, activity-scoped dialog windows when LayoutKit is available so toasts render above detached Compose popup tab bars.
  • Preserved the original activity-decor host for applications without LayoutKit and as a fallback if the dialog host cannot attach.
  • Kept toast actions tappable while allowing touches outside the toast to reach the active screen or overlay.
  • Improved host cleanup and visibility handling to avoid duplicate, orphaned, or stale toast surfaces.
  • Adjusted top and bottom edge positioning on Android and iOS.
  • Updated ToastKit’s Boost guidance to reflect the current API and LayoutKit compatibility.

Why?

LayoutKit’s detached floating tab styles render in a separate Compose popup window, which could appear above ToastKit’s original decor-attached host. Bottom toasts therefore rendered behind the floating tab bar instead of covering it like they do with NativePHP’s native and docked tab bars.

How was it tested?

  • composer test — 194 tests passed with 389 assertions.
  • git diff --check.
  • NativePHP Android debug compilation and APK generation.
  • Manual Android emulator checks for floating and docked tab layouts, toast actions, dismissal, placement, modal interaction, and cleanup.

Platforms tested

  • PHP
  • JavaScript
  • Android
  • iOS
  • Not applicable / documentation only

Breaking changes?

None. ToastKit’s public PHP/JavaScript APIs and bridge payloads are unchanged. Apps without LayoutKit continue using the original Android host; older LayoutKit versions without the overlay registry also retain the original behavior.

Checklist

  • Tests were added or updated where appropriate.
  • Existing relevant tests pass.
  • Documentation was updated where necessary.
  • Public API and event/bridge compatibility were considered.
  • Android/iOS behavior parity was considered where relevant.
  • No unnecessary native dependencies were introduced.
  • No secrets, tokens, temporary logging, or debugging code were committed.
  • Native changes were tested in a generated NativePHP application where practical.

@victorycodedev
victorycodedev merged commit 5bad8a8 into main Nov 20, 2026
2 checks passed
@victorycodedev
victorycodedev deleted the feat/android-overlay-ordering branch November 20, 2026 15:01
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.

1 participant