Page MenuHomePhabricator

Have the focus on field when adding new element on Sense
Closed, ResolvedPublic

Description

As an LexData editor, I want to quickly add data when creating Senses.

Problems:

  • When clicking on "Add Sense", there is no focus on a field. The language field of the first gloss should be selected.
  • When clicking "add" to add a gloss in another language, there is no focus on a field. . The newly-created language field should be selected.
  • When clicking "edit" to edit existing senses, nothing is focused. The expected behaviour is trickier here because you might want to edit a specific language or add a new language, but either way, focusing nothing makes keyboard navigation very difficult.

Example:

Screenshots/mockups:

BDD
GIVEN
AND
WHEN
AND
THEN
AND

Acceptance criteria:

Event Timeline

Change 589656 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] WIP: Autofocus last language selector in glosses widget

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

Change 591963 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Autofocus inputs in glosses widget

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

Worked a bit more on this, since it’s now in the campsite board and I didn’t like my previous solution, so I guess I should also claim this :)

Change 591963 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Autofocus inputs in glosses widget

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

Change 589656 abandoned by Lucas Werkmeister (WMDE):
WIP: Autofocus last language selector in glosses widget

Reason:
competing approach (I8519961314) was merged instead

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