feat(editor): properties-panel toggle + LabVIEW-style type colours

Two visible UX fixes:

1. Properties-panel toggle. Tap a step → opens. Tap the
   same step again → closes (deselect via toggle). Tap the
   canvas background → also closes. selectStep now returns
   to null when called with the already-selected id; the
   editor-controller test updated for the new semantics.

2. LabVIEW-style type colours on every port + wire.
   _typeAccent now picks vibrant brightness-aware hues per
   datatype:
     text   → magenta/pink (LabVIEW string)
     json   → amber/orange (cluster feel)
     bytes  → cyan/teal (raw binary)
     file   → green (file reference)
     number → yellow/amber
   Step-input dots, step-output dots, and outputs-endpoint
   dots all switch from the generic theme.primary to the
   field's declared type accent. Operators read the
   payload from the dot alone.

Editor tests still pass (20).

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-06-02 11:13:01 +02:00
parent 7b256b5e35
commit 1e9968496e
6 changed files with 133 additions and 39 deletions

View file

@ -617,11 +617,19 @@ outputs:
// overrides. Falls back to a balanced light/dark palette
// when the scheme tints don't read well as code colours.
final keyAccent = cs.primary;
final stringAccent = isDark ? const Color(0xFFA5D6A7) : const Color(0xFF2E7D32);
final numberAccent = isDark ? const Color(0xFFFFCC80) : const Color(0xFFE65100);
final symbolAccent = isDark ? const Color(0xFFB39DDB) : const Color(0xFF6A1B9A);
final stringAccent = isDark
? const Color(0xFFA5D6A7)
: const Color(0xFF2E7D32);
final numberAccent = isDark
? const Color(0xFFFFCC80)
: const Color(0xFFE65100);
final symbolAccent = isDark
? const Color(0xFFB39DDB)
: const Color(0xFF6A1B9A);
final commentAccent = cs.onSurfaceVariant.withValues(alpha: 0.7);
final metaAccent = isDark ? const Color(0xFF80DEEA) : const Color(0xFF00838F);
final metaAccent = isDark
? const Color(0xFF80DEEA)
: const Color(0xFF00838F);
return {
'root': monoBase.copyWith(color: cs.onSurface),
// YAML keys bold + primary accent so the structure