Page MenuHomePhabricator

Hard limit edit summary length on mobile view
Open, Needs TriagePublic

Description

When using desktop view, there is a hard limit on edit summary length which only allows up to 500 characters. It's a visible limit, meaning that the user can see they aren't allowed to write any more characters. On mobile view (and only on mobile - MinervaNeue on desktop functions like other skins), however, there is no hard/visible limit. Users can, for instance, insert article's content as the edit summary. When they submit their edit, it is automatically trimmed down to 500 characters (more accurately, to 497 characters followed by "..."). That should apparently fix things, but if the edit hits an AbuseFilter, there will be a problem: AbuseFilter will log the full summary inserted by the user, not the version that is shown in the history.

It may not be easy to change AbuseFilter, because there are probably other functions tied to this (tags, for example: T206490). Moreover, modifying the AF is not the ideal solution, as the user need to know there is a limit, so that they can write a better summary, similar to desktop view.

Example:
This edit was made using mobile view. The summary entered by the user is cut to 497 characters. This is the AF log for this edit. The AF has logged the full summary, while the 500-character limit has been applied to the history/final version of the summary.

Event Timeline

Not sure what's the best project tag for this, maybe AMC? Someone feel free to correct...

Actually, this also happens if you manage to lift the character limit in desktop, for example, by converting the summary input box into a textarea using a browser extension or fiddling with the developer tools of the browser. I've just tried it on a private installation. I think this should be handled at MediaWiki core.

Would it be possible to truncate the edit summary before passing it to hooks? That would be ideal. This solution however, should check that it doesn't affect file uploads, where the file upload summary is also used as the file description page text and the file summary.

Huji added a project: MediaWiki-Comment-store.
Huji added a subscriber: Huji.