Page MenuHomePhabricator

Whitespace not stripped around sense glosses
Closed, ResolvedPublic

Description

Problem:
Lemmas, Glosses and Representations on a Lexeme do not handle whitespace at the beginning and end of the input correctly. They should be handled in the same way as on Items. Additional whitespace at the beginning or end of input should be stripped before saving. Existing input that is changed to have a whitespace at the beginning or end should leave to the save/publish link staying grayed out.

Currently the input for Lemmas throws an error and the input for Glosses and Representations is accepted as-is.

Acceptance criteria:

  • Input via the API and UI that contains whitespace at the beginning or end of a Lemma, Gloss or Representation is stripped of that whitespace before saving.

Related Objects

Event Timeline

Change 488502 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/WikibaseLexeme@master] lexeme.api: trim leading/trailing whitespaces around glosses and senses

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

@Jakob_WMDE I reverted our decision from today on going for a separate trimmed input component (things seemed off with current SSR and child components) .. more details on gerrit

Change 488502 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] lexeme.api: trim leading/trailing whitespaces around glosses and senses view: trim representation text and lemma value

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

I can't test this atm because https://wikidata.beta.wmflabs.org is locked for edits because of the current beta issues. Maybe I can check it on one of your machines.

@Lydia_Pintscher sure come over whenever you see me on my desk