BlueGit

ict rusty-teams

Merge pull request #33: docs(design): track the islands UI look spec Guardrails already links

metis Daniel Däschle · pushed by metis

Authored 2026-11-14 · 2 weeks ago

Hash
9bb00fc208d087b3f8480310423d0a5b71577b3b
2 files changed +110 −0
.gitignore +3 −0
@@ -1,6 +1,9 @@
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/**
6 9 !docs/agents.md
@@ -1,6 +1,9 @@
1target/
1target/
2.claude/
2.claude/
3# Local research under docs/; track design SoT and ADRs.
3docs/*
4docs/*
5!docs/design/
6!docs/design/**
4!docs/decisions/
7!docs/decisions/
5!docs/decisions/**
8!docs/decisions/**
6!docs/agents.md
9!docs/agents.md
docs/design/islands/SPEC.md added +107 −0
@@ -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 specification
2
3Source 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
5Referenced from `GUARDRAILS.md` (Look may differ from Teams; content and behaviour must match Teams).
6
7Code 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
14This document codifies the current look. It is not a redesign brief.
15
16## Shell
17
18Vertical stack in the main window:
19
201. Title bar
212. Optional connection banner
223. One horizontal row of islands
23
24Island 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
32Modals 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
34Do 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
46A new surface type is allowed only when a feature change names it and this file is extended in the same change.
47
48Elevation 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
52Canonical 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
67Gaps between islands use `ISLAND_GAP` only. New screens reuse these constants; they do not invent parallel numbers.
68
69## Colour
70
71Use 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
73Core 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
89Shades: 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
99Feature 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
103Some 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.