Merge main (Compact design) into Glass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 23:22:56 +00:00
93 changed files with 4110 additions and 313 deletions
@@ -59,7 +59,10 @@ class ChatUserBubble extends StatelessWidget {
// scrolls, so it never filters what is behind it).
final glass = AppDesignTokens.of(context).glass;
// A Material surface (not a bare DecoratedBox) so a disclosure ListTile
// inside the bubble keeps its ink and background.
// inside the bubble keeps its ink and background. A dense design draws
// a tighter bubble in its own corners.
final tokens = AppDesignTokens.of(context);
final density = tokens.density;
return Material(
color: chatBubbleFill(
context,
@@ -67,13 +70,21 @@ class ChatUserBubble extends StatelessWidget {
),
clipBehavior: Clip.antiAlias,
shape: glass == null
? const RoundedRectangleBorder(borderRadius: _radius)
? RoundedRectangleBorder(borderRadius: tokens.corners(_radius))
: GlassBorder(
borderRadius: _radius,
borderRadius: tokens.corners(_radius),
highlight: glass.highlight,
edge: glass.edge,
),
child: Padding(padding: _padding, child: child),
child: Padding(
padding: density.dense
? EdgeInsets.symmetric(
horizontal: density.inset(_padding.left),
vertical: density.space(_padding.top),
)
: _padding,
child: child,
),
);
}
}
@@ -99,8 +110,10 @@ TextStyle? chatMessageTextStyle(BuildContext context) => AppDesignTokens.of(
/// The empty-line gap between two paragraphs of a reply: about one line of
/// body text at [fontSize] (else the ambient text size), scaled by the
/// operator's text scaling, so chunks read as separate paragraphs.
/// operator's text scaling, so chunks read as separate paragraphs. A design
/// may set a tighter gap ([ReadingType.paragraphGap]).
double chatParagraphGap(BuildContext context, [double? fontSize]) {
final size = fontSize ?? DefaultTextStyle.of(context).style.fontSize ?? 14;
return MediaQuery.textScalerOf(context).scale(size) * 0.9;
return MediaQuery.textScalerOf(context).scale(size) *
AppDesignTokens.of(context).reading.paragraphGap;
}