Rebuild DEEG as a fifth installation, add stepped forms and a plugin system, and clear the review backlog

Forms gained steps, conditions, image choices, number fields with units and a
summary step; the DEEG price finder uses all of it. Plugins are manifest plus
Twig: blocks, settings, containers, routes, presets and theme packs, switched
per installation. The review backlog is done: archive pages render through the
normal page pipeline, forms and post lists work inside areas and sections,
repeated sections get their own ids, breakpoints and colours come from the
palette, backup and update work on MySQL and lock each other out.

The task worker no longer shortens a process that has no time limit:
set_time_limit() sets the limit instead of extending it, which turned an
unlimited CLI run into eighty seconds and killed the full test suite far away
from the scheduler.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-16 07:32:35 +02:00
1 parent 66ff68abf8
commit c8a8fa7460
74 files changed
+5352 -243

No files matched your search

+32 -1
View File
@@ -1,7 +1,7 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync, readdirSync } from 'node:fs';
import { EditorHistory, createBlock, locate, insertBlock, insertBlockAt, moveBlockTo, dropList, insertionTarget, insertRowAt, CATEGORIES, labels as blockLabels, duplicateBlock, moveBlock, upgradeDocument, effectiveDesign, setDesign, insertPreset, insertRow, blockPath, insertMedia, setEffect, isPluginBlock, blockLabel, blockIcon, canContain, isContainer, setStyle, effectiveStyle, hoverStyle, resetStyleDevice, clearStyle, copyStyle, SCHEMA_VERSION } from '../public/assets/editor-model.js';
import { EditorHistory, createBlock, locate, insertBlock, insertBlockAt, moveBlockTo, dropList, insertionTarget, insertRowAt, CATEGORIES, labels as blockLabels, duplicateBlock, moveBlock, upgradeDocument, effectiveDesign, setDesign, insertPreset, insertRow, blockPath, insertMedia, setEffect, isPluginBlock, blockLabel, blockIcon, canContain, isContainer, setStyle, effectiveStyle, hoverStyle, resetStyleDevice, clearStyle, copyStyle, SCHEMA_VERSION, registerPlugins, pluginDefinition } from '../public/assets/editor-model.js';
import { readFile } from 'node:fs/promises';
import { designCss } from '../scripts/build-design.mjs';
import { relevantProperty } from '../public/assets/editor-model.js';
@@ -600,3 +600,34 @@ test('every module imported by another one is listed in the import map', () => {
const fehlend = [...importiert].filter(name => !eingetragen.has(name)).sort();
assert.deepEqual(fehlend, [], `ohne Fassungskennung in der Importkarte: ${fehlend.join(', ')}`);
});
test('registered plugin blocks get labels, defaults, container rules and presets with fresh ids', () => {
registerPlugins([
{ type: 'vergleich.bildvergleich', label: 'Bildvergleich', icon: '⇔', container: false, children: null, props: { position: { kind: 'number', default: 50 }, before: { kind: 'media', default: '' } } },
{ type: 'vergleich.galerie', label: 'Vergleichsgalerie', icon: '⊞', container: true, children: ['vergleich.bildvergleich'], props: {} },
], [{ id: 'plugin:vergleich:abschnitt', label: 'Abschnitt', plugin: 'Bildvergleich', blocks: [{ id: 'fix', type: 'section', children: [{ id: 'fix2', type: 'vergleich.bildvergleich', props: { position: 30 } }] }] }]);
const bild = createBlock('vergleich.bildvergleich');
assert.deepEqual(bild.props, { position: 50, before: '' });
assert.equal('children' in bild, false);
const galerie = createBlock('vergleich.galerie');
assert.deepEqual(galerie.children, []);
assert.equal(isContainer(galerie), true);
assert.equal(canContain(galerie, bild), true, 'the manifest allows the comparison');
assert.equal(canContain(galerie, { type: 'text' }), false, 'and nothing else');
assert.equal(canContain(bild, { type: 'text' }), false, 'a plain plugin block takes no children');
assert.equal(pluginDefinition(galerie).label, 'Vergleichsgalerie');
const document = { schemaVersion: 4, title: 'P', description: 'D', blocks: [{ id: 's1', type: 'section', children: [] }] };
const first = insertPreset(document, 'plugin:vergleich:abschnitt', 's1');
const second = insertPreset(document, 'plugin:vergleich:abschnitt', 's1');
assert.notEqual(first, second, 'every insertion gets its own ids');
assert.notEqual(first, 'fix');
assert.equal(document.blocks.length, 3);
assert.equal(locate(document.blocks, first).block.children[0].props.position, 30);
assert.notEqual(locate(document.blocks, first).block.children[0].id, locate(document.blocks, second).block.children[0].id);
// Switched off again: the type is unknown once more and the block a placeholder.
registerPlugins([], []);
assert.equal(pluginDefinition(bild), null);
assert.equal(isContainer(galerie), false);
});