fix: page-named toolbar title + ellipsized needs-modules chip (0.21.1)

With no flow open the toolbar header said 'Kein Flow geöffnet' and
read as the page title (usertest finding); it now names the page
('Flows') while the empty state keeps the explanatory sentence. The
'needs N modules' chip ellipsizes in the narrow flow list instead of
overflowing its row on longer German labels.

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-07-11 02:37:01 +02:00
parent fb41a518c9
commit c4d3751e85
4 changed files with 35 additions and 10 deletions

View file

@ -925,10 +925,13 @@ class _Toolbar extends StatelessWidget {
),
const SizedBox(width: FaiSpace.xs),
],
// With no flow open the toolbar acts as the page header, so
// it says what the page IS ("Flows"), not what it lacks
// the state sentence stays in the centered empty state.
Text(
activeName == null ? strings.emptyTitle : '${activeName!}.yaml',
activeName == null ? strings.pageTitle : '${activeName!}.yaml',
style: theme.textTheme.titleSmall?.copyWith(
fontFamily: 'monospace',
fontFamily: activeName == null ? null : 'monospace',
fontWeight: FontWeight.w600,
// Dirty file name renders in the primary accent
// so the operator sees "this file has unsaved
@ -1486,13 +1489,19 @@ class _MissingModulesBadge extends StatelessWidget {
children: [
const Icon(Icons.extension_off_outlined, size: 10, color: warn),
const SizedBox(width: 4),
Text(
label,
style: theme.textTheme.labelSmall?.copyWith(
color: warn,
fontSize: 10,
fontWeight: FontWeight.w600,
letterSpacing: 0.2,
// Flexible + ellipsis: the chip sits in the narrow flow
// list, where the full label otherwise overflows by a few
// pixels (the tooltip still carries the complete text).
Flexible(
child: Text(
label,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.labelSmall?.copyWith(
color: warn,
fontSize: 10,
fontWeight: FontWeight.w600,
letterSpacing: 0.2,
),
),
),
],