fix(form-compile): default TitleLocation=Right для CheckBoxField

Платформенный default TitleLocation для CheckBoxField — Left, что почти
никогда не соответствует UX-ожиданиям. В acc 8.3.27 для CheckBoxField:
Right (явно): 811, без тега (=Left): 406, None: 140, Left: 14, Top: 3 —
доминирующий паттерн «заголовок справа от флажка».

Эмитим <TitleLocation>Right</TitleLocation> по умолчанию для check.
Переопределяется через titleLocation: 'Left' / 'None' / 'Top' / 'Bottom'.

v1.11. Обновил 5 snapshot'ов.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-05-02 16:59:31 +03:00
co-authored by Claude Opus 4.7
parent a59be4b914
commit e216db5734
7 changed files with 16 additions and 7 deletions
@@ -1,4 +1,4 @@
# form-compile v1.10 — Compile 1C managed form from JSON or object metadata
# form-compile v1.11 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$JsonPath,
@@ -2055,9 +2055,8 @@ function Emit-Check {
Emit-Title -el $el -name $name -indent $inner
Emit-CommonFlags -el $el -indent $inner
if ($el.titleLocation) {
X "$inner<TitleLocation>$($el.titleLocation)</TitleLocation>"
}
$tl = if ($el.titleLocation) { "$($el.titleLocation)" } else { "Right" }
X "$inner<TitleLocation>$tl</TitleLocation>"
# Companions
Emit-Companion -tag "ContextMenu" -name "${name}КонтекстноеМеню" -indent $inner
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# form-compile v1.10 — Compile 1C managed form from JSON or object metadata
# form-compile v1.11 — Compile 1C managed form from JSON or object metadata
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import copy
@@ -1771,8 +1771,8 @@ def emit_check(lines, el, name, eid, indent):
emit_title(lines, el, name, inner)
emit_common_flags(lines, el, inner)
if el.get('titleLocation'):
lines.append(f'{inner}<TitleLocation>{el["titleLocation"]}</TitleLocation>')
tl = el.get('titleLocation') or 'Right'
lines.append(f'{inner}<TitleLocation>{tl}</TitleLocation>')
# Companions
emit_companion(lines, 'ContextMenu', f'{name}\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435\u041c\u0435\u043d\u044e', inner)