App: run tabs under the header on wide layouts, stable Artifacts tab, spelled-out pipeline status, shared list selection, code block header and edge fades
- Run detail: on a wide window (>= 840, pane >= 600) the tabs are Material segments under the run header; phones keep the floating bottom bar. Artifacts is always a tab, badged with its count and disabled with 0 (its tooltip says why), so Changes never moves. - Pipelines list: 'Failed · last run 19 Oct' beside the status dot; facts on the next line; compact rows keep 'Failed · 19 Oct'. - Settings: Disconnect is outlined beside a tonal Reconnect. - Lists: one selection style (tonal fill plus one leading accent bar) for runs, pipelines and chats; chat's border, fill and pointer removed. - Transcript: overflowing blocks fade at the edge with a chevron instead of a 'Scroll horizontally' line (semantics hint kept); code blocks get a header strip with language and Copy; lighter light-mode code fill. - Runs list: rows under a day heading show only the time of day. - Artifact search reveal re-centres once the lazy list's extent settles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -197,6 +197,7 @@ class _FloatingDestinationBarState extends State<FloatingDestinationBar>
|
||||
final labels = FloatingDestinationLabels(
|
||||
key: FloatingDestinationBar.rowKey,
|
||||
labels: [for (final item in items) item.label],
|
||||
enabled: [for (final item in items) item.enabled],
|
||||
selected: currentIndex,
|
||||
buttonBuilder: (index) => _button(context, index),
|
||||
onTap: widget.onTap,
|
||||
@@ -267,6 +268,8 @@ class _FloatingDestinationBarState extends State<FloatingDestinationBar>
|
||||
iconSize: iconSize * size / _size,
|
||||
label: item.label,
|
||||
icon: selected ? item.selectedIcon ?? item.icon : item.icon,
|
||||
enabled: item.enabled,
|
||||
tooltip: item.tooltip,
|
||||
onTap: () => widget.onTap(index),
|
||||
),
|
||||
),
|
||||
@@ -281,8 +284,18 @@ class FloatingDestinationItem {
|
||||
required this.label,
|
||||
this.selectedIcon,
|
||||
this.key,
|
||||
this.enabled = true,
|
||||
this.tooltip,
|
||||
});
|
||||
|
||||
/// The tab's tooltip (and accessibility hint) instead of its label, such
|
||||
/// as why a disabled tab cannot open.
|
||||
final String? tooltip;
|
||||
|
||||
/// False shows the tab greyed out and takes no taps, so a tab that has
|
||||
/// nothing to show keeps its place in the bar.
|
||||
final bool enabled;
|
||||
|
||||
final Widget icon;
|
||||
|
||||
/// The tab's accessible name (and Material tooltip); not drawn.
|
||||
|
||||
@@ -7,11 +7,16 @@ class FloatingDestinationLabels extends StatelessWidget {
|
||||
const FloatingDestinationLabels({
|
||||
super.key,
|
||||
required this.labels,
|
||||
this.enabled = const [],
|
||||
required this.selected,
|
||||
required this.buttonBuilder,
|
||||
required this.onTap,
|
||||
});
|
||||
final List<String> labels;
|
||||
|
||||
/// Per label; a missing entry is enabled.
|
||||
final List<bool> enabled;
|
||||
bool _enabled(int index) => index >= enabled.length || enabled[index];
|
||||
final int selected;
|
||||
final Widget Function(int) buttonBuilder;
|
||||
final ValueChanged<int> onTap;
|
||||
@@ -36,7 +41,7 @@ class FloatingDestinationLabels extends StatelessWidget {
|
||||
GestureDetector(
|
||||
key: ValueKey('destination-label-${labels[index]}'),
|
||||
excludeFromSemantics: true,
|
||||
onTap: () => onTap(index),
|
||||
onTap: _enabled(index) ? () => onTap(index) : null,
|
||||
child: TextFieldTapRegion(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -46,7 +51,9 @@ class FloatingDestinationLabels extends StatelessWidget {
|
||||
child: Text(
|
||||
labels[index],
|
||||
style: style.copyWith(
|
||||
color: color,
|
||||
color: _enabled(index)
|
||||
? color
|
||||
: color.withValues(alpha: .38),
|
||||
fontWeight: index == selected
|
||||
? FontWeight.w600
|
||||
: style.fontWeight,
|
||||
|
||||
@@ -33,8 +33,16 @@ class FloatingTabButton extends StatelessWidget {
|
||||
required this.label,
|
||||
required this.icon,
|
||||
required this.onTap,
|
||||
this.enabled = true,
|
||||
this.tooltip,
|
||||
});
|
||||
|
||||
/// Shown (and given as the accessibility hint) instead of [label].
|
||||
final String? tooltip;
|
||||
|
||||
/// False greys the tab out and ignores taps; it keeps its place.
|
||||
final bool enabled;
|
||||
|
||||
final FloatingTabMotion motion;
|
||||
final int index;
|
||||
final int count;
|
||||
@@ -64,12 +72,14 @@ class FloatingTabButton extends StatelessWidget {
|
||||
child: Semantics(
|
||||
role: SemanticsRole.tab,
|
||||
selected: selected,
|
||||
enabled: enabled,
|
||||
hint: tooltip,
|
||||
button: true,
|
||||
label: kIsWeb ? label : '$label\n${_tabLabel(context)}',
|
||||
// Switching tabs does not unfocus a text field (the composer).
|
||||
child: TextFieldTapRegion(
|
||||
child: Tooltip(
|
||||
message: label,
|
||||
message: tooltip ?? label,
|
||||
excludeFromSemantics: true,
|
||||
child: button,
|
||||
),
|
||||
@@ -87,7 +97,9 @@ class FloatingTabButton extends StatelessWidget {
|
||||
return (
|
||||
tint: scheme.secondaryContainer,
|
||||
selectedIcon: scheme.onSecondaryContainer,
|
||||
icon: scheme.onSurfaceVariant,
|
||||
icon: enabled
|
||||
? scheme.onSurfaceVariant
|
||||
: scheme.onSurface.withValues(alpha: .38),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -105,7 +117,7 @@ class FloatingTabButton extends StatelessWidget {
|
||||
key: fillKey,
|
||||
decoration: decoration,
|
||||
child: InkResponse(
|
||||
onTap: onTap,
|
||||
onTap: enabled ? onTap : null,
|
||||
customBorder: const CircleBorder(),
|
||||
containedInkWell: true,
|
||||
highlightShape: BoxShape.circle,
|
||||
|
||||
@@ -28,6 +28,11 @@ const double _lineGap = 4;
|
||||
const appListRowSurfaceKey = ValueKey<String>('app-list-row-surface');
|
||||
const appListRowDividerKey = ValueKey<String>('app-list-row-divider');
|
||||
const appListRowAccentKey = ValueKey<String>('app-list-row-accent');
|
||||
const appListRowSelectionKey = ValueKey<String>('app-list-row-selection');
|
||||
|
||||
/// The width of a row's leading bar: the open row's accent, or an identity
|
||||
/// colour's mark.
|
||||
const double kAppListRowBarWidth = 4;
|
||||
|
||||
/// The app's one list row (runs, pipelines, chats, search results,
|
||||
/// schedules).
|
||||
@@ -42,7 +47,9 @@ const appListRowAccentKey = ValueKey<String>('app-list-row-accent');
|
||||
/// under the text column separates rows. Nothing has a fixed height: the row
|
||||
/// grows with text scaling and every line ellipsises.
|
||||
///
|
||||
/// [selected] paints the open row (Material `secondaryContainer`); [emphasized]
|
||||
/// [selected] paints the open row: Material `secondaryContainer` with one
|
||||
/// [selectionAccent] bar on its leading edge, the one selection style every
|
||||
/// list shares; [emphasized]
|
||||
/// marks unread/attention (a heavier title and an accent time). Rows ripple.
|
||||
class AppListRow extends StatelessWidget {
|
||||
const AppListRow({
|
||||
@@ -54,6 +61,7 @@ class AppListRow extends StatelessWidget {
|
||||
this.subtitle,
|
||||
this.compactSubtitle,
|
||||
this.detail,
|
||||
this.compactDetail = true,
|
||||
this.subtitleLeading,
|
||||
this.subtitleTrailing,
|
||||
this.menu,
|
||||
@@ -68,8 +76,14 @@ class AppListRow extends StatelessWidget {
|
||||
this.compactWidth = kAppListRowCompactWidth,
|
||||
this.accent,
|
||||
this.showAccentBorder = true,
|
||||
this.selectionAccent,
|
||||
});
|
||||
|
||||
/// The leading bar's colour on the open row; Material `primary` when null.
|
||||
/// Every list marks its open row the same way: the tonal fill plus this
|
||||
/// one bar.
|
||||
final Color? selectionAccent;
|
||||
|
||||
/// The item's own colour (a chat's highlight): a bar on the row's leading
|
||||
/// edge and a faint tint under an unselected row. The selected fill still
|
||||
/// marks the open row, so the two never read as one another.
|
||||
@@ -93,6 +107,10 @@ class AppListRow extends StatelessWidget {
|
||||
/// An optional third line under the subtitle (a failed run's reason), one
|
||||
/// ellipsised line in the subtitle style unless the widget styles itself.
|
||||
final Widget? detail;
|
||||
|
||||
/// Whether a compact row keeps [detail]; false leaves a narrow row its
|
||||
/// title and [compactSubtitle] only.
|
||||
final bool compactDetail;
|
||||
final Widget? subtitleLeading;
|
||||
final Widget? subtitleTrailing;
|
||||
final Widget? menu;
|
||||
@@ -184,14 +202,22 @@ class AppListRow extends StatelessWidget {
|
||||
// The colour bar runs the row's whole height, divider included, and
|
||||
// the tint fills the divider's inset too, so coloured rows read as
|
||||
// one band each.
|
||||
Widget marked(Widget row) => accent == null || !showAccentBorder
|
||||
// The open row's bar, else an identity colour's own bar.
|
||||
final bar = selected
|
||||
? selectionAccent ??
|
||||
accent ??
|
||||
Theme.of(context).colorScheme.primary
|
||||
: showAccentBorder
|
||||
? accent
|
||||
: null;
|
||||
Widget marked(Widget row) => bar == null
|
||||
? row
|
||||
: DecoratedBox(
|
||||
key: appListRowAccentKey,
|
||||
key: selected ? appListRowSelectionKey : appListRowAccentKey,
|
||||
position: DecorationPosition.foreground,
|
||||
decoration: BoxDecoration(
|
||||
border: BorderDirectional(
|
||||
start: BorderSide(color: accent!, width: 4),
|
||||
start: BorderSide(color: bar, width: kAppListRowBarWidth),
|
||||
),
|
||||
),
|
||||
child: row,
|
||||
@@ -276,7 +302,7 @@ class AppListRow extends StatelessWidget {
|
||||
// A compact row has no room beside its title: the time takes a line of
|
||||
// its own under the subtitle.
|
||||
final timeLine = compact ? time : null;
|
||||
final detailLine = detail == null
|
||||
final detailLine = detail == null || (compact && !compactDetail)
|
||||
? null
|
||||
: Padding(
|
||||
padding: const EdgeInsets.only(top: _lineGap),
|
||||
|
||||
Reference in New Issue
Block a user