Files
pipelines/app/lib/ui/adaptive/floating_destination_labels.dart
T
alan a6db4ba20e 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>
2026-12-03 00:55:50 +00:00

73 lines
2.4 KiB
Dart

import 'dart:ui' show SemanticsRole;
import 'package:flutter/material.dart';
/// Content-driven main navigation captions keep names visible without scaling
/// down touch targets. Narrow lists and large text wrap into another row.
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;
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onSurface;
final style = Theme.of(context).textTheme.labelSmall!;
return Semantics(
role: SemanticsRole.tabBar,
container: true,
explicitChildNodes: true,
child: Padding(
padding: const EdgeInsets.all(8),
child: Wrap(
alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 8,
runSpacing: 8,
children: [
for (var index = 0; index < labels.length; index++)
GestureDetector(
key: ValueKey('destination-label-${labels[index]}'),
excludeFromSemantics: true,
onTap: _enabled(index) ? () => onTap(index) : null,
child: TextFieldTapRegion(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
buttonBuilder(index),
ExcludeSemantics(
child: Text(
labels[index],
style: style.copyWith(
color: _enabled(index)
? color
: color.withValues(alpha: .38),
fontWeight: index == selected
? FontWeight.w600
: style.fontWeight,
),
),
),
],
),
),
),
],
),
),
);
}
}