#137 Nachfix 2: Task-Item-Absätze per Nachfahren-Selektor treffen (NodeView-Tiefe)
Some checks failed
CI / Auth e2e pack (pull_request) Successful in 6m45s
CI / Import/export fidelity gate (pull_request) Successful in 54s
CD / Build and push images (push) Successful in 17s
CD / Smoke tests against Test (push) Successful in 1m15s
CD / Deploy to Test (push) Successful in 13s
CD / Promote to Int (push) Successful in 12s
CI / Lint, typecheck, test (push) Successful in 4m32s
CI / Lint, typecheck, test (pull_request) Successful in 4m39s
CI / Build container images (pull_request) Successful in 1m13s
CI / Build container images (push) Has been skipped
CI / Auth e2e pack (push) Failing after 5m28s
CI / Import/export fidelity gate (push) Has been skipped

Stefan sah die Checkbox-Verschiebung weiterhin — in der ANGEMELDETEN
Lese-/Bearbeiten-Ansicht. Dort rendert der TipTap-ReactNodeView das <p>
ZWEI Wrapper tief (`li > div[data-node-view-content] > div > p`), die
bisherige Kind-Kette `li > div > p` griff also nur im flachen
docToHtml-Markup der öffentlichen Ansicht. Fix: Nachfahren-Selektoren
(`li p:first-of-type` / `li p:last-of-type`) — robust gegen die
Wrapper-Tiefe beider Renderpfade.

Live am echten NodeView-DOM verifiziert (Injektion auf Test:
p-marginTop 16px→0, Checkbox bündig; öffentlicher Pfad unverändert ok).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0155v2aT8AG1kZDQEZiCLBWC
This commit is contained in:
Claude Fable 5 2026-07-19 17:54:02 +02:00
parent 4ba4ca7ba9
commit 3ed3cbb806

View File

@ -1623,25 +1623,26 @@ ul[data-type='task_list'] li {
} }
/* The checkbox is the top flex child; nudge it onto the first text line and /* The checkbox is the top flex child; nudge it onto the first text line and
drop the leading/trailing margins of the item's paragraph so the text meets drop the leading/trailing margins of the item's paragraphs so the text meets
the checkbox instead of dropping a line. Covers both DOM shapes: read-mode the checkbox instead of dropping a line. DESCENDANT selectors on purpose
`li > input` + `li > p`, and editor `li > label > input` + `li > div > p`. (issue #137, second regression): the DOM depth differs per surface
Uses `:first-of-type`/`:last-of-type` (NOT `:first-child`): in the read-mode public/docToHtml renders `li > input` + `li > p`, but the editor/auth read
markup the `<input>` is the first child, so the paragraph is never view (TipTap ReactNodeView) nests the paragraph TWO wrappers deep:
`:first-child` and a `:first-child` reset would silently miss (issue #137). */ `li > div[data-node-view-content] > div > p`. Child-combinator chains keep
missing one of the shapes; matching any `p` inside the task item is the
robust form. `:first-of-type`/`:last-of-type` (NOT `:first-child`) because
the `<input>`/`<label>` precedes the paragraph in the read-mode markup. */
ul[data-type='task_list'] li > input[type='checkbox'], ul[data-type='task_list'] li > input[type='checkbox'],
ul[data-type='task_list'] li > label { ul[data-type='task_list'] li > label {
flex: none; flex: none;
margin-top: 0.25em; margin-top: 0.25em;
} }
ul[data-type='task_list'] li > p:first-of-type, ul[data-type='task_list'] li p:first-of-type {
ul[data-type='task_list'] li > div > p:first-of-type {
margin-top: 0; margin-top: 0;
} }
ul[data-type='task_list'] li > p:last-of-type, ul[data-type='task_list'] li p:last-of-type {
ul[data-type='task_list'] li > div > p:last-of-type {
margin-bottom: 0; margin-bottom: 0;
} }