Page MenuHomePhabricator

Allow adding of a not yet existing language
Closed, DuplicatePublic13 Estimated Story Points

Description

Mocks
add
Figma file

Acceptance Criteria

  • There is an add button below the edit button on top of the page
    • 48 px touch target
    • 8 px distance to other buttons
  • If a user clicks on "add", they are scrolled down to the bottom of the termbox
    • This does not change the collapsed/expand state of "more languages" and "all entered languages"
    • There is a dropdown at the end of termbox serving the purpose of entering the language that should be added
      • design specification TODO
      • This dropdown is immediately focused
      • The dropdown shows all languages that could possibly be part of a finger print in the format <language code> - <language in user interface language>
      • Language options that are already shown in other fingerprints are disabled
        • potentially design specification
    • When the user selects a language, they can input the label, description, alias information
      • The dropdown shows the selected language as active option
      • Below the collapsed dropdown field are input fields for label, description and alias
        • design specification: Fingerprint specification of editing
    • Once the user is in adding mode, the edit icon and the add icon disappear. Instead there is a save option (we assume this is floating)
      • Once the user clicks on "save" they return back to reading mode
        • If no language has yet been selected from the dropdown, nothing is saved
        • If a language was selected,but neither of label, description and alias contains anything but whitespace, nothing is saved
          • If a language was selected and any of label, description and alias have some content, the new language is saved
          • The saved fingerprint can be found in the reading mode the user returned to according to the sorting already in place

Event Timeline

WMDE-leszek set the point value for this task to 13.Mar 20 2019, 3:32 PM

I have a script which does something like this - https://www.wikidata.org/wiki/User:Nikki/AddTermboxLanguage.js

It only has an input field, so you have to know which language code you want to add, because I never got round to figuring out how to do a nice dropdown (one that still lets me quickly add things by typing the language code and pressing enter). It doesn't switch between read and edit modes though, it follows the termbox's current mode, because I find it useful to be able to cherry pick individual languages to show without having to expand the whole list.

I've been using it regularly since I made it a year ago and it's been working well for me. The only issue I'm aware of is that it sometimes lets me add a language a second time, even though it checks whether a language is already shown, but I haven't looked into when/why that happens yet.

Screenshot after loading a page:

addtermboxlanguage.png (263×791 px, 33 KB)

and after entering "nl" in the box and pressing enter:
addtermboxlanguage-after.png (329×791 px, 42 KB)