Page MenuHomePhabricator

Limit number of bytes in Flow on client-side using jquery.lengthLimit
Open, LowPublic

Description

Wherever there is a byte limit in the database (e.g. topic title, any others?), we should prevent the user from typing too long a post, rather than letting them type too long, then failing it on submit.

Side note, for bonus points we can also tell the user how far they're over (still dynamically, so they can see before clicking submit). StackOverflow (and many text messaging apps) does this. It both shows you how many characters you have spare, and if you go over, how far over you are (They also have a minimum length, so they show how close you are to that, but we don't have that).

There are also color warnings (the remaining character count more red/orange when you get closer to going over).

This should use jquery.bytelength (and if we take the simple approach, jquery.byteLimit jquery.lengthLimit). Unlike maxlength, this is number of bytes, not number of characters.

Event Timeline

Mattflaschen-WMF raised the priority of this task from to Needs Triage.
Mattflaschen-WMF updated the task description. (Show Details)
Krinkle renamed this task from Limit number of bytes on client-side with jQuery.bytelimit to Limit number of bytes in Flow on client-side using mediawiki.String#bytelimit.May 27 2019, 5:30 PM
Krinkle renamed this task from Limit number of bytes in Flow on client-side using mediawiki.String#bytelimit to Limit number of bytes in Flow on client-side using jquery.lengthLimit.May 27 2019, 5:30 PM
Krinkle updated the task description. (Show Details)
JTannerWMF subscribed.

The Growth team will wait until we have further instruction from the Talk Pages Consultation