Page MenuHomePhabricator

Prevent entering of lemmas with the same spelling variant
Closed, ResolvedPublic3 Story Points

Description

As an editor I want to see lemma validity indicated in the user interface when editing to avoid data loss and confusing behavior.

AC

  • Lexeme header in edit mode shows the "publish" button as disabled whilst the information in the form is considered invalid
    • redundant spelling variants for multiple lemmas are considered invalid
  • Lexeme header in edit mode shows the "publish" button as enabled whilst the information in the form is considered valid and different from the state retrieved at page load
GIVEN I am on the Lexeme (header) part of a Lexeme page
AND   There exists a lemma with the spelling variant "de"
AND   I switch to the edit mode using the edit button
WHEN  I add an additional lemma with the spelling variant "de"
THEN  The save button is disabled
AND   an error is shown saying "It is not possible to enter two lemmas with the same spelling variant"

GIVEN I am on the Lexeme (header) part of a Lexeme page
AND   There exists a lemma with the spelling variant "de"
AND   I switch to the edit mode using the edit button
WHEN  I add an lemma with the spelling variant "en"
THEN  The save button is enabled

GIVEN I am on the Lexeme (header) part of a Lexeme page
AND   There exists a lemma with the spelling variant "de"
AND   I switch to the edit mode using the edit button
WHEN  I add an lemma with the spelling variant "en"
AND   I click the save button
THEN  the lemma is saved
AND   if I reload the page the lemma is shown in the lemma section of the page header

Info

  • depends on T196342
  • was implemented for form representations in T193636 but implementation of Lexeme header works differently
    • produced a mixin (RedundantLanguageIndicator) that can be used to determine the validation problem. First steps here.

Related Objects

Mentioned In
T202427: [Bug] Adding a second Gloss in the same language overwrites existing Gloss
rEWLE51251a8b6f90: LexemeHeaderWidget: way to address child components
rEWLEd991006f1d84: Lemmas: Indicate and prevent redundant langugages
rEWLE3041470557be: Lemmas: Indicate and prevent redundant langugages
rEWLE134f9d044aae: Lemmas: Indicate and prevent redundant langugages
rEWLEdd9cdae5e012: Lemmas: Indicate and prevent redundant langugages
rEWLE6634c86060c9: Lemmas: Indicate and prevent redundant langugages
rEWLEa720a5a86a0d: Lemmas: Indicate and prevent redundant langugages
rEWLEca66f96e5a24: WIP Lemmas: Prevent redundant langugages
rEWLE698a9b3a8193: WIP Lemmas: Prevent redundant langugages
rEWLE0577a19a0e88: LexemeHeaderWidget: way to address child components
rEWLEd09d72526d82: WIP Lemmas: Prevent redundant langugages
rEWLE39162f20ff61: WIP Lemmas: Prevent redundant langugages
rEWLE21ccdf22bd6a: WIP Lemmas: Prevent redundant langugages
rEWLE573b518a4902: WIP Lemmas: Prevent redundant langugages
rEWLEb0120b03baa2: WIP Lemmas: Prevent redundant langugages
rEWLE7e3df8936667: WIP Lemmas: Prevent redundant langugages
rEWLE756fd6df80aa: WIP Lemmas: Prevent redundant langugages
rEWLE7707207f75b2: WIP Lemmas: Prevent redundant langugages
rEWLEe3c6d5f810cb: WIP Lemmas: Prevent redundant langugages
rEWLE20ea6b3871c6: WIP Lemmas: Prevent redundant langugages
rEWLE7fad573a6d59: WIP Lemmas: Prevent redundant langugages
T193636: [Bug] new representation same language code overwrites existing representation
Mentioned Here
T193636: [Bug] new representation same language code overwrites existing representation
T196342: Header save button disabled when nothing to save

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 23 2018, 12:57 PM
Lea_Lacroix_WMDE renamed this task from Entering two lemmas with the same language code silently fails to [Bug] Entering two lemmas with the same language code silently fails.May 23 2018, 12:58 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptMay 23 2018, 12:58 PM
Pablo-WMDE renamed this task from [Bug] Entering two lemmas with the same language code silently fails to Prevent entering of lemmas with the same spelling variant.Jun 4 2018, 4:06 PM
Pablo-WMDE reopened this task as Open.
Pablo-WMDE updated the task description. (Show Details)
Pablo-WMDE set the point value for this task to 3.Jun 6 2018, 1:32 PM

Change 436554 had a related patch set (by Pablo Grass (WMDE)) published:
[mediawiki/extensions/WikibaseLexeme@master] WIP Lemmas: Prevent redundant langugages

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

Change 440883 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] LexemeHeaderWidget: way to address child components

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

Pablo-WMDE removed Pablo-WMDE as the assignee of this task.Jun 19 2018, 1:58 PM
Pablo-WMDE added a subscriber: Pablo-WMDE.

Do we have any discussion of this usecase onwiki? It seems contrary to a problem raised onwiki.

Pablo-WMDE removed Pablo-WMDE as the assignee of this task.Jun 20 2018, 12:23 PM

Change 436554 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Lemmas: Indicate and prevent redundant langugages

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

Change 440883 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] LexemeHeaderWidget: way to address child components

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

Lea_Lacroix_WMDE added a comment.EditedJun 29 2018, 10:58 AM

While testing it, I think I found an interesting bug.

I went to L123 that was containing one lemma, "sandboxes" with language mis.
I changed the language mis to en, then created a new lemma "sandbox" also with en, and clicked on save.
My edit was saved (I was expecting to be blocked at that point) and the interface displayed me the two lemmas with both en. When I loaded the page again, only one lemma was saved, "sandbox"-en, and the diff looks like this.
When I tried again to create a new lemma with en as a language, the expected behaviour happened (error message and impossible to save).

So to summarize, I think that when I change the language of the 1st lemma then create another one that conflicts, this conflict is not detected.
@Pablo-WMDE should I create a ticket dedicated to this?

Vvjjkkii renamed this task from Prevent entering of lemmas with the same spelling variant to bgcaaaaaaa.Jul 1 2018, 1:08 AM
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed subscribers: gerritbot, Aklapper.

@Lea_Lacroix_WMDE Interesting observation that I can not reproduce. Mind presenting this to me on your machine in the afternoon/when you have time?

CommunityTechBot renamed this task from bgcaaaaaaa to Prevent entering of lemmas with the same spelling variant.Jul 2 2018, 1:34 PM
CommunityTechBot set the point value for this task to 3.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

ping @Lea_Lacroix_WMDE about Pablo's comment. Let's get this closed.