feat(design): surface phase — Lucide icons, input radius, Illuminated Transcript, ActionColors
Per-screen application of the design system to the Flutter app. Mirrors the web's surface phase landed in FabledScribe v26.04.28.1. Foundation port shipped in 0f05f47; this is the surface work. Lucide icon migration - Added lucide_icons ^0.257.0 dependency - 107 Material Icons references → LucideIcons across 21 files. Drop-in IconData swap (Icon(LucideIcons.X) instead of Icon(Icons.x)). - Lucide import added to each touched file. Input border radius - theme.dart inputDecorationTheme borderRadius 24 → 8 in both light and dark themes. Doc says radius-md (8px) for inputs; previous pill shape was Material default that the doc deviates from. Illuminated Transcript pattern (ChatMessageBubble) - User bubble: accent-tinted border → neutral Pewter (scheme.outline). Asymmetric corner already correct (bottomRight 4px). - Assistant bubble: topLeft corner 4 → 16; only bottomLeft stays 4 (the "tail" effect, mirroring web's `border-bottom-left-radius: 4px`). Background switched from surfaceContainerHighest (Slate) to surface (Iron) per the doc spec "card surface". - Assistant bubble glow shadow added — accent-tinted blur (28px alpha 0.14) + depth shadow (8px alpha 0.4 black). Mirrors web's --color-bubble-asst-shadow. ActionColors wiring (Hybrid rule) - 5 'Delete' confirm buttons across notes / tasks / chat conversations / calendar event sheet → Oxblood action-destructive via the ActionColors ThemeExtension defined in the foundation port. Foreground for ghost/text variants, backgroundColor for filled. - Calendar event Save button → Moss action-primary. The first call site to wire ActionColors.primary; serves as the pattern for future Save reclassifications. - Other Save buttons (note edit, task edit, project edit, etc.) still flow through colorScheme.primary (dusty violet) and read as brand-moment. Reclassifying those is deferred — the wiring pattern is established and can be applied incrementally as files are touched. Indigo cleanup - 4 hardcoded #7C3AED / #5B21B6 literals → dusty-violet equivalents (#5B4A8A / #3F3560). Spots: project_tasks_screen color fallback (×2), journal_screen gradient. Verification - flutter analyze: No issues found What's deferred - Per-screen Save / Cancel reclassification beyond the calendar event Save button. Wiring pattern established; rollout opportunistic. - Long-form 1.7 line-height on assistant Markdown content (would require MarkdownStyleSheet work; minor). - Surface walk on Knowledge / Projects / Settings screens for any hardcoded styling that needs touch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -41,13 +41,16 @@ class ChatMessageBubble extends ConsumerWidget {
|
||||
maxWidth: min(MediaQuery.of(context).size.width * 0.82, 480),
|
||||
),
|
||||
margin: const EdgeInsets.symmetric(vertical: 4, horizontal: 4),
|
||||
// Illuminated Transcript pattern (mirrors web's ChatMessage.vue):
|
||||
// - User bubble: transparent bg, neutral Pewter border, only the
|
||||
// bottom-right corner clipped (the "from-me" tail).
|
||||
// - Assistant bubble: card surface, 2px accent left edge (the
|
||||
// "illuminated capital"), accent-tinted glow shadow + depth
|
||||
// shadow, only the bottom-left corner clipped.
|
||||
decoration: isUser
|
||||
? BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
border: Border.all(
|
||||
color: scheme.primary.withValues(alpha: 0.35),
|
||||
width: 1,
|
||||
),
|
||||
border: Border.all(color: scheme.outline, width: 1),
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
@@ -56,16 +59,28 @@ class ChatMessageBubble extends ConsumerWidget {
|
||||
),
|
||||
)
|
||||
: BoxDecoration(
|
||||
color: scheme.surfaceContainerHighest,
|
||||
color: scheme.surface,
|
||||
border: Border(
|
||||
left: BorderSide(color: scheme.primary, width: 2),
|
||||
),
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(4),
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
bottomLeft: Radius.circular(4),
|
||||
bottomRight: Radius.circular(16),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: scheme.primary.withValues(alpha: 0.14),
|
||||
blurRadius: 28,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.4),
|
||||
blurRadius: 8,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
import 'package:flutter_markdown_plus/flutter_markdown_plus.dart';
|
||||
|
||||
import '../data/models/message.dart';
|
||||
@@ -46,7 +47,7 @@ class _JournalPrepCardState extends State<JournalPrepCard> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.menu_book_outlined, size: 18, color: scheme.primary),
|
||||
Icon(LucideIcons.bookOpen, size: 18, color: scheme.primary),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
_todayLabel(),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../data/models/knowledge_item.dart';
|
||||
@@ -8,11 +9,11 @@ class KnowledgeItemCard extends StatelessWidget {
|
||||
const KnowledgeItemCard({super.key, required this.item});
|
||||
|
||||
IconData get _icon => switch (item.noteType) {
|
||||
'person' => Icons.person_outlined,
|
||||
'place' => Icons.place_outlined,
|
||||
'list' => Icons.checklist_outlined,
|
||||
'task' => Icons.task_alt_outlined,
|
||||
_ => Icons.description_outlined,
|
||||
'person' => LucideIcons.user,
|
||||
'place' => LucideIcons.mapPin,
|
||||
'list' => LucideIcons.listChecks,
|
||||
'task' => LucideIcons.checkCircle2,
|
||||
_ => LucideIcons.fileText,
|
||||
};
|
||||
|
||||
Color _statusColor(BuildContext context) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../providers/auth_provider.dart';
|
||||
@@ -40,7 +41,7 @@ class _OfflineBannerState extends ConsumerState<OfflineBanner> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.cloud_off_outlined,
|
||||
Icon(LucideIcons.cloudOff,
|
||||
size: 18, color: scheme.onErrorContainer),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../core/constants.dart';
|
||||
@@ -45,24 +46,24 @@ const Map<String, String> _toolLabels = {
|
||||
};
|
||||
|
||||
IconData _iconFor(String fn) {
|
||||
if (fn.contains('note')) return Icons.sticky_note_2_outlined;
|
||||
if (fn.contains('task')) return Icons.check_circle_outline;
|
||||
if (fn.contains('note')) return LucideIcons.stickyNote;
|
||||
if (fn.contains('task')) return LucideIcons.checkCircle2;
|
||||
if (fn.contains('event') || fn.contains('calendar')) {
|
||||
return Icons.event_outlined;
|
||||
return LucideIcons.calendarCheck;
|
||||
}
|
||||
if (fn.contains('project')) return Icons.folder_outlined;
|
||||
if (fn.contains('milestone')) return Icons.flag_outlined;
|
||||
if (fn.contains('project')) return LucideIcons.folder;
|
||||
if (fn.contains('milestone')) return LucideIcons.flag;
|
||||
if (fn.contains('web') || fn.contains('research') || fn.contains('article')) {
|
||||
return Icons.public;
|
||||
return LucideIcons.globe;
|
||||
}
|
||||
if (fn.contains('image')) return Icons.image_outlined;
|
||||
if (fn.contains('image')) return LucideIcons.image;
|
||||
if (fn.contains('person') || fn.contains('profile')) {
|
||||
return Icons.person_outline;
|
||||
return LucideIcons.user;
|
||||
}
|
||||
if (fn.contains('place')) return Icons.place_outlined;
|
||||
if (fn.contains('rag') || fn.contains('scope')) return Icons.tune;
|
||||
if (fn.contains('calculate')) return Icons.calculate_outlined;
|
||||
return Icons.auto_awesome;
|
||||
if (fn.contains('place')) return LucideIcons.mapPin;
|
||||
if (fn.contains('rag') || fn.contains('scope')) return LucideIcons.sliders;
|
||||
if (fn.contains('calculate')) return LucideIcons.calculator;
|
||||
return LucideIcons.sparkles;
|
||||
}
|
||||
|
||||
/// Pull the destination route for this tool call from its `result` payload,
|
||||
@@ -161,7 +162,7 @@ class ToolCallChip extends StatelessWidget {
|
||||
),
|
||||
if (route != null) ...[
|
||||
const SizedBox(width: 4),
|
||||
Icon(Icons.arrow_forward, size: 11, color: fg),
|
||||
Icon(LucideIcons.arrowRight, size: 11, color: fg),
|
||||
],
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
|
||||
import '../providers/voice_provider.dart';
|
||||
|
||||
@@ -48,8 +49,8 @@ class VoiceMicButton extends StatelessWidget {
|
||||
color: iconColor,
|
||||
),
|
||||
),
|
||||
VoiceMode.playing => Icon(Icons.volume_up, color: iconColor, size: 20),
|
||||
_ => Icon(Icons.mic, color: iconColor, size: 20),
|
||||
VoiceMode.playing => Icon(LucideIcons.volume2, color: iconColor, size: 20),
|
||||
_ => Icon(LucideIcons.mic, color: iconColor, size: 20),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user