zhengwr
dffd1f32ef
fix(modeler): 属性面板显式 attachTo 修挂载时序(live 实证)+canvas 分支错误提示
live 复验:画布/palette/选中/context pad 正常,但标准属性面板从不挂载
(document 中 .bio-properties-panel 为 0,容器 children=0)。
根因(本次修时 attachTo 测试逼出):属性面板宿主 <div data-testid=process-modeler-props>
**从未挂 ref={panelRef}** → 构造参数 propertiesPanel.parent 恒为 null,面板无处渲染。
- 补 ref={panelRef} 到 props 容器 div(真根因)。
- 构造后显式 (modeler.get('propertiesPanel')).attachTo(panelRef.current)——
bpmn-js-properties-panel 规范补救,放 importXML 前、alive 检查内、panelRef 存在时。
- 顺带修 T1.5 评审 M-2:canvasRef 为 null 分支改为 setError(原停 loading 无提示)。
测试:ProcessModelerPage.test.tsx +1(Modeler stub get('propertiesPanel')→{attachTo},
断言 attachTo 恰调一次且实参是 props 容器 DOM)。stub get 改按 service 分派
(propertiesPanel/canvas)。全量 vitest 22 文件 118 例绿;tsc -b 干净;npm run build 成功。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 11:05:23 +08:00
..
2026-06-24 11:20:16 +08:00
2026-06-24 11:20:16 +08:00
2026-07-02 10:37:36 +08:00
2026-07-02 10:37:36 +08:00
2026-06-12 07:25:39 +08:00
2026-06-20 09:38:14 +08:00
2026-06-20 09:38:14 +08:00
2026-06-24 11:20:16 +08:00
2026-06-24 11:20:16 +08:00
2026-06-24 11:20:16 +08:00
2026-06-24 11:20:16 +08:00
2026-06-15 17:37:06 +08:00
2026-07-02 11:05:23 +08:00
2026-07-02 11:05:23 +08:00
2026-06-20 09:39:39 +08:00
2026-06-20 09:39:39 +08:00
2026-06-16 22:08:58 +08:00
2026-06-12 02:27:05 +08:00