Paper: task card in the panel fill; design notes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 19:21:14 +00:00
parent 7d2c3412a1
commit d13dee4852
2 changed files with 42 additions and 0 deletions
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import '../domain/chat_task_metadata.dart';
import '../../../ui/text/monospace.dart';
import '../../../ui/theme/app_design_tokens.dart';
Color taskSecondary(BuildContext context) =>
Theme.of(context).colorScheme.onSurfaceVariant;
@@ -72,6 +73,9 @@ class ChatTaskSurface extends StatelessWidget {
@override
Widget build(BuildContext context) => Card.filled(
// A design with its own panel fill (Paper's page under a hairline)
// draws the card in it rather than a filled tone.
color: AppDesignTokens.of(context).panel,
margin: EdgeInsets.zero,
child: Padding(padding: padding, child: child),
);
+38
View File
@@ -0,0 +1,38 @@
# Paper design
A calm reading design (Settings > Design > Paper): warm paper page (sepia
charcoal "night paper" in dark), Source Serif 4 for reading text and titles,
the interface font for chrome, ink colours with one deep-blue accent, 8px
corners, hairline rules and a whisper of shadow only on menus, dialogs, sheets
and snack bars.
## Tokens added to `AppDesignTokens` (all default to the Default look)
- `transcript` (`TranscriptStyle.bubbles | prompt | manuscript`): how the chat
draws turns. Terminal = `prompt`; Paper = `manuscript` (block-quote operator
turns with a small-caps "YOU", serif prose, marginal activity note, italic
editorial notes for follow-ups/auto-continue). `tokens.terminal` now means
`transcript == prompt`.
- `composer` (`pill | underline`): Paper's composer is an underlined writing
area (`composer_underline.dart`).
- `selectedRow` (`tonal | framed | washed`): AppListRow's open row; replaces
the hard-coded Terminal frame. Terminal = `framed` (unchanged look).
- `reading` (`ReadingType`: family, height, measure in ch, scale,
figureWidth): reading text style (`chatMessageTextStyle`) and the chat
reading column width (`chatReadingWidthOf`).
- `panel`: fill of a flat design's own panels (settings groups, floating bar
pieces, task cards, the usage banner); `panelFill()` and `frameSide` helpers.
- `chatColorSaturation`: quietens chat colours (`chatColorShade`).
## Adding a design
See the `AppDesign` doc comment: add the enum value (id, label, one line),
a `<name>_theme.dart` builder, its tokens and a `swatch`. Floating pieces
(app choice menu, code Copy hover, graph edge tooltip) follow the theme's
`popupMenuTheme`; custom radii go through `tokens.corners()` / `shape()`.
## Font
`fonts/source-serif-4/` (OFL, see fonts/README.md), plain assets loaded on
demand by `ensurePaperFonts()` when Paper's theme is first built; no network
font fetch. Its italic has no `smcp`, so small caps are spaced capitals.