From 04abda572493a0f9fbb725b04e30f898fb0e840c Mon Sep 17 00:00:00 2001 From: Claude Fable 5 Date: Mon, 13 Jul 2026 00:14:03 +0200 Subject: [PATCH] Keep the landing editor off the .legal-editor class The landing form reused LegalTextField, whose .legal-editor wrapper the legal e2e selects by index (nth(1) = privacy policy). Placed before the legal form it shifted those indices, so the test drove the imprint field and the published privacy text never appeared. Generalize the component to MarkdownTextField with a wrapperClass prop: legal keeps .legal-editor, the landing editor uses .markdown-field. Verified locally: legal, admin-users, admin-quotas packs green. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01EwZ4jR4KFAPvpjWevfUGX1 --- apps/web/src/pages/AdminSettingsPage.tsx | 26 +++++++++++++++++------- apps/web/src/styles/base.css | 9 +++++--- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/apps/web/src/pages/AdminSettingsPage.tsx b/apps/web/src/pages/AdminSettingsPage.tsx index 36ad39e..53cf5c9 100644 --- a/apps/web/src/pages/AdminSettingsPage.tsx +++ b/apps/web/src/pages/AdminSettingsPage.tsx @@ -274,7 +274,12 @@ function LandingSettingsForm({ settings }: { settings: InstanceSettings }): Reac
void onSubmit(event)} noValidate> - + @@ -325,8 +330,8 @@ function LegalSettingsForm({ settings }: { settings: InstanceSettings }): React. void onSubmit(event)} noValidate> - - + + @@ -335,20 +340,27 @@ function LegalSettingsForm({ settings }: { settings: InstanceSettings }): React. ); } -/** One Markdown textarea with a toggleable rendered preview. */ -function LegalTextField({ +/** + * One Markdown textarea with a toggleable rendered preview. `wrapperClass` + * distinguishes instances on the page: the legal editors keep `legal-editor` + * (the legal e2e selects them by that class and index), the landing editor + * gets its own so it does not shift those indices. + */ +function MarkdownTextField({ label, value, onChange, + wrapperClass = 'legal-editor', }: { label: string; value: string; onChange: (value: string) => void; + wrapperClass?: string; }): React.JSX.Element { const { t } = useTranslation('legal'); const [preview, setPreview] = useState(false); return ( -
+