Führe Abschnitte mit Raster, gemeinsames Designsystem und globales Website-Gerüst ein.
CI Feature / test (push) Failing after 20s
CI Feature / test (push) Failing after 20s
- Seite → Abschnitte → Plätze → Widgets: sechs Raster mit höchstens vier Einheiten, Hintergrund, Breite, Abstand und Trenner als Aufzählungswerte; je Platz ein Widget aus dem bestehenden Register. Neue Spalte page_revisions.sections (ergänzend); blocks erhält weiterhin alle Widgets in Lesereihenfolge als Rollback-Fassung. - Widgets erhalten Mindest- und Vorzugsbreite; Darstellung über Container-Abfragen. - Editor: Abschnitts-Repeater mit grafischer Rasterauswahl, Plätzen im Rasterverhältnis, breiter Arbeitsfläche, kompakten Vorschauen ohne Bildlaufleiste, Meldungen mit Abschnitt und Platz; Rasterwechsel entfernt nie ein Widget. Seite duplizieren. - Designsystem: Marken- und Bedeutungs-Tokens (vorläufig), gemeinsame Grundkomponenten, Nunito/Source Sans 3 lokal; Mitgliederbereich nutzt dieselben Tokens und die Wortmarke. - Kopfzeile, mobile Navigation, Untermenü (parent_id, ergänzend), Fußbereichsgruppen, vorbereiteter Warenkorbzugang (abgeschaltet). Öffentliche Seiten gleich für alle Besucher. - cms:revert-published als Wiederherstellungsweg vor einem Code-Rollback. Die Editor-Tests der ersten Iteration sind bewusst auf den neuen Formularzustand (sections statt blocks) umgestellt; ihre Prüfungen gelten unverändert für die Widgets. Der Vorschautest erwartet keine anmeldeabhängige Kopfzeile mehr (ADR-32). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
db4bd30319
commit
480d55989b
57 files changed
+4730
-818
No files matched your search
@@ -6,16 +6,23 @@
|
||||
use App\Domain\Cms\Page;
|
||||
use App\Domain\Cms\PageService;
|
||||
use App\Filament\Resources\Pages\PageResource;
|
||||
use App\Filament\Support\WidgetEditor;
|
||||
use App\Filament\Support\ReportsSectionErrors;
|
||||
use App\Filament\Support\SectionEditor;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
use Filament\Support\Enums\Width;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class CreatePage extends CreateRecord
|
||||
{
|
||||
use ReportsSectionErrors;
|
||||
|
||||
protected static string $resource = PageResource::class;
|
||||
|
||||
/** Breite Arbeitsfläche, damit mehrspaltige Raster im Editor erkennbar bleiben. */
|
||||
protected Width|string|null $maxContentWidth = Width::Full;
|
||||
|
||||
protected static bool $canCreateAnother = false;
|
||||
|
||||
/**
|
||||
@@ -24,17 +31,17 @@ class CreatePage extends CreateRecord
|
||||
protected function handleRecordCreation(array $data): Model
|
||||
{
|
||||
$service = app(PageService::class);
|
||||
$blocks = WidgetEditor::fromBuilderState($data['blocks'] ?? []);
|
||||
$content = SectionEditor::fromEditorState($data['sections'] ?? []);
|
||||
|
||||
try {
|
||||
return DB::transaction(function () use ($service, $data, $blocks): Page {
|
||||
return DB::transaction(function () use ($service, $data, $content): Page {
|
||||
$page = Page::query()->create([
|
||||
'path' => $service->availablePath($data['path']),
|
||||
]);
|
||||
|
||||
$service->saveRevision(
|
||||
$page,
|
||||
$blocks,
|
||||
$content,
|
||||
$data['seo_title'] ?? null,
|
||||
$data['seo_description'] ?? null,
|
||||
auth()->user(),
|
||||
@@ -45,10 +52,10 @@ protected function handleRecordCreation(array $data): Model
|
||||
return $page;
|
||||
});
|
||||
} catch (ValidationException $exception) {
|
||||
WidgetEditor::notifyErrors($exception->errors(), $blocks);
|
||||
SectionEditor::notifyErrors($exception->errors(), $this->data['sections'] ?? []);
|
||||
|
||||
throw ValidationException::withMessages(
|
||||
WidgetEditor::mapErrors($exception->errors(), array_keys($this->data['blocks'] ?? [])),
|
||||
SectionEditor::mapErrors($exception->errors(), $this->data['sections'] ?? []),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user