feat(studio): pencil-into-editor + back button + collapsible rail
Some checks failed
Security / Security check (push) Failing after 2s

Three operator-visible improvements per Stefan's review of
the v0.50.0 editor.

1. Pencil icon on Flows page now opens Studio's own flow
   editor (route push) preloaded with the selected flow,
   replacing the previous "open in OS default editor"
   (SystemActions.openInOs) behaviour. The editor's AppBar
   gains a back arrow when reached via route push; reaching
   the editor via the nav rail leaves it bare. Tooltip
   string updated in EN + DE.

2. New FlowEditorPage `initialFlowName` parameter. When set,
   the page loads that flow on first frame (via post-frame
   callback so the BuildContext is mounted before
   _openByName runs). When null (the nav-rail path), the
   editor opens to its empty state as before.

3. Sidebar (_Sidebar) is now collapsed-by-default: shows
   just icons in a 72px-wide rail with per-destination
   tooltips. Hovering the rail expands it to 220px (the
   old width) with brand-mark + labels + the full footer
   row (theme toggle, language toggle, clock, settings).
   Collapsed footer shows the settings icon only. Brand-
   mark (FaiDeltaMark) stays visible in both states so the
   live/idle status dot is always glanceable.

Side-effect: SystemActions import in flows.dart is no
longer needed (the pencil no longer shells out) — removed.

widget_test.dart: dropped the per-destination Text-presence
asserts since labels are now Tooltips when collapsed.
Hover-expand testing triggers RenderFlex-overflow mid-
animation in widget tests (the AnimatedContainer's width
transitions through a constraint slimmer than the Row's
intrinsic min). The booting-without-throwing assertion
remains; per-destination presence stays in the per-page
test suites.

Both arb files updated with the new strings (navFlowEditor
already existed; added flowEditorBackTooltip + retouched
flowsOpenInEditorTooltip).

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-30 12:04:05 +02:00
parent 647d93a1dc
commit e522267ec1
9 changed files with 269 additions and 142 deletions

View file

@ -2093,7 +2093,7 @@ abstract class AppLocalizations {
/// No description provided for @flowsOpenInEditorTooltip.
///
/// In en, this message translates to:
/// **'Open the YAML file in your default editor'**
/// **'Open in Studio\'s flow editor'**
String get flowsOpenInEditorTooltip;
/// No description provided for @flowsOpenInEditorFailed.
@ -3734,6 +3734,12 @@ abstract class AppLocalizations {
/// **'Editor'**
String get navFlowEditor;
/// No description provided for @flowEditorBackTooltip.
///
/// In en, this message translates to:
/// **'Back'**
String get flowEditorBackTooltip;
/// No description provided for @flowEditorNew.
///
/// In en, this message translates to: