Patterns
Tabs and panes
How objects open beside a conversation as tabs in panes — one shell for every kind of object, its tab bar and width rule, its two menus, dragging, maximizing, narrow windows, Escape and the keyboard.
Beside a conversation, the objects people work on (a document, a task, a file, an App, a web page) open as tabs in panes, as in a browser or an editor. One shell does everything that is the same for every object: the panes and their tab bars, the tabs' widths, the tab's menu, dragging, maximizing and Escape. Each kind of object is a module that answers the same nine questions (what its tab says, its row of buttons, its ⋯, what counts as new, what shows when it can't open, where it opens, how it lives in the background, Escape inside it, and its narrow layout), so a new kind of object adds a module and never changes the shell.
raft-ui carries the shell's parts, from @botiverse/raft-ui/wip until the app has moved onto them: Tab, TabBar, Pane, PaneGrid and PaneDropOverlay. The app owns the state (which tabs are open, which pane is focused, the saved sizes) and the shortcuts; the parts show it and report what people did. The modules' tables, one per kind of object, are in the prototype for now (v9, the rules page) and move to the app's product docs.
Each rule below is marked with where it comes from, as the prototype marks it:
When it applies
Every object opened beside a conversation or a main-area list, on desktop and the web. A phone has no panes and no tabs: an object opens full screen, as today (Phone). An object glanced at is not a tab: a person's name opens their profile card, and an image, a video or a sound opens in the Lightbox.
On the web an App is never a tab. An App on the rail, or a link to an installed App's address, opens in a new browser tab, as today; only the desktop app has App tabs. On the web a page in a tab is an iframe without the person's cookies (credentialless), and Apps send frame-ancestors 'none', so Sign in with Raft can't work inside one.
Structure
A pane is its tab bar, the front object's row of buttons (only where the object has buttons of its own), and its content:
For now every kind of object's row is its head bar as it is today, without its title, its Expand and ×, and the control that moves its column (the pane has those now). That leaves fewer decisions while the shell is tried out; rows designed for tabs come later.
Panes sit side by side in columns, and a column can be split top and bottom:
Panes and columns
Our problem.
- Right of the conversation there are panes, each with its own tab bar. Split them side by side, up to 4 columns, or top and bottom, each pane at least 200px tall. A stacked block that holds one object, as a channel's side sections do, isn't kept.
- Tabs and panes belong to the channel (the main anchor): switching channels swaps the whole set, as today. The Tasks page, Activity, an App on the rail (in the desktop app) and the Members page are main anchors too, each with its own set.
- Beside the conversation or a main-area list there is always "the pane beside it": the thread column, or what was opened from a list worked through one item at a time. A new item replaces the last one.
The tab bar
Convention.
- A tab bar has its tabs, then at its end only + and Maximize (pressed, as Restore, while maximized), with All tabs before them while the tabs don't fit. It has no ⋯.
- A tab says what the object is: its icon and its title. The front tab's × always shows; a background tab's shows on hover. A tab has no button for its menu, as in a browser: it opens on a right-click, a touch hold lifted, or Shift+F10 or the context-menu key on a focused tab (Two menus).
- A web page's tab is named by its page title, as in a browser; only while the page has no title does it show its domain, drawn with SiteDomain and cut at its start. The full address never shows in a tab: it is in the page's address row, where SiteDomain says which site the page is on, and that row, not the tab, is what keeps a page from passing for another site. On http, Not secure goes before whichever the tab shows; a title-only tab in a narrow pane leaves it to the address row.
- There is no limit on the number of tabs. Extra tabs go into All tabs, and none is closed for the person: a tab that disappears on its own is harder to understand than a few more tabs. Close others and Close pane clear them.
Width
Convention. One rule, the same for every tab, which TabBar carries. Choosing or hovering a tab never changes a width, as in a browser: a tab that grows when it is clicked moves every tab beside it out from under the pointer (xxchan, #proj-workspace:#479). So a tab looks the same in front or not but for its colours: the same things in it, the same weight, and the ×'s room kept in every tab, where a background tab's × shows on hover.
- Names in full first.
- Only when they don't fit do tabs get narrower, and the longest give way first (the water level falls; short names stay whole). Every tab is at most 200px and goes down to 80px, 48px title-only, in front or not.
- Only when every tab is at its least width and they still don't fit do tabs move into All tabs: its button's room is kept first, then the tabs in order, each kept at a readable width (up to 120px, never squeezed to its least); the rest move into the list whole, never half shown. The front tab is never in the list: chosen from it, it takes the place of the last tab in the bar, at the width any tab has there.
- A task's tab gives up its place first (
#launch-week:,dm:@Martin:), and keeps its number and the start of its title.
All tabs
Convention.
- It shows only when every tab is at its least width and they still don't fit. It lists every tab of the pane with the front one checked; choosing one brings it to the front, back into the bar.
- A hidden tab with something new puts one attention dot on the button, and its own count or dot on its item. In a narrow pane the button shows only the count and its chevron; its name stays in its tooltip and is what a screen reader hears.
One kind of tab
Convention, and our idea for now.
- Every tab is the same kind. There is no preview tab, no italic, no Keep, and no rule that makes a tab permanent once something was done in it.
- There is no Pin for now: no workspace tab is pinned, and the tab's menu has no Pin tab (xxchan, #proj-workspace:#479). Tab's
pinnedstays in raft-ui, unused by the workspace tabs.
Two menus
Convention, and our idea.
The object's actions and the tab's are apart. The object's own actions are in the ⋯ at the end of its row, for every kind of object: a document, a task or a file (the same ⋯ the object has today), and a page too, an App or a web page, whose ⋯ ends its address row with Copy link address, Open in browser, Reload, and Mute or Unmute. What is done to the tab and its pane is in the tab's menu, as in a browser, and nothing else. A pane has at most one ⋯.
- An item the tab can't do stays in its place, disabled: Close others with no other tab to close; Close to the right with no tab to close after it; Close pane, Split right and Split down with one tab; Move to the left pane in the first column, and Move to the right pane in the last (a new column is Split right); Split right with 4 columns; Move to another pane while maximized; Reopen closed tab when none was closed.
- The arrow keys move through the items and wrap, ArrowRight opens a submenu and ArrowLeft closes it, Enter chooses, Escape closes. Focus goes back to the tab or the ⋯ it opened from, or to what the item opened: a dialog, a panel, a find bar, a comment box.
- Every menu and its submenus are 240px to 320px wide; a long item is cut, never widening the menu.
- A middle click on a tab closes it.
- There is no Duplicate: an object has one tab in a set of tabs (a web page, one per address), so a copy would be the same tab twice. Close to the right is there because browsers have it.
Opening an object
Our idea. Two rules, and each module's exceptions:
- From a list worked through one item at a time (Activity, the Tasks page, search results): in the pane beside it; the next item replaces it, as in a mail client. To keep it: drag it into a pane, Open as tab in that pane's head, or ⌘ click in the list.
- From anywhere else (a card or a link in a message, a channel panel, a new tab): as a tab, one per object. Opening it again brings that tab to the front, once marked with the located highlight (States).
- What needs only a glance isn't a tab: a profile card, the Lightbox.
- What takes the main area is a main anchor, not a tab: an App on the rail in the desktop app, a person on the Members page.
Dragging
Convention. A tab is dragged as everything is (Drag and drop), and where it will land is shaded as the area the new pane would take (PaneDropOverlay):
- To a pane's edge (25% of its width or height on each side, the tab bar included): that half of the pane is shaded, with Split up, Split down, Split left or Split right.
- To a pane's middle: the whole pane, Move to this pane. Onto a tab bar: a line between the tabs where it will land, and the tabs after it slide apart; in its own bar, that reorders.
- Onto the conversation or the thread column: its right half, Split right of the conversation.
- A place that won't take it (a fifth column; anywhere but the pane itself while maximized) is not shaded; it shows the refusal hint by the pointer.
- Dropped where it already is (its own pane's middle, or its own pane's edges when it is that pane's only tab), a tab changes nothing: no shade shows there, and the drop puts it back.
- The tab itself is the handle: a mouse picks it up after 6px, a finger after a 500ms hold. The keyboard and screen-reader path is Move to another pane in the tab's menu.
- One touch rule for a tab and rows like the rail's: hold 500ms then move = a drag; hold 500ms and lift = the menu; move before 500ms = a scroll. A hold never opens the menu and starts a drag at once.
From a message
Our idea. What a message holds that opens as a tab can be dragged into the panes too: a link, an Artifact card, a file, an image, a task reference and a message's task line.
- It lands exactly as a tab does: a pane's edge splits it, a pane's middle opens it as a tab of that pane, a tab bar inserts it where the line shows, and the conversation's right half splits right of the conversation.
- An object already open goes to its tab, wherever that is, instead of opening a second: one tab per object (Opening an object).
- Dragging never replaces what the message does already: a click still opens, text can still be selected, and a hold still opens the message's menu. There is no drag from a message on the phone, which has no panes.
Maximize
Convention.
- A pane's Maximize replaces each column's Expand and the thread column's focus mode. It is the ⤢ at the end of the tab bar, Maximize in the tab's menu, or a double click on the bar's empty part.
- The maximized pane and its page grow together. The other panes are hidden, their pages kept in the fixed layer, and their tabs are dimmed after a divider in its tab bar; choosing one restores the layout and shows it.
- While maximized, tabs still switch, and a tab can be dragged into the pane; splitting needs a restore first. Maximize stays in its place, pressed and named Restore (
minimize-2), as a panel's Expand does; it, or Escape with nothing else to close, brings the layout back. It has no label: the dimmed tabs after the divider already show the layout is maximized.
Squeezed panes keep their titles
Our idea. A pane that doesn't fit shrinks to its titles, which are always visible. A row too narrow for its panes gives way as a conversation's row does (Responsive layout), with panes for columns; at the last step the rightmost column's tabs join its left neighbour's tab bar after a divider, and choosing one shows it there. A wider window brings the column back, at its saved width.
- Split top and bottom, a pane too short for its content folds to its tab bar; choosing a tab unfolds it and folds the pane used longest ago. Opening the tab's menu never folds or unfolds a pane.
- In a pane under 280px every tab keeps only its title (no icon), the front one too; its × is laid over the title's end (the front tab's always, another's on hover). All tabs shows only its count, and + and Maximize stay.
New things
Convention.
- Something the person hasn't seen yet on an object shows after its tab's title: an unread count for what can be counted (new replies, new comments), an attention dot for what can't (a new version). It goes once the tab is in front.
- Hidden in All tabs, the button has one dot, and each item its own count or dot.
- The module answers only what counts as new; the shell never knows one object's unread from another's.
Can't open
Our problem.
- By default there is one look, and it reveals neither the title nor the reason: This task isn't available, Can't open this document, Can't open this file, with Close tab. A deleted object and one in a private channel look the same, so a link can't tell what is behind it.
- Only where the person can do something is there another look: read only (a shared channel's task), install or ask to install (an App not installed here), close (an App removed or no longer allowed, its content cleared at once), retry (no response), open elsewhere (a request the built-in browser stopped, with Open in browser), or wait (a page unloaded in the background reloads when shown).
Titles follow the object
Convention. A tab's title, channel and icon come from the object live, never as they were when it opened: a renamed task, channel or document, a renamed App, a task's new status (its icon is its status) all show in its open tabs.
Moving never reloads
Our idea. Pages live in one fixed layer and never change parent: a web page's iframe on the web, an App's or a web page's native view in the desktop app, and everywhere a document shown in an iframe (HTML, Markdown, PDF). Panes, tabs and maximize only work out where each one goes and how big it is, and lay it over that place, so dragging, splitting, maximizing and going to the background never reload a page: a half-filled form, a sign-in, a scroll position and a comment draft all stay. PaneBody is the box a page is laid over.
- At most 8 hidden iframes are kept. Past that the one seen longest ago is unloaded and reloads when shown again. An iframe its module asks to keep (one still on its first load, a sign-in under way, a document being reviewed) is never unloaded.
- A native view isn't the shell's to unload: the desktop app's browser owns it, and an App's view is the same one the App shows in the main area. The shell only shows, hides and places it, so a sign-in in it is never cut off and the App in the main area never reloads because of a tab. A native view's tab keeps its content mounted while the view is hidden.
Switching tabs
Convention. Switching tabs keeps what lasts in a tab: its scroll position, what was left open in it (its comments, a list) and a draft being typed. A temporary layer (a menu, a popover, a task's pulled-down header) closes on a click outside it, and a click on another tab is a click outside, so it closes when the person switches. That is intended, as a menu closes in any app.
New tab
Our idea. A new tab answers "what does this pane want to show next": a field that opens an address or searches documents, tasks (by their references too), files, members and Apps; the channel's latest documents and its panels; what the person saw recently, closed tabs included; and the Apps they can open. A part with nothing in it isn't shown.
- Opening it: + at the end of the tab bar, or ⌘T in the desktop app. It is added at the end of the focused pane's bar, in front, with its field focused. Its tab is New tab with the
searchicon, and closing it is not remembered as a closed tab. - The page, top to bottom: the field; This channel (This conversation in a DM; its 3 latest documents, so Recently seen still shows without scrolling in a pane of common height, with the rest one step away in the channel's panels, which follow); Recently seen; Apps. Recently seen holds the closed tabs too, newest first, at most 6, so Apps still shows without scrolling in a pane of common height, and leaves out what is open in this set; there is no separate Recently closed. ⌘⇧T still reopens the last closed tab (xxchan, 2026-11-30, #proj-workspace:#490).
- Typing: the results are grouped by kind (an address, documents, tasks, files, members, Apps, the channel's panels); a task's reference finds it (
#7,launch-week:#25). The first result is highlighted, so ↩ needs no arrow; ↑↓ move through everything shown, the App tiles included, and wrap. Focus stays in the field. - Choosing a result: ↩ or a click turns this tab into the object's tab, in place. ⌥↩, a ⌘ click or a middle click opens it as another tab right after this one, in the background, and this tab stays with its query: ⌘↩ is Maximize (Keyboard), and ⌥↩ is a browser address bar's own key for it (xxchan). With ↩ or a click, something already open goes to its tab, one per object (Opening an object), and the New tab, holding nothing, closes; with ⌥↩, a ⌘ click or a middle click it stays in the background, marked once with the located highlight, and the New tab keeps its query: ⌥↩ means the person is still looking here (Jasper).
- A person opens their profile card over the row, not a tab: a person is a glance (xxchan).
- Escape does what it does in a browser's address bar (xxchan): with text in the field, it clears the text and closes the results; with the field empty, it does nothing of its own, so it never closes the tab (⌘W does) and falls through to the rest of Escape, a maximized pane last.
- Something that can no longer open is left out of the page, so it never shows a title the person can't see any more.
- The layout follows the pane's width, not the window's: a narrow pane drops each row's place, then its time; a maximized pane keeps the content to a readable width, centred.
Escape
Convention. Escape closes the innermost thing, one layer per press, in the tab the person last interacted with; with nothing left, it restores a maximized pane.
- In order: an open menu, picker, completion or lightbox; a title being edited or a field with a draft (Escape cancels the edit or leaves the field, and never clears a draft); the object's own inner layers (each module lists them); then the maximized pane. A drag in progress takes Escape first.
- An Escape that something already handled, or one that is part of an IME composition, closes nothing more.
- An App or a web page is another site: while focus is in it, Raft doesn't hear the key. An iframe that reports its Escape (a document shown in an iframe does) passes it to its tab, and it does exactly what the key pressed in the pane does: that tab's own layers first, then a maximized pane.
Keyboard
Convention, and our problem: the browser and the desktop app already own some keys. The parts expose what they need (onNewTab, onToggleMaximize, onClose, a pane's focused) and register no shortcut of their own; the app binds the keys.
- There is no shortcut for a tab by its place. ⌘1 to ⌘9 already switch workspaces in the desktop app, and people know them; tabs are reached with ⌃Tab, the tab bar's arrows and All tabs.
- The tab keys act on the pane the person last interacted with. ⌘W closes its front tab, but only when nothing smaller is open: a lightbox, a preview or a dialog closes first, as ⌘W does today. With no tab left, ⌘W does nothing more: it never closes the window. Close Window moves to ⇧⌘W while the tabs are on, as in a browser, so the window still has a key that closes it.
- While focus is in a page (an App or a web page in the desktop app), the page's own keys (⌘T, ⌘W, ⌃Tab and the rest of the built-in browser's) act on the tabs here, because a page tab holds one page.
- A tab bar is one Tab stop: ArrowLeft and ArrowRight move between its tabs, Enter or Space brings one to the front, Delete or Backspace closes the focused one. The × isn't in the Tab order. On the web these keys and the tab's menu are how the keyboard opens, closes and moves tabs.
- Moving to another pane with F6 marks it once. A pointer press anywhere in a pane focuses it; a right-click only opens a menu and doesn't move focus.
Phone
Our problem. The phone has no tabs and keeps today's behaviour: an object opens full screen, and Back returns to where the person was. There is no tab list and no tab menu on the phone (xxchan, #proj-workspace:#479).
Rules
- Open an object from a list worked through one item at a time in the pane beside it, and from anywhere else as a tab, one per object.
- On the web, open an App in a new browser tab; only the desktop app has App tabs.
- Keep an object's row as today's head bar, without its title, its Expand and ×, and the control that moves its column.
- Put the object's actions in its row's ⋯, every kind's, a web page's and an App's too, and only the tab's and pane's in the tab's menu. Never a ⋯ on the tab bar, and never a button for the tab's menu.
- Name a web page's tab by its page title, the domain only until it has one; the URL only in the address row.
- Keep a tab bar's end to +, Maximize and, only when needed, All tabs.
- Fit tabs by one rule, the same for every tab: names in full, then the longest give way, then All tabs with its room kept first. Choosing or hovering a tab never changes a width. Never a limit on the number of tabs.
- Show what is new on a tab as an unread count or an attention dot; hidden, as one dot on All tabs.
- Show one look for an object that can't open, and another only where the person can do something.
- Keep a tab's lasting state when switching tabs; let its temporary layers close.
- Close one layer per Escape; restore a maximized pane last; never clear a draft.
- Bind no tab shortcut the browser or the desktop app already owns: no ⌘T, ⌘W or ⌃Tab on the web, and no ⌘1 to ⌘9 for tabs anywhere.
- Hold then move is a drag, hold then lift is the menu, move first is a scroll.
- Draw a domain only with SiteDomain.
- Keep a squeezed pane's titles visible.
Related
- Tab, TabBar, Pane, PaneGrid, PaneDropOverlay
- Drag and drop, Responsive layout, Navigation
- Tabs: the sections of one page, not objects