Wikidata/Development/UI editing story

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

Purpose of this story[edit]

  • prevent the user from editing multiple values at the same time
  • make it more obvious what part of an item is currently in edit mode

How to achieve this[edit]

  • disable all edit-elements (those are edit-buttons, add-buttons, remove-buttons) except those of the (one) value which is currently being edited
  • keep all edit-elements disabled while the save/remove request is going on. wait until success or an failure is returend.
  • highlight the row or block which is currently in edit-mode

Detailed explanation[edit]

Currently there are these sections of an item which can be edited seperately:

  • label
  • description
  • aliases
  • each sitelink

Each of those sections can be in view-mode or in edit-mode. Entering the edit-mode of one section (by clicking edit/add/remove) will trigger all other edit-elements to be disabled.

Example[edit]

  1. user clicks "edit" beside the label
  2. the label switches to edit-mode
  3. all other edit-, add- and remove-links (currently those for description, aliases and sitelinks) get disabled
  4. user changes the label and clicks save
  5. ajax-request is sent to the server and some sort of "loading/saving" symbol is shown telling the user that a request is going on
  6. all edit-elements stay disabled and the loading-symbol stays visible until the request returns
  7. on success we move to view-mode for the label and all edit-elements get enabled again
  8. on failure the label stays in edit-mode while all other edit-elements stay disabled and an error is displayed (currently inside a bubble-tooltipp)

Sum up[edit]

  • edit-elements get disabled
    • while something is in edit-mode
    • during an ajax-request
  • edit-elements are enabled
    • while nothing is in edit-mode
    • when an ajax-request returns success
    • when "cancel" is pressed in edit-mode