feat(docs): in-place help pattern — explain a surface where it happens
Some checks failed
Security / Security check (push) Failing after 2s

New ChainInlineHelp (intro strip: what this is + what will happen, with
an optional 'Learn more' into the doc sheet) and ChainFieldHelp /
ChainFieldLabel (a '?' affordance per field). First applied to the
add-satellite dialog, which asked for a bare 'name' with no hint of
what a satellite is or does (usertest): it now leads with a plain
explanation + a federation 'Learn more', and the name field carries a
'?'. Both widgets are quiet by design.

Verified: field_help_test covers the widgets + that the dialog explains
itself; dialog_shots_test.dart (a reusable headed dialog-capture
harness) proved the layout in light + dark. Studio 0.76.0.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-07-20 02:00:56 +02:00
parent 5a3f00bb2c
commit 87afa4dc05
8 changed files with 390 additions and 9 deletions

View file

@ -61,13 +61,38 @@ class _FederationPageState extends State<FederationPage> {
context: context,
builder: (ctx) => AlertDialog(
title: Text(l.federationAddDialogTitle),
content: TextField(
controller: controller,
autofocus: true,
decoration: InputDecoration(
labelText: l.federationNameLabel,
hintText: 'satellite-a',
border: const OutlineInputBorder(),
content: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 420),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Say what this is and what will happen before asking
// for input a bare "name" field left the operator
// guessing what a satellite even is (usertest).
ChainInlineHelp(
text: l.federationAddIntro,
icon: Icons.hub_outlined,
onLearnMore: () => showFaiDoc(ctx, 'federation'),
learnMoreLabel: l.buttonLearnMore,
),
const SizedBox(height: ChainSpace.lg),
ChainFieldLabel(
label: l.federationNameLabel,
help: l.federationNameHelp,
),
const SizedBox(height: ChainSpace.xs),
TextField(
controller: controller,
autofocus: true,
decoration: const InputDecoration(
hintText: 'satellite-a',
border: OutlineInputBorder(),
isDense: true,
),
onSubmitted: (v) => Navigator.pop(ctx, v.trim()),
),
],
),
),
actions: [