You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/docs/specs/controls/commandbar.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ This file intentionally focuses on *implementation-specific* notes for `CommandB
18
18
19
19
## Goals
20
20
21
-
- Provide a lightweight, single-row “key hints” surface intended for app chrome (footer/header).
21
+
- Provide a lightweight “key hints” surface intended for app chrome (footer/header).
22
22
- Surface commands relevant to the current focus context and app/global commands.
23
23
- Stay allocation-conscious and compatible with the binding dirty model.
24
24
@@ -36,9 +36,14 @@ This file intentionally focuses on *implementation-specific* notes for `CommandB
36
36
37
37
## Layout & rendering (current behavior)
38
38
39
-
- The control measures to a single row (`Height = 1`) and to the *current* content width (focused context), while allowing clipping when the available width is smaller.
40
-
- Render always clears the entire bar row using `CommandBarStyle.Resolve(theme).BarStyle` (chrome must not “inherit” background/attributes from content behind it).
41
-
- When a key sequence prefix is active (`TerminalApp.PendingCommandSequenceCount > 0`), `CommandBar` renders the pending prefix + `…` before regular entries.
39
+
-`MultiLine = false` is the default and preserves the existing single-row behavior:
40
+
- the control measures to a single row (`Height = 1`) and to the *current* content width (focused context), while allowing clipping when the available width is smaller
41
+
- render clears the entire bar row using `CommandBarStyle.Resolve(theme).BarStyle` (chrome must not “inherit” background/attributes from content behind it)
42
+
-`MultiLine = true` allows wrapped layout:
43
+
- the control may measure to multiple rows when the available width is bounded
44
+
- command entries wrap as atomic units; if an entry does not fit in the remaining space on the current row, it starts on the next row
45
+
- separators are not rendered at the start of a wrapped row
46
+
- In both modes, when a key sequence prefix is active (`TerminalApp.PendingCommandSequenceCount > 0`), `CommandBar` renders the pending prefix + `…` before regular entries.
42
47
43
48
## Command collection
44
49
@@ -58,6 +63,11 @@ This file intentionally focuses on *implementation-specific* notes for `CommandB
58
63
- separator text
59
64
- Labels are rendered from `Command.LabelMarkup` via `MarkupTextParser` using the current theme markup styles.
60
65
66
+
## Public API
67
+
68
+
-`Presentation : CommandPresentation`
69
+
-`MultiLine : bool` (default `false`)
70
+
61
71
## Future ideas
62
72
63
73
- Optional “More…” entry that opens a help/palette surface when there is insufficient space.
varrenderedCommandRows=lines.Count(static line =>line.Contains("Alpha",StringComparison.Ordinal)||line.Contains("Beta",StringComparison.Ordinal)||line.Contains("Gamma",StringComparison.Ordinal));
0 commit comments