From ab9b4c619707c97f57b63515cf66a239a0a0dec7 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Mon, 8 Jun 2026 21:36:41 +0300 Subject: [PATCH] =?UTF-8?q?fix(form-decompile):=20ExtendedTooltip=20own-co?= =?UTF-8?q?ntent=20=E2=80=94=20formatted=20=D0=BC=D1=83=D0=BB=D1=8C=D1=82?= =?UTF-8?q?=D0=B8=D1=8F=D0=B7=D1=8B=D1=87=D0=BD=D1=8B=D0=B9=20Title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Регресс из ExtendedTooltip own-content коммита: при own-layout (Width/Height/…) + форматированный мультиязычный Title объектная форма теряла текст и formatted. Причины: (1) merge брал $textVal['text'] на плоском мультиязычном {ru,en} (без ключа text) → null-текст → пустой ; (2) formatted не захватывался явно, а компилятор не re-детектит markup на мультиязычном dict → formatted="false". Фикс: разводим обёртку {text,formatted} от мультиязычного {ru,en} по наличию ключа 'text'; formatted берём ЯВНО из атрибута <Title formatted>. Форма erp/МобильноеПриложениеЗаказыКлиентов/ФормаГлавногоУзла → round-trip match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --- .claude/skills/form-decompile/scripts/form-decompile.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.claude/skills/form-decompile/scripts/form-decompile.ps1 b/.claude/skills/form-decompile/scripts/form-decompile.ps1 index c29b1e7a..ac849ca0 100644 --- a/.claude/skills/form-decompile/scripts/form-decompile.ps1 +++ b/.claude/skills/form-decompile/scripts/form-decompile.ps1 @@ -1,4 +1,4 @@ -# form-decompile v0.59 — Decompile 1C managed Form.xml to JSON DSL (draft) +# form-decompile v0.60 — Decompile 1C managed Form.xml to JSON DSL (draft) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills # ВНИМАНИЕ: раундтрип не гарантируется. Навык исключён из авто-использования моделью. param( @@ -1617,8 +1617,10 @@ function Decompile-Element { if ((Get-Child $etNode 'Hyperlink') -eq 'true') { $etObj['hyperlink'] = $true } if ($etObj.Count -gt 0) { if ($null -ne $textVal) { - if ($textVal -is [System.Collections.IDictionary]) { $etObj['text'] = $textVal['text']; if ($textVal['formatted']) { $etObj['formatted'] = $true } } + if ($textVal -is [System.Collections.IDictionary] -and $textVal.Contains('text')) { $etObj['text'] = $textVal['text']; if ($textVal['formatted']) { $etObj['formatted'] = $true } } else { $etObj['text'] = $textVal } + # formatted ЯВНО из атрибута Title — компилятор не re-детектит markup на мультиязычном тексте + if (-not $etObj.Contains('formatted') -and $etTitle -and $etTitle.GetAttribute('formatted') -eq 'true') { $etObj['formatted'] = $true } } $obj['extendedTooltip'] = $etObj } elseif ($null -ne $textVal) {