Community Wishlist Survey 2021/Editing/Allowing VisualEditor to edit by section

Allowing VisualEditor to edit by section

  • Problem: The VisualEditor always loads the entire page regardless of which "edit" link is clicked on the page. An editor who is trying to edit one section may encounter edit conflicts from another section being edited.
  • Who would benefit: Editors who are only trying to edit one section.
  • Proposed solution: Make an option to toggle between section editing and full page editing.
  • More comments: The beta feature "New wikitext mode" kind of does this already by only taking the section where "edit source" is clicked.
  • Phabricator tickets: phab:T221908
  • Proposer: Tenryuu (talk) 04:35, 24 November 2020 (UTC)[reply]


  • This is a very hard problem to solve, because while sections exist as a 'unit' in wikitext, wikitext when rendered can affect multiple sections. As such, a rendered section can't really exist without the other rendered sections. Work to improve this situation happens continuously, but they are major problems in the core design (or rather lack of design) of wikitext, for which no quick fix exists. —TheDJ (talkcontribs) 09:36, 24 November 2020 (UTC)[reply]
  • We actually already solved this problem last year for the mobile visual editor (and as TheDJ suggest above, it was not easy). The feature works fine on desktop too but we have it disabled because we felt it might be disruptive to editors who have come to expect the current behaviour. Enabling this would just require a one line config change: phab:T221908. We do not yet have the ability to dynamically switch between section and full page editing, but that is technically possibly too. ESanders (WMF) (talk) 16:04, 24 November 2020 (UTC)[reply]
Thanks for the heads-up. I'll subscribe to the ticket to keep myself apprised of new developments. Tenryuu (talk) 23:21, 24 November 2020 (UTC)[reply]
How about having it enabled for new accounts? It would greatly help with visual editing large pages on older hardware.--Strainu (talk) 10:14, 12 December 2020 (UTC)[reply]
  • There re many circumstances where this wiould be an enormous help. If it is not ready for universal adoption, could it be selectable as a gadget? DGG (talk) 10:19, 29 November 2020 (UTC)[reply]
    • It could just be a user preference but it would be better if it were just enabled for everyone, as every user preference we add incurs some technical debt by increasing the amount of testing we need to do in perpetuity. ESanders (WMF) (talk) 13:23, 2 December 2020 (UTC)[reply]
  • Is this accurate? According to en:WP:VisualEditor, Opening an entire page for editing does not increase edit conflicts, which are (roughly) based on editing the same paragraph. From reading this, I concluded that the visual editor does its own edit conflict checking, and it's based on paragraph, not on entire page. The reason I researched this the other day is I saw in the history that somebody edited at the same time that I did, but I didn't have an edit conflict, so I wondered why. Novem Linguae (talk) 16:08, 21 December 2020 (UTC)[reply]
    From Help:Edit conflict#Prevention:

    The system uses CVS-style edit-conflict merging, based on the diff3 utility. This feature triggers an edit conflict only if users attempt to edit the same few lines. yes, section editing does not reduce edit conflicts. Also VE has no special handling for edit conflicts, it is all done at the wikitext level. ESanders (WMF) (talk) 12:53, 23 December 2020 (UTC)[reply]
Ping Tenryuu. The answer above may be of interest to you. It suggests this proposal is not needed, since the visual editor avoids most edit conflicts. –Novem Linguae (talk) 09:28, 5 January 2021 (UTC)[reply]
That's interesting to note. While this would make my original proposal moot, would it still be beneficial to do section editing so that loading times are shorter? I find that loading takes exorbitantly long with articles chock-full of images and transcluded templates. Tenryuu (talk) 11:00, 5 January 2021 (UTC)[reply]
@Tenryuu that is correct. As you can see in this diagram there is a significant load time reduction when using section editing, especially on long articles. (Cc @Novem Linguae) ESanders (WMF) (talk) 13:16, 5 January 2021 (UTC)[reply]
@ESanders (WMF): One final question, if I may. Does the source code editor in full article mode prevent edit conflicts the same way the visual editor does? That is, using CVS-style edit-conflict merging, based on the diff3 utility. This feature triggers an edit conflict only if users attempt to edit the same few lines.? The en:Help:Edit conflict article has some clarity and contradiction issues, so I plan to copyedit it, I want to make sure to use the correct information. Thank you. –Novem Linguae (talk) 17:31, 5 January 2021 (UTC)[reply]
@Novem Linguae Yes: all visual edits are converted to wikitext before we attempt to save to the database, so as far as edit conflicts are concerned there is no difference between the modes. Regardless of the editor used, your edit conflict will be detected based on the wikitext using the diff3 utility. ESanders (WMF) (talk) 18:31, 5 January 2021 (UTC)[reply]