feat: sample flows follow the hub's wire flag; examples group + import action
The Example chip used to come from a client-side content-marker scan that had drifted from the hub's renamed sample header — no current sample matched it. The host now passes the hub-reported sample set (FlowSummary.sample) and the editor renders truth only: no host info, no chips. Samples collapse under one 'Examples (N)' group below the operator's own flows (expanded only when nothing else exists), and an optional onImportSamples action on the empty list is the deliberate way to pull the bundled examples into a sealed area's empty hub. Guard: flow_list_samples_test pins chips-from-host-only, the grouping, and the import round trip. Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
8da50068f3
commit
29294a2971
6 changed files with 330 additions and 31 deletions
|
|
@ -12,11 +12,17 @@ class FaiEmptyState extends StatelessWidget {
|
|||
final IconData icon;
|
||||
final String title;
|
||||
final String? hint;
|
||||
|
||||
/// Optional action rendered under the hint (e.g. the empty flow
|
||||
/// list's "import example flows" button).
|
||||
final Widget? action;
|
||||
|
||||
const FaiEmptyState({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.title,
|
||||
this.hint,
|
||||
this.action,
|
||||
});
|
||||
|
||||
@override
|
||||
|
|
@ -46,6 +52,10 @@ class FaiEmptyState extends StatelessWidget {
|
|||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
if (action != null) ...[
|
||||
const SizedBox(height: FaiSpace.md),
|
||||
action!,
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue