"Fold all ref tags by default" when enabled in WikiEditor causes layout issues in 2017 wikitext editor
Open, Needs TriagePublic

Description

  1. Visit a page using WikiEditor: https://en.wikipedia.org/wiki/Introduced_species?action=edit&venoautoload
  2. Enable syntax highlighting, open the full codemirror preferences, enable "Fold all <ref> tags by default (potentially slow)"
  3. Visit a page using the 2017 wikitext editor: https://en.wikipedia.org/wiki/Introduced_species?veaction=editsource
  4. Observe collapsed <ref> tags
  5. Click into the surface, and observe overlap glitches

CleanShot 2026-08-01 at 12.08.20@2x.png (1,930×560 px, 275 KB)

Event Timeline

Surprisingly, doesn't seem to be related to my recent 2017 editor preference changes. Rather, 52f5a4c9, which introduced the foldAllRefs preference, didn't make it respect the underlying codeFolding preference that was already disabled in the VE integration.

Change #1319918 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/CodeMirror@master] VisualEditor: don't allow foldAllRefs

https://gerrit.wikimedia.org/r/1319918

Actually, sort of related to 5ffc6ff024bc539bfa4170eb16d967e332975e32 which introduced the preferences panel to the 2017 integration. Before that there was no way for a foldAllRefs: true to make its way to the 2017 editor, so it not being affected by codeFolding had no way to actually show up.

Change #1319919 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/CodeMirror@master] Preferences: honour the VE allowlist for callback preferences

https://gerrit.wikimedia.org/r/1319919

Change #1319918 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] VisualEditor: don't allow foldAllRefs

https://gerrit.wikimedia.org/r/1319918