Repository navigation
Use the phone layout sideways, and add Zen mode on phones - #599
Open
thiblahute wants to merge 1 commit into
Open
thiblahute wants to merge 1 commit into
thiblahute wants to merge 1 commit into
Conversation
The layout followed the window's width alone, so a phone turned on its side (about 915 by 412) got the desktop layout: the top bar, the workspace sidebar and the tab bar, leaving little room for the pane. In auto mode, a touch screen at most 500px tall now gets the phone layout too, however wide. An explicit desktop choice still wins. Zen mode was off on phones, and Settings hid its switch there. The switch now shows on phones too: Zen hides the top bar, keeping the bottom bar and its buttons, and the More options menu offers Exit Zen mode while it is on, since Settings is in the hidden top bar. A chat keeps the top bar outside Zen mode.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A phone held sideways gets the phone layout instead of the desktop one, and Zen mode works on phones: it hides the top bar and keeps the bottom bar, with Exit Zen mode in More options.
Why
The layout followed the window's width alone. A phone on its side is about 915 by 412, wider than the mobile breakpoint, so it got the desktop layout: the top bar, the workspace sidebar and the tab bar, leaving little room for the pane on a 412px tall screen. Zen mode, which gives the pane the most room, was desktop only: Settings hid its switch on phones.
What changed
layoutPreferences.ts: in Automatic layout, a touch screen (pointer: coarse) at most 500px tall counts as a phone however wide. An explicit Desktop choice (or?layout=desktop) still wins. Re-evaluated on every resize, so turning the phone switches layouts.ConfigMenu.tsx: the Zen mode switch shows on phones too.App.tsx: on a phone, Zen mode addsphone-zento the app, and More options offers Exit Zen mode while it is on, since Settings is in the hidden top bar.mobile-nav.css: on a phone, Zen hides the top bar; the bottom bar and its buttons stay. A chat's slim header takes the safe-area padding only in Zen mode.FEATURES.md: the landscape rule and phone Zen mode.Verification
bun test web/src/layoutPreferences.test.ts: a 915px wide short touch screen resolves to the mobile layout in Automatic, and to desktop when Desktop is chosen.bun run format:check,bun run lint(only the existingTerminalView.tsxwarning),bun run typecheck:bun,bun run build:web.bun run test:quickwith an isolatedHOME/TMPDIR: the only failures are the two zsh tests (no zsh here), the worktree-removal process-scan timeout, and timeouts under load that pass when rerun alone.main: 832.3 and 256.7); no budget change.Manual checks
Compatibility
No stored format changes; Zen mode uses the existing preference. The visible change outside Zen mode is that a phone chat keeps the top bar.