Skip to content

Full screen hides the iPad's status bar too (discussion #400) - #408

Merged
Joost-8 merged 3 commits into
mainfrom
feat-hide-status-bar
Dec 3, 2026
Merged

Joost-8 merged 3 commits into
mainfrom
feat-hide-status-bar

Conversation

@Joost-8

@Joost-8 Joost-8 commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Not verified on device with this branch's own build. The iPad ran the vault build. The device checks below ran this branch's decision logic and the same Capacitor calls inside the live app.

What changed

Full screen (in a notebook's More panel, on tablets) now hides the iPad's status bar too: clock, battery and Wi-Fi. The bar is hidden while any tab group shows a notebook full screen. It comes back when no group does (a note or Home in front), when Full screen is turned off, when FineNotes unloads, and on pagehide. This answers the status bar question in discussion #400.

  • Obsidian's iOS app carries Capacitor's StatusBar plugin. Obsidian itself only hides the bar in its phone-only full screen (Obsidian 1.15.1 app.js: hideNavigation() calls hide() only when isPhone) and never shows it on a tablet.
  • New module src/view/system-status-bar.ts:
    • statusBarHidden(groups) is the pure decision.
    • SystemStatusBar calls the plugin only when the wanted state changes. It always sends the first state, because the native bar stays hidden through a page reload and Obsidian opens another vault by reloading without unloading plugins.
    • findStatusBar reads the plugin from Capacitor.Plugins; registering it a second time only logs a warning.
    • It runs on iPad only (Platform.isIosApp && Platform.isTablet).
  • main.ts gets wiring only: one line in syncFullScreen, the field, pagehide, and the release on unload. One CSS comment is corrected.
  • No new control. "Two switches that answer one question are one control", so this folds into Full screen.
  • Hiding follows full-screen groups, not focus: Obsidian activates a leaf on pointerdown, so following focus in a split would move the layout 32 px under the pen's first stroke (reviewer finding).

Proof

  • tests/view/system-status-bar.test.ts has 9 tests, and all 11 gates are green.
  • On the iPad over the bridge (Obsidian 1.15.1):
    • With a notebook in front and Full screen turned on, the decision gave hide. getInfo() went from visible: true, height: 32 to visible: false, height: 0, and --safe-area-inset-top became 0px. The screenshot shows the toolbar at the very top with no clock.
    • hide(), then location.reload(), then getInfo() gave visible: false. This is why the first state is always sent.
    • Capacitor.Plugins.StatusBar is the registered plugin.
    • show() restored visible: true, height: 32.
  • Reviewer agent: four findings (reload, split under the pen, double registration, a CSS comment), all fixed.

Test on the device

  1. Open a notebook, open ⋯ and turn on Full screen. The clock and battery at the top disappear and the toolbar moves up.
  2. Switch to a Markdown note or Home in the same pane. The status bar comes back. Go back to the notebook and it goes again.
  3. Turn Full screen off. The status bar stays visible.

Not verified

  • This branch's bundle on the iPad (see the top).
  • Whether iPadOS brings the bar back by itself after rotation, the app switcher, or a return to Obsidian. If it does, the next layout change hides it again.
  • Whether, with the toolbar now at the very top, a press on its blank space near the top edge starts iPadOS's Notification Center swipe.
  • Android: no change.

🤖 Generated with Claude Code

Joost-8 and others added 3 commits December 3, 2026 01:12
Capacitor's StatusBar plugin, which Obsidian's iOS app carries, is hidden
while the active tab group shows a notebook full screen, and shown again
anywhere else and on unload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…creen group

Review of #408: the native bar stays hidden through a reload (proved on the
iPad), so the first show is sent and pagehide gives it back; following the
active leaf would move a split's layout under the pen's first stroke; read
the plugin from Capacitor.Plugins instead of registering it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Joost-8
Joost-8 marked this pull request as ready for review December 3, 2026 18:18
@Joost-8
Joost-8 merged commit 023bf1a into main Dec 3, 2026
1 check passed
@Joost-8
Joost-8 deleted the feat-hide-status-bar branch December 3, 2026 18:19
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