Enhance full-page editor layout and integrate form editor actions
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Failing after 6m4s

- Updated CSS styles for the full-page editor, introducing a sticky header and mobile dock for improved navigation.
- Refactored App component to include FormEditorActionsProvider and FormEditorBottomSlot for better form handling.
- Simplified TrainingUnitFormShell by removing the FormActionBar, streamlining the form structure and enhancing usability.
This commit is contained in:
Lars committed 2026-05-19 11:18:54 +02:00
1 parent 734d943d73
commit 6a9351874f
6 files changed
+253 -137

No files matched your search

@@ -0,0 +1,48 @@
import React, { useMemo } from 'react'
import { Link } from 'react-router-dom'
import FormActionBar from './FormActionBar'
import { useFormEditorActions } from '../context/FormEditorActionsContext'
/**
* Vollseiten-Editor: sticky Kopfzeile (Desktop) + Mobile-Dock via FormEditorActionsProvider.
*/
export default function PageFormEditorChrome({
title,
backTo,
backLabel = 'Zurück',
actionConfig,
children,
testId,
}) {
useFormEditorActions(actionConfig)
const headerBar = useMemo(() => {
if (!actionConfig) return null
return (
<FormActionBar
{...actionConfig}
placement="top"
variant="page"
/>
)
}, [actionConfig])
return (
<div className="page-form-editor" data-testid={testId}>
<header className="page-form-editor__header">
<div className="page-form-editor__intro">
{backTo ? (
<Link to={backTo} className="page-form-editor__back">
← {backLabel}
</Link>
) : null}
<h1 className="page-form-editor__title">{title}</h1>
</div>
{headerBar ? (
<div className="page-form-editor__header-actions">{headerBar}</div>
) : null}
</header>
<div className="page-form-editor__body">{children}</div>
</div>
)
}