fix(app): keep round-3 run rows within narrow large-text widths
The trailing relative time could not shrink, so a 320px row at 2x text overflowed; it now keeps at most 40% of the title line and ellipsises. Update the pipelines screen test for rows that no longer show the run number or a no-runs line.
This commit is contained in:
@@ -370,21 +370,38 @@ class RunListRow extends StatelessWidget {
|
||||
),
|
||||
]
|
||||
: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
title,
|
||||
style: titleStyle,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
// The time keeps at most 40% of the line, so very large
|
||||
// text in a narrow row ellipsises instead of overflowing.
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) => Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
title,
|
||||
style: titleStyle,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (relativeTime != null) ...[
|
||||
const SizedBox(width: 8),
|
||||
Text(relativeTime, style: small, maxLines: 1),
|
||||
if (relativeTime != null)
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: constraints.maxWidth * 0.4,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.only(
|
||||
start: 8,
|
||||
),
|
||||
child: Text(
|
||||
relativeTime,
|
||||
style: small,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user