BlueGit

ict rusty-teams

Files

rusty-teams / docs / design / islands / SPEC.md

SPEC.md

SPEC.md 5.3 KiB Download Raw

Islands UI specification

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.

Referenced from GUARDRAILS.md (Look may differ from Teams; content and behaviour must match Teams).

Code anchors:

  • Shell: crates/app/src/views/shell.rs (islands, Render for AppShell)
  • Layout constants: crates/app-ui-kit/src/layout.rs
  • Theme apply + accessors: crates/app-base/src/theme.rs
  • Palette roles: crates/app-base/src/theme/schemes.rs

This document codifies the current look. It is not a redesign brief.

Shell

Vertical stack in the main window:

1. Title bar 2. Optional connection banner 3. One horizontal row of islands

Island row (left → right):

SlotContentNotes
RailNavigation railAlways present; selector shell/islands/rail
SidebarChat / team listOptional; width SIDEBAR_WIDTH (300)
MainExactly one primary islandConversation, Calendar, Calls, Manage team, or Quick view

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.

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.

Allowed surfaces

SurfaceUse
IslandPrimary chrome panels in the shell island row (rail, sidebar, main)
DialogModal overlays (settings, shortcuts, peeks that block the shell, …)
Popover / menuFlyouts and context menus (flyout_surface / nested flyout)
Call windowDedicated call / meeting window and its stage / toolbar
ToastTransient notices

A new surface type is allowed only when a feature change names it and this file is extended in the same change.

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.

Measure

Canonical values live in crates/app-ui-kit/src/layout.rs and theme apply. Do not introduce new spacing or radius literals in views.

TokenValueRole
ISLAND_GAP6Gap between islands; outer padding of the island row
Island / card radius10Primary panels and cards (theme.radius_lg)
Control radius6Buttons, nav items, compact chips
Body text14 pxDefault UI text size
Font familyGoogle Sans FlexProduct UI; mono Cascadia Code / Consolas when installed
SIDEBAR_WIDTH300Sidebar island width
RAIL_ITEM_WIDTH48Rail item hit target
RAIL_WIDTH60RAIL_ITEM_WIDTH + 2 * ISLAND_GAP
ROW_PADDING20Horizontal padding for conversation / list rows
COMFY_RUNWAY_WIDTH1060Comfortable message runway width

Gaps between islands use ISLAND_GAP only. New screens reuse these constants; they do not invent parallel numbers.

Colour

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.

Core roles (non-exhaustive; prefer an existing role over inventing a hex):

RoleTypical use
backgroundWindow / shell behind islands
surfaceIsland fill (sidebar, …)
surface_raisedRaised panels / secondary fills
row_hoverList row hover
popup / popup_hoverFlyouts and dialogs
popup_nested / popup_nested_hoverNested menus
border / border_strongDividers and strong edges
foreground, text_strong, text_soft, text_muted, text_faintText hierarchy
accent, accent_text, accent_soft, accent_strong, on_accentPrimary actions and links
bubble_own / bubble_otherMessage bubbles
green, red, amber, …Status semantics already defined on the palette
accent, then avatar_paletteCalendar colours: Outlook takes accent, every further calendar in the calendar list the next palette colour (theme::calendar_color)

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.

Content vs look

Owned byExamples
This fileIsland shell, gaps, radii, type, colour roles, which surface to use
GUARDRAILS.mdElement order, icons, Teams strings, click paths, account writes
Feature changes / ADRsObservable behaviour of a feature on those surfaces

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.

Known radius drift

Some views still use local radii other than 6 or 10 (for example 3, 4, 8, 12). That is debt:

  • Do not add new occurrences of those values.
  • When touching a file that uses them, move the control or island toward 6 or 10 as appropriate.
  • Do not run a repo-wide visual rewrite solely to clear this debt in one pass.
Source
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| `accent`, then `avatar_palette` | Calendar colours: Outlook takes `accent`, every further calendar in the calendar list the next palette colour (`theme::calendar_color`) |
89
90Shades: 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.
91
92## Content vs look
93
94| Owned by | Examples |
95|----------|----------|
96| This file | Island shell, gaps, radii, type, colour roles, which surface to use |
97| `GUARDRAILS.md` | Element order, icons, Teams strings, click paths, account writes |
98| Feature changes / ADRs | Observable behaviour of a feature on those surfaces |
99
100Feature work describes content and behaviour. It does not introduce new colours, gaps, or radii. Look changes update this file (and the shared constants) first.
101
102## Known radius drift
103
104Some views still use local radii other than 6 or 10 (for example 3, 4, 8, 12). That is debt:
105
106- Do not add new occurrences of those values.
107- When touching a file that uses them, move the control or island toward 6 or 10 as appropriate.
108- Do not run a repo-wide visual rewrite solely to clear this debt in one pass.