Id: Show warning if changeset comment is too long

Created on 1 Sep 2020  路  5Comments  路  Source: openstreetmap/iD

ATM, I can write a very long changeset comment and save, but the comment will get gut off at a limit. Ideally, the Editor would warn me, once I am over the limit.

It seems to 255 Chars max.

Screenshot: No warning ATM
image

field usability

Most helpful comment

We might show a remaining character count as your input gets long in textarea fields, instead of some obtrusive warning. These are fairly standard nowadays.

All 5 comments

It seems to 255 Chars max.

Yes. As with any tag key/value pair, the same 255 unicode character limit also applies here.

Second this, same just bit me in changeset 90422778.

In the old days of 90s HTML you`d just set a length/size/limit on the input/textarea and the browser would prevent anymore input than that in the UI.

A quick look seems to suggest that the maxlength attribute on form elements is still supported in HTML5.

A quick look seems to suggest that the maxlength attribute on form elements is still supported in HTML5.

Yes, a long time ago iD did use maxlength for this: https://github.com/openstreetmap/iD/pull/2411/commits/8b896b8b84e858416b738a64cf17ca179682dd46

But that approach doesn't really work for strings that contain unicode - https://github.com/openstreetmap/iD/issues/6817 has more on why this is a hard problem.

We might show a remaining character count as your input gets long in textarea fields, instead of some obtrusive warning. These are fairly standard nowadays.

Was this page helpful?
0 / 5 - 0 ratings