fix: a nested row gets its own auto label (ledger T3)

A row inside a column is labelled "<Abschnitt> – Zeile (innen)" instead of
repeating its outer row's "<Abschnitt> – Zeile". Guide updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
2026-09-26 18:36:47 +02:00
co-authored by Claude Opus 5.5
parent 14e24398d1
commit 482575b732
3 changed files with 32 additions and 6 deletions
+7 -4
View File
@@ -263,7 +263,7 @@ final class Composer
return match ($type) {
'divi/section' => $this->section($spec, $path),
'divi/row' => $this->row($spec, $path, $context),
'divi/row' => $this->row($spec, $path, $context, $parent !== null && $parent->name() !== 'divi/section'),
default => $this->module($type, $spec, $path, $context),
};
}
@@ -330,8 +330,11 @@ final class Composer
return $section;
}
/** @param array<array-key, mixed> $spec */
private function row(array $spec, string $path, string $context): Block
/**
* @param array<array-key, mixed> $spec
* @param bool $nested In a column (Divi 5 rows nest): own auto label (ledger T3).
*/
private function row(array $spec, string $path, string $context, bool $nested): Block
{
$this->unknownKeys($spec, array_merge(self::COMMON, self::ROW), $path);
$parsed = ColumnWidths::parse($spec['columns'] ?? '4_4');
@@ -339,7 +342,7 @@ final class Composer
$this->errors[$path . '.columns'] = $parsed['error'];
}
$widths = $parsed['widths'];
$label = $context === '' ? null : $context . ' – Zeile';
$label = $context === '' ? null : $context . ($nested ? ' – Zeile (innen)' : ' – Zeile');
$attrs = $this->common('divi/row', ['builderVersion' => $this->builderVersion], $spec, $path, $label);
$row = Block::create('divi/row', $attrs);