Skip to content

[stable35] refactor(footnotes): render ordinals via decorations, not node attributes - #9631

Merged
mejo- merged 1 commit into
stable35from
backport/9580/stable35
Nov 18, 2026
Merged

mejo- merged 1 commit into
stable35from
backport/9580/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 18, 2026

Copy link
Copy Markdown

Backport of PR #9580

…utes

Footnote numbers were stored as `ordinal` attributes on footnote and
footnoteReference nodes and rewritten in appendTransaction on every
document change. Being derived view state, they still ended up in the
Yjs document and were synced between all clients.

Compute the numbers in plugin state instead and hand them to the view
as node decorations that set a `--footnote-ordinal` CSS variable,
rendered via a CSS counter. Plain CSS counters are not enough on their
own: repeated references to the same footnote must share a number, and
the footnotes section is not necessarily in reference order.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@backportbot backportbot Bot added 3. to review technical debt AI assisted This PR contains AI-assisted commits labels Nov 18, 2026
@backportbot backportbot Bot added this to the Nextcloud 35.0.4 milestone Nov 18, 2026
@mejo-
mejo- enabled auto-merge November 18, 2026 11:20
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mejo-
mejo- disabled auto-merge November 18, 2026 15:15
@mejo-
mejo- merged commit bd91f67 into stable35 Nov 18, 2026
61 of 65 checks passed
@mejo-
mejo- deleted the backport/9580/stable35 branch November 18, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant