Page MenuHomePhabricator

Wikidata gui grammatical features field no longer focus second entry
Closed, ResolvedPublic5 Estimated Story PointsBUG REPORT

Description

Wikidata gui grammatical feature field no longer focus second entry

Steps to Reproduce:
On a (new) lexeme (e.g., https://www.wikidata.org/wiki/Lexeme:L43811) go to forms
Start adding new form
Add one "grammatical features" (e.g., "definite")
Add another "grammatical features" (e.g., "singular").

Actual Results:
In the dropdown menu appearing for the second "grammatical features" the first item is no longer in focus/selected, i.e., it is white instead of greyed.

it now requires an down arrow press to focus the item on the dropdown list.

Expected Results:
The first item in the dropdown list should be selected.

Interestingly, I experience that the first grammatical features value enter does not suffer from the problem.

Event Timeline

Fnielsen renamed this task from Wikidata gui grammatical feature field no longer focus second entry to Wikidata gui grammatical features field no longer focus second entry.Mar 13 2019, 4:12 PM

The issue must related to a change happening on 13 March or a few days before.

This is also happening whenever the auto-completion popup list is closed and reopened.. so effectively, it is working as expected only the first time the list appears, regardless of which item is added.

Side note – you don’t have to enter any grammatical features by hand if you use the Wikidata Lexeme Forms tool :) @Fnielsen perhaps you’d like to add some templates in Danish?

This seems to be a change in OOUI – you can experience the same behavior on the OOUI Demos page, in widgets like “MenuTagMultiselectWidget (allowArbitrary: false)”.

Hm, as far as I can tell from local testing, this regressed between 1.33.0-wmf.20 and wmf.21, so it would have broken on Wikidata around 2019-03-13.

…and I just realized that this is exactly what @Fnielsen wrote (for some reason I misread his comment as April 13 and was confused about the mismatch), so that makes perfect sense. Investigation continues…

git bisect in OOUI points at rGOJU2d4c8af00035: MenuTagMSW: Use 'highlightOnFilter' flag in MenuSelectWidget, so CCing author @Esanders and +2er @Mooeypoo for their information, since this might affect other OOUI users as well and I don’t know if the OOUI team wants to backport the fix somewhere or anything like that.

I’ll try to fix this tomorrow. In the meantime, here’s a short reproducer that can be used with an HTML file like in the OOUI ToDo App Tutorial:

$( function () {
    var widget = new OO.ui.MenuTagMultiselectWidget( {
        allowArbitrary: false,
        options: [
            { 'data': 'abc', 'label': 'Label for abc' },
            { 'data': 'asd', 'label': 'Label for asd' },
            { 'data': 'jkl', 'label': 'Label for jkl' },
        ],
    } );
    // Append to the wrapper                                                                                                                                                 
    $( '.wrapper' ).append( widget.$element );
} );

Change 504546 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[oojs/ui@master] MenuSelectWidget: Fix highlight on redisplay

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

Change 504546 merged by jenkins-bot:
[oojs/ui@master] MenuSelectWidget: Fix highlight on redisplay

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

hoo removed a project: Patch-For-Review.
hoo subscribed.

Problem on the demo site fixed, this just needs an OOUI release now.

Change 506208 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Update OOUI to v0.31.5

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

Change 506208 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.31.5

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

Volker_E edited projects, added OOUI (OOUI-0.31.5); removed OOUI.