Page MenuHomePhabricator

Mobile edit using VE removed <pre> tags?
Open, Needs TriagePublic

Description

As a followup to T374310: Wikimedia Foundation nomail list is not honored correctly by makeMailingList.php and the identified edit of https://meta.wikimedia.org/w/index.php?title=Wikimedia_Foundation_nomail_list&diff=prev&oldid=26153633 which shows

Tags: Visual edit Mobile edit Mobile web edit

I'd like to confirm if this (VE on mobile, mostly) does actually "automatically" mangle the page... Or if it did, and there's another bug that was fixed since late January 2024...

Event Timeline

Most likely the user pressed the "Allow text styling" button, which deliberately removes the <pre> tags in the wikitext, and instead indents the text with one space.

This feature was added a while ago because in most situations, a <pre> tag is inferior to just space-indenting as it doesn't allow for other text formatting, so this button provides an easy way to "fix" that. Obviously there are times when a <pre> tag is preferred, and if this sort of corruption is happening regularly we might want to revisit the UI.

I would note that the space-indented list is easier to edit in VE, while the <pre> wrapped is slightly easier in wikitext mode. 🤷

Reedy renamed this task from Mobile edit using VE removed <pre>tags? to Mobile edit using VE removed <pre> tags?.Sep 9 2024, 4:02 PM

Yeah, I don't think there's anything particularly wrong with the space indented list (at least with how it looks to an end user), but the regex definitely was looking for the <pre> tags (it doesn't have to if we wanted to go for the space indented by default).

I don't know "how often" this corruption is happening. Maybe not (that) regularly. And if it requires the user to actually do something (ie click a button), rather than making the changes by default on edit due to some user preference itself..

But we'd probably want some sort of marker in the list, to identify the spacing of the usernames, rather than presuming the header is actually part of the list, and ending up with some weird and wonderful "usernames" in the underlying list that aren't ever going to exist (not a big deal)...

Or... We move the usernames to a sub page that people can edit (which then means random doc updates), and transclude that back to the parent page for viewing purposes... But T316349: Replace the on-wiki Wikimedia nomail list page with a global preference is probably a better longer term fix either way... Rather than trying to enforce the <pre> via say an AF type rule.

I've put a hardening patch up on the other task anyway, which will mean it will at least abort if there's no users found, which is better than the current where it'll just try repeatedly and as long as it doesn't HTTP error, will carry on happily...

Which is probably enough for now