polish compact pipeline and run lists
This commit is contained in:
@@ -208,8 +208,9 @@ class PipelineListPanel extends StatelessWidget {
|
||||
),
|
||||
visualDensity: VisualDensity.compact,
|
||||
leading: compact ? null : _pipelineIdentityIcon(context),
|
||||
title: _rowTitle(context, pipeline),
|
||||
subtitle: _rowMetadata(context, pipeline, now),
|
||||
title: _rowTitle(context, pipeline, compact: compact),
|
||||
subtitle: _rowMetadata(context, pipeline, now, compact: compact),
|
||||
trailing: compact ? null : const Icon(Icons.chevron_right),
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -236,8 +237,13 @@ class PipelineListPanel extends StatelessWidget {
|
||||
? CupertinoColors.tertiarySystemFill.resolveFrom(context)
|
||||
: null,
|
||||
leading: compact ? null : _pipelineIdentityIcon(context),
|
||||
title: _rowTitle(context, pipeline),
|
||||
subtitle: _rowMetadata(context, pipeline, now),
|
||||
title: _rowTitle(context, pipeline, compact: compact),
|
||||
subtitle: _rowMetadata(
|
||||
context,
|
||||
pipeline,
|
||||
now,
|
||||
compact: compact,
|
||||
),
|
||||
trailing: compact ? null : const CupertinoListTileChevron(),
|
||||
onTap: () => controller.openPipeline(
|
||||
pipeline.id,
|
||||
@@ -252,8 +258,21 @@ class PipelineListPanel extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// The row's title line: its name, and its version and id in the corner.
|
||||
Widget _rowTitle(BuildContext context, PipelineSummary pipeline) {
|
||||
/// A narrow split pane keeps the name alone; the detail preserves identity.
|
||||
Widget _rowTitle(
|
||||
BuildContext context,
|
||||
PipelineSummary pipeline, {
|
||||
required bool compact,
|
||||
}) {
|
||||
final muted = _mutedStyle(context);
|
||||
if (compact) {
|
||||
return Text(
|
||||
pipeline.displayName,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
);
|
||||
}
|
||||
return _measured(
|
||||
Row(
|
||||
children: [
|
||||
@@ -286,8 +305,9 @@ class PipelineListPanel extends StatelessWidget {
|
||||
Widget _rowMetadata(
|
||||
BuildContext context,
|
||||
PipelineSummary pipeline,
|
||||
DateTime now,
|
||||
) {
|
||||
DateTime now, {
|
||||
required bool compact,
|
||||
}) {
|
||||
final style = _mutedStyle(context);
|
||||
final what = [
|
||||
pipelineStageSummary(pipeline),
|
||||
@@ -328,6 +348,35 @@ class PipelineListPanel extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
// A 640px window can leave this pane about 130px wide. At that size the
|
||||
// latest state is the useful decision signal; stage counts, timestamps,
|
||||
// graph cues and version live in the selected pipeline's detail instead.
|
||||
if (compact) {
|
||||
// Do not turn an in-flight or failed run-history read into a false
|
||||
// no-runs claim. The normal row also stays blank until history is known.
|
||||
if (badge == null) return lastRun;
|
||||
return Semantics(
|
||||
label: runStateLabel(badge.state),
|
||||
child: Row(
|
||||
children: [
|
||||
RunStatusIcon(
|
||||
state: badge.state,
|
||||
label: runStateLabel(badge.state),
|
||||
size: 14,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: Text(
|
||||
runStateLabel(badge.state),
|
||||
style: style,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
return _measured(
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
||||
Reference in New Issue
Block a user