Page MenuHomePhabricator

Cancel edit mode to return to reading mode
Closed, ResolvedPublic5 Estimated Story Points

Description

Motivation
As a user I want to be able to cancel the editing process and not save any edits I might have done.

Workflow
Given I'm on a page showing the termbox components in edit mode (labels, descriptions and aliases as input fields as defined in T215522),
when clicking the close button (x) I will go back to reading without any of my changes being saved

Mocks

Edit_save_1.jpg (1×878 px, 264 KB)

Edit_save_2.2.jpg (1×878 px, 241 KB)

Edit_save_3.2.jpg (1×878 px, 287 KB)

Edit_save_4.2.jpg (1×878 px, 284 KB)

Edit_save_5.jpg (1×878 px, 270 KB)

Acceptance Criteria

  • When in edit mode, below the save button is a cancel button
    • The padding between the buttons is 8 px
    • The cancel button has the same target area as the save button, 48 px
    • icon color: Base20
  • clicking the close button will return the user to reading mode of the item
    • All entries will be back at the state they had before the canceled edit session
    • The cancel button is only visible in edit mode
    • There will be no revision history saved

Event Timeline

Lea_WMDE triaged this task as Medium priority.Feb 27 2019, 1:29 PM
Lea_WMDE updated the task description. (Show Details)
WMDE-leszek set the point value for this task to 5.Feb 27 2019, 3:51 PM

@Lea_WMDE @Hanna_Petruschat_WMDE
The traditional termbox supports using the escape key inside of the form fields to cancel editing. Is this a feature we want for the new termbox, too?

Does the current termbox always has a focused form field? Therefore will there always be the possibility to cancel by pressing esc?
And for the sake of consistency: If this is a common action to use, I would keep it. I don't see an obvious reason to not have this as "a feature".

Does the current termbox always has a focused form field?

"Always" is a stretch but there is one focused automatically after you clicked "edit" and you can directly use ESC if you clicked it by accident. You can also use it while stepping through the form, i.e. the ESC is observed while you have one of the termbox form fields focused, not if you go somewhere else on the page entirely.
The fact that adding this only has a real impact on desktop (where there is an ESC key) maybe makes it even more obvious that it should be a dedicated feature story (that could be added later in the game), I just wanted to scribble down the observation.

The fact that adding this only has a real impact on desktop (where there is an ESC key) maybe makes it even more obvious that it should be a dedicated feature story (that could be added later in the game), I just wanted to scribble down the observation.

Making it an extra story sounds great to me :)

Making it an extra story sounds great to me :)

Now that everyone is sensitized this was a feature of the old termbox, product management will certainly see this user facing story reaching the backlog in time.

Change 507808 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] termbox: pin latest

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

Change 507808 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] termbox: pin latest

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