Repository navigation
Inbox: free layout of thread panes (behind inboxSplitView) - #3528
Draft
backnotprop wants to merge 10 commits into
Draft
backnotprop wants to merge 10 commits into
backnotprop wants to merge 10 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.
Panes are placed by @pierre/layouts, vendored unchanged at a745a617 in packages/vendor-pierre-layouts. A thread opens beside another from its row menu or by dragging its row onto a pane (an edge opens it there, the centre takes that pane's place); panes move by dragging their header onto another's half, resize by the dividers, and the pane's ⋯ menu moves and closes them. No bar above the panes. The layout is kept per browser tab, closes panes whose thread is deleted or archived while shown, and gives way in a narrow window (the least recent panes step aside, below two columns the active one is alone). One drag system (drag/threadDrag.ts) holds sources and targets with layers, so a reply box's mention target can sit above the panes. Off, the Inbox is unchanged (a byte-for-byte test).
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.
Draft for the owner to try on a test Inbox before anything merges. Builds on #3477 (merged in, not rebased), so its commits show here too until it lands.
What it is
The free layout for several Inbox threads at once, behind the hidden switch
inboxSplitView(config.json, off by default, no Settings row; the name stays from the two-pane form). Panes are placed by@pierre/layouts, vendored inpackages/vendor-pierre-layouts/(commita745a6171d256822f895a06d5a3f0fdafda77d58, unchanged; its README says where it came from, how it is mirrored and how to check it against upstream).There is no bar above the panes.
packages/inbox/drag/threadDrag.tsholds sources and targets with layers (LAYER.pane10,listEdge20,reply30). A thread carried over a pane's foot or reply box is declined by the pane, so a reply-box mention target (another branch) gets it.Off, the Inbox is unchanged:
twoSlots.test.tsxcompares the off path to today's slot byte for byte.Not in this PR
File tabs as a pane. How to add one:
threadsinpanes/layoutModel.tsbecomescontentsby pane id (thread|file),PaneSlotdraws by kind, and a file row registers as a drag source; the tree, verbs, room rules and drop target stay.Notes
packages/uichange.App.tsxshrank by 2 lines (ceiling lowered). New code is inpackages/inbox/panes/andpackages/inbox/drag/(only.tsindrag/, so no new@source).inbox-window.md("Free layout"),environment.md(inboxSplitView).Perf
pn:record-refresh(event heard, list and open thread read, next frame drawn), compiled binary at 1920 px with the debug log on. Each row is 6 sent messages:The time stays flat from 1 to 4 panes: panes that are not active re-render only when their own thread changes (
PaneBodymemo on a digest).e2e: inbox-open-beside.spec.ts