Page MenuHomePhabricator

Order of Forms
Closed, ResolvedPublic5 Estimated Story Points


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.

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

"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.

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.

Right now the order is kind of weird - e.g. F10 follows F1. See e.g.

Lydia_Pintscher lowered the priority of this task from High to Medium.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 Medium 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.

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

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