Page MenuHomePhabricator

Order of Forms
Closed, ResolvedPublic5 Story Points

Description

Problem:
Currently Forms are ordered alphabetically by Form ID. This is confusing because F19 is sorted before F2 for example. We should order them numerically by their ID as the next step. We'll improve upon that later based on user research.

BDD
GIVEN a Lexeme page with several Forms
WHEN viewing the page
THEN the Forms are ordered numerically by their ID

Acceptance criteria:

  • Forms are ordered numerically by their ID when viewing a page

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 21 2017, 12:42 PM

"Create at end of list and keep it there after creation while loaded. On reload order the new item into the list properly." <- This is already happening and should be kept as it is the same behavior as for statement adding on items.

I believe sorting by form ID is not a good idea because the form ID does not have an inherent meaning to the user. It is just randomly assigned by when the form was added. I expect the case where someone looks up a form by its ID in the UI to be extremely rare.

Jan_Dittrich updated the task description. (Show Details)Sep 25 2017, 7:29 AM

Order by grammatical feature (but how? Is that like "adverbs" are before "adjectives"? Will there be a table for the order somewhere?)

"adverb" and "adjective" are not grammatical feature, they are lexical categories. Grammatical features would be "2nd person" + "plural" + "simple past" + "progressive". There are conventions for that kind of sorting (e.g. singular before plural, 1st person before 2.d person, present before past, etc). But writing down these rules for all languages is going to be complicated. Also, this means that the order of the features would be significant, so we would have to first apply a sorting for the features of each Form ("numerus first, person second, tense third", etc), before sorting the Forms based on comparison of their grammatical features.

I believe this kind of ordering is what people expect. In terms of code, it's a bit complicated, but not horrible. In terms of maintaining the sorting rules on wiki... I have no idea how to make that nice.

Lydia_Pintscher triaged this task as Normal priority.Mar 8 2018, 9:40 AM

Right now the order is kind of weird - e.g. F10 follows F1. See e.g. https://www.wikidata.org/wiki/Lexeme:L666

Wostr added a subscriber: Wostr.Jul 29 2018, 12:14 PM
Restricted Application added a project: Design. · View Herald TranscriptSep 2 2018, 3:35 PM
Lydia_Pintscher lowered the priority of this task from High to Normal.Sep 2 2018, 3:36 PM
Lydia_Pintscher renamed this task from Order of forms to Order of Sorms.Sep 2 2018, 4:42 PM
Lydia_Pintscher renamed this task from Order of Sorms to Order of Forms.
Lydia_Pintscher raised the priority of this task from Normal to High.
  1. First fix would be getting away from alphabetical sorting of numbers
  2. I think that sorting by meaning (here: grammatical features) makes the most sense.

Caveat: We need to provide a solution for the problem that adding a new form happens at the end of the list, but this is not where the form will be sorted to. This can happen via a) scrolling the page to the insertion point b) sorting after reload.

Ok let's do the first necessary fix now and switch to numerical sorting. And then we do more research around how to improve beyond that.

Lydia_Pintscher moved this task from Incoming to Ready to go on the Wikidata-Campsite board.

Change 463980 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/WikibaseLexeme@master] Sort Forms in FormsView

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

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptOct 2 2018, 4:27 PM
KaMan added a subscriber: KaMan.Oct 9 2018, 8:59 AM
Addshore moved this task from incoming to in progress on the Wikidata board.Oct 9 2018, 9:36 AM

Change 463980 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Sort Forms in FormSet based on their numeric IDs

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