Skip to content

feat(mobile): responsive UI for Android & compact screens, bottom navigation bar, safe area insets - #72

Merged
kostyk348 merged 5 commits into
kostyk348:mainfrom
kobaltgit:feat/android-mobile-ui
Nov 9, 2026
Merged

kostyk348 merged 5 commits into
kostyk348:mainfrom
kobaltgit:feat/android-mobile-ui

Conversation

@kobaltgit

Copy link
Copy Markdown
Collaborator

Summary

Adapts the egui desktop UI for portrait mobile viewports and Android (NativeActivity / arm64-v8a):

  • Bottom Navigation Bar (widgets/bottom_nav.rs): 48 pt touch-friendly 5-tab bar (Page, Graph, Planning, Threads, Search) replacing the desktop WorkspaceStrip on compact screens (width < 640.0 pt or Android).
  • Single-Column Drawer Navigation: On compact viewports, the sidebar acts as a full-screen drawer. Selecting or creating a page automatically collapses the drawer. The Android system Back button navigates from document back to sidebar instead of exiting.
  • Safe Area Insets: Top inset (28 pt) for camera punch hole & status bar; bottom inset (36 pt) for Android 3-button navigation.
  • Titlebar & Overflow Menu (⋮): Replaces window caption buttons on mobile with a compact titlebar and 3-dots overflow menu containing folder sync (sync_folder), IMAP email sync (open_imap), appearance (appearance), command palette, integrations, FAQ, and locale toggle.
  • Responsive Modals: All modals (onboarding, appearance, confirm_delete, faq, shortcuts) adapt dynamically to screen width (clamp(280.0, ...)), fixing the issue where the onboarding tour dialog (hardcoded 560 pt) was cut off horizontally on phones.
  • Toolbar Collision Fixes:
    • In planning_view.rs: task statistics moved to header subtitle on compact screens, preventing text overlap with the 4 segment tabs.
    • In graph/mod.rs & threads_view.rs: compact toolbar buttons without overflowing hint labels.
  • Android Runtime: Added panic hook logging to android_logger (logcat), and fallback for settings_dir() to vault::app_data_dir() when desktop env vars (APPDATA, HOME, XDG_CONFIG_HOME) are missing.
  • CI: Enabled Android build trigger on feat/** branches in .github/workflows/android.yml.

Detailed maintainer documentation: docs/NATIVE_MOBILE_RESPONSIVE_UI.md.

Verification

  • All 340 tests pass in strict single-threaded mode: cargo test --manifest-path native/Cargo.toml --lib -j 1.
  • Headless mobile layout tests added in widgets/bottom_nav.rs and modals/onboarding.rs.
  • APK build verified via GitHub Actions (Debug APK (arm64-v8a)) and tested on physical Android device.

@kostyk348
kostyk348 merged commit 770a037 into kostyk348:main Nov 9, 2026
2 checks passed
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.

2 participants