Components · Layout
Pane
One pane beside a conversation — its TabBar, the front object's row of buttons with its one ⋯, and its content.
Also called PaneRoot, PaneToolRow, PaneBody, Editor group, Tool row
import { Pane } from "@botiverse/raft-ui/wip";A pane holds one object at a time from its tabs: its TabBar, then the front object's row of buttons (only where the object has buttons of its own), then its content. PaneRoot is the pane, PaneToolRow the row and PaneBody the content (Tabs and panes).
When to use
Anatomy
PaneRoot: the pane, a column.focusedmarks the pane the keyboard and the app's shortcuts act on (data-focused).- A
TabBar. PaneToolRow: the front object's row. Its buttons are a FitToolbar named bylabel; the object's ⋯, frommenu, sits after it. Optional.PaneBody: the content, which fills the rest. A page laid over the pane from a fixed layer takes this box.
Behavior
- The row holds the object's own buttons, as its row has them today, nothing invented, then one ⋯ at its end with the object's actions, for every kind of object. A page's row (an App's or a web page's) is its head bar of today, an App's included, or its address row, and its ⋯ holds the page's actions: Copy link address, Open in browser, Reload, and Mute or Unmute. The tab's menu holds none of them.
- The row never holds the pane's controls: Maximize is on the TabBar, Close and Move in the tab's menu.
- As the pane narrows, the buttons give way in the order the module gives them, labels first, then into the toolbar's More, as FitToolbar does. The ⋯ never folds.
- When the ⋯ closes, focus goes back to it, unless
menuHandsFocussays the chosen item moved it on: a dialog, a panel, a find bar. - A pointer press anywhere in a pane is the app's to turn into focus, with
onPointerDownCaptureonPaneRoot; opening a menu doesn't move it.
Content
- Name the row after its object: "Document tools", "Page tools", "Task tools".
- Name the ⋯ as the object's ⋯ is named today: More actions by default, Task actions for a task.
Accessibility
- The row is a toolbar: one Tab stop, the arrow keys inside (FitToolbar). The ⋯ is the next Tab stop, a button with
aria-haspopup="menu"and a tooltip. - Moving between panes (F6 and Shift+F6) is the app's; it sets
focusedand marks the pane once. PaneBodyis a plain box. While it shows the front tab's content, give itrole="tabpanel", theidthe tab'saria-controlsnames, andaria-labelledbythe tab'sid(Tab).
Rules
- Put at most one ⋯ in a pane, at the end of its row, with the object's actions only.
- Leave the row out for an object with no buttons of its own; don't draw an empty row.
- Never put Maximize, Close or Move in the row.
API
PaneBody
Takes the attributes of its element.
PaneRoot
One pane: its `TabBar`, then the front tab's `PaneToolRow` (only where the object has buttons of its own), then `PaneBody`.
Also takes the attributes of its element.
PaneToolRow
A pane's second row: the front object's own buttons, then one ⋯ with the object's actions. Never the pane's controls (maximize, close): those are on the TabBar and in the tab's menu. The buttons are a `FitToolbar`: one Tab stop, the arrow keys inside, and they give way as the pane narrows. The ⋯ sits after the toolbar and never folds.
Also takes the attributes of its element.