跳到主要内容

当前 source 例子;仍需要 flow acceptance

示例:交互流程

用 DSL Showcase 的 overlay source 思考多步交互,同时把 source 证据和 target acceptance 分开。

当前 DSL Showcase 有一份带 open/close 行为和 state 的 overlays source 例子。它适合把交互 flow 理解为一串语义意图:

  1. 可见 control 发出明确 event;
  2. event 指向命名 node/state change;
  3. runtime 和 target renderer 生成下一份 tree/presentation;
  4. 后续 control 反转或改变该 state。

这不同于把 overlay 当成 browser-only DOM trick。source 能证明当前 compiler 理解这些声明;target acceptance test 才能证明 focus 行为、device presentation、dismiss 行为及任意 caller/permission 边界。

把 flow 当作观察来测试

实际产品 flow 应把每一步记录为可观察事实:

步骤记录内容
进入target、runtime version、初始 page/session state
触发reviewer 操作的精确 node/event
中间结果可见 tree/presentation 与预期 state change
退出close/back/dismiss 行为和最终 state
边界所需 caller identity、data scope 或 target limitation

除非该精确注册 target、版本和 sequence 已真实运行,否则不能说 Showcase source 文件“通过了 flow test”。event authoring 见 事件、导航与可见性;session update 见 Session、patch 与 scene