Repository navigation
Inbox: thread title always in the header bar (visible change for all users) + "Open beside" behind a hidden switch - #3477
Draft
backnotprop wants to merge 9 commits into
Draft
backnotprop wants to merge 9 commits into
backnotprop wants to merge 9 commits into
Conversation
Records, catch-up, a linked machine's frames and held writes, a launched session, the inbox refresh, the person's own writes and the stale-copy re-read now read each thread a pane shows (panes/shownReads.ts), not only the address's. Pick saves name the pane's own thread; Shift+R on a thread refreshes the active pane's. App.tsx 6600 -> 6564 lines.
A hidden config.json key (inboxSplitView, default off, no Settings row) lets a row's menu open its thread in a second pane beside the open one. The two panes share the window as full screen does, each a ThreadSlot with its own header, scroll, reply box and close. Only the active pane counts what it shows as seen; a click or focus in the other makes it active. Closing either pane is one pane again. A fixed 50/50 split with one draggable divider. Offered only from 904 px wide (two 440 px thread columns and the gutters); a narrower window collapses to one pane. A pane the person leaves keeps showing its thread: useHeldThread takes onScreen, so a copy already drawn is not hidden as an opening would.
- The thread title always sits in the pane's header bar (all users): the large in-body heading and the scroll-switched two-mode header are gone. - Open beside: the list stays on the left and the two panes share the rest; offered only when the list and two 440 px threads fit beside the docked sidebar. The list's edge hides the list and the first pane's Inbox button brings it back; a pair that loses room covers the list.
…le name; Open beside's narrow check seeds its own rows
…for room The item is offered whenever the list and two 440 px threads fit with the sidebar folded (1292 px). Choosing it folds a docked sidebar that leaves too little room, on screen only (the person's choice is not written), and closing the second pane brings it back. A sidebar the person folded stays folded. The on-screen fold moves out of App.tsx into panes/sidebarHold.ts.
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.
This PR has two parts.
1. The thread title always sits in the header bar (all users)
Before. A short thread (one message, or a thread that does not fill the pane) showed its title as a large heading inside the body and left the header bar empty. A long thread showed the title in the bar only once the body heading had scrolled away.
Now. Every thread pane works the same way: one pane or two, desktop, stacked window, full screen, beside a file, and phone.
threadChipName), else its heading (the subject, or a review's title in Reviews).What changed in the code:
h2.ib-subject, so focus fallbacks and screen readers still find "the thread's heading". Under a name, itsaria-labeladds the subject. The hidden "Thread name: …" line is gone.chrome.subject,data-on);HeadMarknow draws the bar mark for every style;.ib-subjectas a place candidate inthreadPlace.ts..ib-subjecttype.2. "Open beside" (hidden switch
inboxSplitView)The switch.
inboxSplitView: truein config.json. It has no Settings row and is not in the public docs. Every settings read checks the file, and the read carriessplit_view: { on: true }only while the key is on. When the key is off, the menu item does not exist and nothing else changes.What it does. A thread row's menu offers "Open beside" while another thread is open. Choosing it opens that thread in a second pane.
ThreadSlotwith its own header, scroll, reply box and ✕.Hiding and showing the list. This reuses the existing controls and their state; nothing new was added.
New width minimum. The item is offered whenever the list and two readable thread columns fit with the sidebar folded:
The 440 px is the narrowest thread column the window already draws (beside a file,
stack.ts). A pair goes back to one pane below 904 px (two threads and nothing else).The sidebar folds for room. At 1440 px with the default 232 px sidebar docked, the item is offered. Choosing it folds the sidebar on screen, using the same on-screen fold that "‹ Inbox" from a file already uses (
sidebarHeld, nowpanes/sidebarHold.ts, moved out of App.tsx). The person's stored sidebar choice is not written. Closing the second pane brings the sidebar back. A sidebar the person folded stays folded, and if the person opens or folds the sidebar while the two are open, their choice wins.Address-based pieces. Record pause, catch-up, machine frames and held writes, launched deliveries,
useStaleOpenRead, Shift+R (active pane), pick saves (own pane) and Try again are done. Still address-based, because they mean "the thread the person is in": the look after a restart that adopts a read, and the notificationthreadOnScreen.Fixed while taking screenshots. The pane the person left showed "Opening the thread…".
useHeldThreadnow takesonScreen, which keeps a thread that is already drawn on screen (useActiveHelddoes the same for App).Tests
threadHeader.test.tsxandthreadNameMeta.test.tsxare rewritten for one behavior: the title is in the bar from the first draw, also on one-message and unnamed threads; there is no heading in the body; the name's label carries the subject.inbox-thread-header,inbox-thread-folding,inbox-phone-thread-headerandinbox-replaced.inbox-thread-panel,inbox-links-in-place.openBeside.test.tsxcovers: offered at 1440 with the sidebar docked, and choosing it folds the sidebar; closing the second pane restores it; no fold when the sidebar fits too; the person's own fold kept, also after they open and fold it again while two are open; no item below 1292 px.twoSlots.test.tsxadds: with the list hidden or covered, "‹ Inbox" appears in the first pane only and both panes keep their ✕; the pane the person leaves keeps its thread.stack.test.tsadds the two-pane stacking edge and the extra gutter.inbox-open-beside.spec.tscovers:inbox-structure, the pane tests,headFit,letterMarks,toast,threadFolding,threadTagsStep2.leakedSubject.test.tsx,tour.test.tsx,threadReadRetry.test.tsxandpackages/server/inbox-split-view.test.ts. CI runs them.e2e: inbox-open-beside.spec.ts, inbox-thread-panel.spec.ts, inbox-links-in-place.spec.ts, inbox-thread-header.spec.ts, inbox-phone-thread-header.spec.ts, inbox-thread-folding.spec.ts, inbox-replaced.spec.ts, inbox-mobile.spec.ts, inbox-seen-on-sight.spec.ts, inbox-open-stays-put.spec.ts, inbox-mark-read.spec.ts, inbox-machines.spec.ts, inbox-keyboard-journeys.spec.ts, inbox.spec.ts