Page MenuHomePhabricator

Show and update Vector 2022 table of contents (ToC) during VE edit
Open, MediumPublic

Description

This task involves the work of showing the table of contents to people using the Vector 2022 skin while they are editing using the visual editor (desktop).

Patchdemo

References

Event Timeline

Change #1094461 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Update ToC dynamically in Vector 2022

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

Test wiki on Patch demo by ESanders (WMF) using patch(es) linked to this task was deleted:

http://patchdemo.wmcloud.org/wikis/c61093b7e9/w/

With the currently proposed patch, updating the TOC works if it has been shown on the initial page view, but it does not work if it hasn't been (e.g. when creating a new page). Also, the TOC does not disappear if all headings on the page are removed.

The same issue is present when using the live preview in the old wikitext editor (as noted in T294950). Perhaps both situations can be fixed with one patch to Vector.

Change #1099159 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mwdebug: Enable retries

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

Change #1099159 merged by Alexandros Kosiaris:

[operations/puppet@production] mwdebug: Enable retries

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

With the currently proposed patch, updating the TOC works if it has been shown on the initial page view, but it does not work if it hasn't been (e.g. when creating a new page). Also, the TOC does not disappear if all headings on the page are removed.

The same issue is present when using the live preview in the old wikitext editor (as noted in T294950). Perhaps both situations can be fixed with one patch to Vector.

Yeah, I noticed that - I think we can fix that in a separate issue. It's a smaller minority of edits that would trigger this, and the failure mode is just falling back to the previous behaviour.

Test wiki on Patch demo by ESanders (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org/wikis/b8254bc301/w/

Test wiki created on Patch demo by ESanders (WMF) using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/f44a05d125/wiki/Douglas Adams

Works as expected - the table below compares the patchdemo - the issue is fixed there and the current enwiki wmf.7- the issue is present