Page MenuHomePhabricator

Enforce a character limit to entry fields of the label and description fields
Closed, ResolvedPublic5 Estimated Story Points

Description

Motivation
We want to build an interface that supports editors as much as possible in making high quality edits. One part of this is to enforce character limits in the UI.

Workflow
Given I am in edit mode of the termbox
When I enter the amount of characters which is equal to the character limit of the field
Then more characters are not added to the input field

Acceptance Criteria

  • For fields with character limits, enforce character input restrictions (i.e. no more input is added the the field when the limit achieved), following the configured settings.

Notes
We expect the following restrictuions to be currently set up for Wikidata

  • label field: restrict character input to 250 characters
  • description field: restrict character input to 250 characters
  • alias field: restrict character input to 250 characters

Event Timeline

WMDE-leszek set the point value for this task to 5.Feb 27 2019, 3:35 PM

Did you already check if these numbers are configurable currently?
Are aliases not currently limited?

Are configurable:
https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/46200e8624c099ec3045fbb51cc8e58d2e1cfc3f/repo/config/Wikibase.default.php#31

I tried for aliases and it obviously does not stop you for the lot of them so my assumption (not verified) is that it validates the individual alias' length.

Tarrow subscribed.

Updated the task description to reflect that by default aliases are currently limited to 250 also

Change 508301 had a related patch set uploaded (by Tarrow; owner: Tarrow):
[mediawiki/extensions/Wikibase@master] Update termbox pin - Limiting textInputField lengths

https://gerrit.wikimedia.org/r/508301

Change 508301 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Update termbox pin - Limiting textInputField lengths

https://gerrit.wikimedia.org/r/508301

I'm happy that poking this seems to work fine