From b99aa859642c013432a829efb22cd899e3feee11 Mon Sep 17 00:00:00 2001 From: James Babcock Date: Tue, 25 Aug 2026 23:09:21 -0700 Subject: [PATCH] Move phone screen connection status and warnings to the top bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Prompts Used On the main page, there's a triple-dot menu. Its icon is currently black-on-dark (this is true on both a light-mode device and a dark-mode device; the top bark has a dark background in both cases). Make that icon white instead. We have a connection-status indicator on the main page, that says "Disconnected" or "Connected" or "Reconnecting". Let's move this onto the top-bar, as white text, right-aligned next to the triple-dot menu. We have several problem-status warnings, eg for not having battery-optimization permission, that appear on the main page in the form of a large button below the screen preview. Let's convert all of thes into a yellow triangle ! icon that appears on the top bar, in between the connection-status indicator and the triple-dot menu. Tapping it will open a modal that shows the message that was previously shown, with a button to do the suggested action. > All three changes are in, and the project builds and typechecks cleanly. Here's what I did: > > **White overflow icon** — The root cause is that NativeScript builds its toolbar programmatically, so the `theme` overlay in `NativeScriptToolbarStyle` (an XML-inflation-time attribute) never applied, and the overflow icon fell back to the light activity theme's dark `textColorSecondary`. I added an `actionOverflowButtonStyle` with a white `android:tint` to `AppThemeBase` in `App_Resources/Android/src/main/res/values/styles.xml`, so the icon is white on every page's bar (they all share the dark #424242 background), in both light and dark device themes. > > **Connection status in the top bar** — The ActionBar now has a custom titleView (`main-page.xml:5`): "Faceclaw" on the left, and a right-aligned white status label next to the menu. Since the old status string could be a whole sentence ("Reconnecting after ...", "Failed: ..."), the bar shows a short label derived from the connection phase — Connected / Connecting / Reconnecting / Disconnected / Charging / Disconnecting / Failed — and tapping it opens an alert with the full status message, so failure details aren't lost. The old status label below the controls is removed. > > **Warnings → ⚠️ icon + modal** — The three inline warning blocks (Even-app conflict, firmware, battery optimization) are gone from the page body in both portrait and landscape. A yellow warning-triangle emoji now sits between the status label and the overflow menu whenever any warning is active. Tapping it opens an in-page modal (same overlay pattern as the existing text-setting editor) titled "Attention needed", listing each active warning with its original message and action button, plus a Close button. The modal closes when you take an action, and auto-closes if the last warning clears while it's open. One side effect: the landscape layout previously showed the firmware warning without its install button — in the modal it now has the button like everything else. > > Worth an on-device check: the overflow-icon tint (theme change, so a full reinstall rather than hot reload), and that the titleView labels sit vertically centered against the toolbar height.
Thanks. That all looks good, except there are some stylign issues on the warning modal. On a wide tablet, the modal is full-width, which is too wide. When the device is dark-mode, the "Attention needed" title is white-on-light-gray. The title and the warning text need some left/right padding between them and the edges of the modal. > All three styling issues are fixed and the build is clean: > > - **Too wide on tablets**: the modal's width now comes from a `warningsModalWidth` getter in the view model — screen width minus the margins on phones, capped at 480 DIPs on tablets — and it's centered horizontally. It re-computes on orientation change along with the other layout metrics. > - **White title in dark mode**: the theme's `.ns-dark .h2` rule was beating my `.warnings-modal Label` rule on specificity. I added a `.ns-dark .warnings-modal Label` selector so all text in the modal stays dark-on-light in both modes (the modal deliberately keeps its light look, matching the text-setting modal). > - **Missing edge padding**: NativeScript ScrollViews don't apply their own padding to their content, so the `padding: 16` on the modal was silently doing nothing. It now lives on an inner `warnings-modal-content` StackLayout; the border/background/margin stay on the ScrollView. > > One note: the text-setting editor modal (`system-name-modal`) uses the same `h2`-on-light-background pattern, so its title likely has the same white-on-light problem in dark mode — I left it alone since you only flagged the warnings modal, but it'd be the same one-line fix if you want it.
--- .../Android/src/main/res/values/styles.xml | 11 +++ app/app.css | 53 ++++++++++++ app/phone-ui/main-page.xml | 73 +++++++++-------- app/phone-ui/main-view-model.ts | 82 +++++++++++++++++++ 4 files changed, 183 insertions(+), 36 deletions(-) diff --git a/App_Resources/Android/src/main/res/values/styles.xml b/App_Resources/Android/src/main/res/values/styles.xml index 5cb0a093..0eef3110 100644 --- a/App_Resources/Android/src/main/res/values/styles.xml +++ b/App_Resources/Android/src/main/res/values/styles.xml @@ -25,6 +25,17 @@ @color/ns_primary @color/ns_primaryDark @color/ns_accent + + + @style/FaceclawOverflowButtonStyle + + +