docs(design): track the islands UI look spec referenced by Guardrails
GUARDRAILS already points at docs/design/islands/SPEC.md; keep that file in git (with the decisions tree) so the Look rule is not a dead link.
@@ -1,5 +1,8 @@
1
1
target/
2
2
.claude/
3
# Local research under docs/; track design SoT and ADRs.
3
4
docs/*
5
!docs/design/
6
!docs/design/**
4
7
!docs/decisions/
5
8
!docs/decisions/**
@@ -1,5 +1,8 @@1
target/1
target/2
.claude/2
.claude/3
# Local research under docs/; track design SoT and ADRs.3
docs/*4
docs/*5
!docs/design/6
!docs/design/**4
!docs/decisions/7
!docs/decisions/5
!docs/decisions/**8
!docs/decisions/**@@ -0,0 +1,107 @@
1
# Islands UI specification
2
3
Source of truth for the app chrome and look. Feature work describes what appears on a surface; this file owns shell layout, allowed surfaces, spacing, radii, type, and colour roles.
4
5
Referenced from `GUARDRAILS.md` (Look may differ from Teams; content and behaviour must match Teams).
6
7
Code anchors:
8
9
- Shell: `crates/app/src/views/shell.rs` (`islands`, `Render for AppShell`)
10
- Layout constants: `crates/app-ui-kit/src/layout.rs`
11
- Theme apply + accessors: `crates/app-base/src/theme.rs`
12
- Palette roles: `crates/app-base/src/theme/schemes.rs`
13
14
This document codifies the current look. It is not a redesign brief.
15
16
## Shell
17
18
Vertical stack in the main window:
19
20
1. Title bar
21
2. Optional connection banner
22
3. One horizontal row of islands
23
24
Island row (left → right):
25
26
| Slot | Content | Notes |
27
|------|---------|--------|
28
| Rail | Navigation rail | Always present; selector `shell/islands/rail` |
29
| Sidebar | Chat / team list | Optional; width `SIDEBAR_WIDTH` (300) |
30
| Main | Exactly one primary island | Conversation, Calendar, Calls, Manage team, or Quick view |
31
32
Modals and peeks render above the shell (settings, shortcuts, forward, status, agent start, calendar event peek, profile card, and similar). An active call or meeting uses a dedicated call window; the main window stays free for chat. See `GUARDRAILS.md` and ADR 0001.
33
34
Do not invent a second primary island beside the main slot, or a new chrome band outside title bar / banner / island row, without updating this file in the same change.
35
36
## Allowed surfaces
37
38
| Surface | Use |
39
|---------|-----|
40
| Island | Primary chrome panels in the shell island row (rail, sidebar, main) |
41
| Dialog | Modal overlays (settings, shortcuts, peeks that block the shell, …) |
42
| Popover / menu | Flyouts and context menus (`flyout_surface` / nested flyout) |
43
| Call window | Dedicated call / meeting window and its stage / toolbar |
44
| Toast | Transient notices |
45
46
A new surface type is allowed only when a feature change names it and this file is extended in the same change.
47
48
Elevation helpers: `ElevatedSurface` in `crates/app-base/src/theme.rs` (`flyout_surface`, `nested_flyout_surface`, `dialog_surface`, `toast_surface`). Prefer those over ad-hoc shadows.
49
50
## Measure
51
52
Canonical values live in `crates/app-ui-kit/src/layout.rs` and theme apply. Do not introduce new spacing or radius literals in views.
53
54
| Token | Value | Role |
55
|-------|------:|------|
56
| `ISLAND_GAP` | 6 | Gap between islands; outer padding of the island row |
57
| Island / card radius | 10 | Primary panels and cards (`theme.radius_lg`) |
58
| Control radius | 6 | Buttons, nav items, compact chips |
59
| Body text | 14 px | Default UI text size |
60
| Font family | Google Sans Flex | Product UI; mono Cascadia Code / Consolas when installed |
61
| `SIDEBAR_WIDTH` | 300 | Sidebar island width |
62
| `RAIL_ITEM_WIDTH` | 48 | Rail item hit target |
63
| `RAIL_WIDTH` | 60 | `RAIL_ITEM_WIDTH + 2 * ISLAND_GAP` |
64
| `ROW_PADDING` | 20 | Horizontal padding for conversation / list rows |
65
| `COMFY_RUNWAY_WIDTH` | 1060 | Comfortable message runway width |
66
67
Gaps between islands use `ISLAND_GAP` only. New screens reuse these constants; they do not invent parallel numbers.
68
69
## Colour
70
71
Use palette roles from `Palette` in `crates/app-base/src/theme/schemes.rs`, exposed as `theme::…` helpers or GPUI theme tokens after `theme::apply`. Views must not hard-code raw hex for product chrome.
72
73
Core roles (non-exhaustive; prefer an existing role over inventing a hex):
74
75
| Role | Typical use |
76
|------|-------------|
77
| `background` | Window / shell behind islands |
78
| `surface` | Island fill (sidebar, …) |
79
| `surface_raised` | Raised panels / secondary fills |
80
| `row_hover` | List row hover |
81
| `popup` / `popup_hover` | Flyouts and dialogs |
82
| `popup_nested` / `popup_nested_hover` | Nested menus |
83
| `border` / `border_strong` | Dividers and strong edges |
84
| `foreground`, `text_strong`, `text_soft`, `text_muted`, `text_faint` | Text hierarchy |
85
| `accent`, `accent_text`, `accent_soft`, `accent_strong`, `on_accent` | Primary actions and links |
86
| `bubble_own` / `bubble_other` | Message bubbles |
87
| `green`, `red`, `amber`, … | Status semantics already defined on the palette |
88
89
Shades: Dark (default), Light, High contrast. Schemes: Rusty Teams and Teams (`SCHEMES` in `schemes.rs`). Changing a hex belongs in the palette / scheme tables, not in a view.
90
91
## Content vs look
92
93
| Owned by | Examples |
94
|----------|----------|
95
| This file | Island shell, gaps, radii, type, colour roles, which surface to use |
96
| `GUARDRAILS.md` | Element order, icons, Teams strings, click paths, account writes |
97
| Feature changes / ADRs | Observable behaviour of a feature on those surfaces |
98
99
Feature work describes content and behaviour. It does not introduce new colours, gaps, or radii. Look changes update this file (and the shared constants) first.
100
101
## Known radius drift
102
103
Some views still use local radii other than 6 or 10 (for example 3, 4, 8, 12). That is debt:
104
105
- Do not add new occurrences of those values.
106
- When touching a file that uses them, move the control or island toward 6 or 10 as appropriate.
107
- Do not run a repo-wide visual rewrite solely to clear this debt in one pass.
@@ -0,0 +1,107 @@1
# Islands UI specification2
3
Source of truth for the app chrome and look. Feature work describes what appears on a surface; this file owns shell layout, allowed surfaces, spacing, radii, type, and colour roles.4
5
Referenced from `GUARDRAILS.md` (Look may differ from Teams; content and behaviour must match Teams).6
7
Code anchors:8
9
- Shell: `crates/app/src/views/shell.rs` (`islands`, `Render for AppShell`)10
- Layout constants: `crates/app-ui-kit/src/layout.rs`11
- Theme apply + accessors: `crates/app-base/src/theme.rs`12
- Palette roles: `crates/app-base/src/theme/schemes.rs`13
14
This document codifies the current look. It is not a redesign brief.15
16
## Shell17
18
Vertical stack in the main window:19
20
1. Title bar21
2. Optional connection banner22
3. One horizontal row of islands23
24
Island row (left → right):25
26
| Slot | Content | Notes |27
|------|---------|--------|28
| Rail | Navigation rail | Always present; selector `shell/islands/rail` |29
| Sidebar | Chat / team list | Optional; width `SIDEBAR_WIDTH` (300) |30
| Main | Exactly one primary island | Conversation, Calendar, Calls, Manage team, or Quick view |31
32
Modals and peeks render above the shell (settings, shortcuts, forward, status, agent start, calendar event peek, profile card, and similar). An active call or meeting uses a dedicated call window; the main window stays free for chat. See `GUARDRAILS.md` and ADR 0001.33
34
Do not invent a second primary island beside the main slot, or a new chrome band outside title bar / banner / island row, without updating this file in the same change.35
36
## Allowed surfaces37
38
| Surface | Use |39
|---------|-----|40
| Island | Primary chrome panels in the shell island row (rail, sidebar, main) |41
| Dialog | Modal overlays (settings, shortcuts, peeks that block the shell, …) |42
| Popover / menu | Flyouts and context menus (`flyout_surface` / nested flyout) |43
| Call window | Dedicated call / meeting window and its stage / toolbar |44
| Toast | Transient notices |45
46
A new surface type is allowed only when a feature change names it and this file is extended in the same change.47
48
Elevation helpers: `ElevatedSurface` in `crates/app-base/src/theme.rs` (`flyout_surface`, `nested_flyout_surface`, `dialog_surface`, `toast_surface`). Prefer those over ad-hoc shadows.49
50
## Measure51
52
Canonical values live in `crates/app-ui-kit/src/layout.rs` and theme apply. Do not introduce new spacing or radius literals in views.53
54
| Token | Value | Role |55
|-------|------:|------|56
| `ISLAND_GAP` | 6 | Gap between islands; outer padding of the island row |57
| Island / card radius | 10 | Primary panels and cards (`theme.radius_lg`) |58
| Control radius | 6 | Buttons, nav items, compact chips |59
| Body text | 14 px | Default UI text size |60
| Font family | Google Sans Flex | Product UI; mono Cascadia Code / Consolas when installed |61
| `SIDEBAR_WIDTH` | 300 | Sidebar island width |62
| `RAIL_ITEM_WIDTH` | 48 | Rail item hit target |63
| `RAIL_WIDTH` | 60 | `RAIL_ITEM_WIDTH + 2 * ISLAND_GAP` |64
| `ROW_PADDING` | 20 | Horizontal padding for conversation / list rows |65
| `COMFY_RUNWAY_WIDTH` | 1060 | Comfortable message runway width |66
67
Gaps between islands use `ISLAND_GAP` only. New screens reuse these constants; they do not invent parallel numbers.68
69
## Colour70
71
Use palette roles from `Palette` in `crates/app-base/src/theme/schemes.rs`, exposed as `theme::…` helpers or GPUI theme tokens after `theme::apply`. Views must not hard-code raw hex for product chrome.72
73
Core roles (non-exhaustive; prefer an existing role over inventing a hex):74
75
| Role | Typical use |76
|------|-------------|77
| `background` | Window / shell behind islands |78
| `surface` | Island fill (sidebar, …) |79
| `surface_raised` | Raised panels / secondary fills |80
| `row_hover` | List row hover |81
| `popup` / `popup_hover` | Flyouts and dialogs |82
| `popup_nested` / `popup_nested_hover` | Nested menus |83
| `border` / `border_strong` | Dividers and strong edges |84
| `foreground`, `text_strong`, `text_soft`, `text_muted`, `text_faint` | Text hierarchy |85
| `accent`, `accent_text`, `accent_soft`, `accent_strong`, `on_accent` | Primary actions and links |86
| `bubble_own` / `bubble_other` | Message bubbles |87
| `green`, `red`, `amber`, … | Status semantics already defined on the palette |88
89
Shades: Dark (default), Light, High contrast. Schemes: Rusty Teams and Teams (`SCHEMES` in `schemes.rs`). Changing a hex belongs in the palette / scheme tables, not in a view.90
91
## Content vs look92
93
| Owned by | Examples |94
|----------|----------|95
| This file | Island shell, gaps, radii, type, colour roles, which surface to use |96
| `GUARDRAILS.md` | Element order, icons, Teams strings, click paths, account writes |97
| Feature changes / ADRs | Observable behaviour of a feature on those surfaces |98
99
Feature work describes content and behaviour. It does not introduce new colours, gaps, or radii. Look changes update this file (and the shared constants) first.100
101
## Known radius drift102
103
Some views still use local radii other than 6 or 10 (for example 3, 4, 8, 12). That is debt:104
105
- Do not add new occurrences of those values.106
- When touching a file that uses them, move the control or island toward 6 or 10 as appropriate.107
- Do not run a repo-wide visual rewrite solely to clear this debt in one pass.