Page MenuHomePhabricator

StopEditing Hook should dispatch STOP_EDIT action
Closed, ResolvedPublic

Event Timeline

hoo renamed this task from Change cancel hook to set taintState to false if taintState is true and editState is false to Cancel hook handler should set taintState to false if taintState is true and editState is false.Jan 8 2020, 11:53 PM
Rosalie_WMDE renamed this task from Cancel hook handler should set taintState to false if taintState is true and editState is false to Cancel hook handler should set taintState to false.Jan 16 2020, 12:36 PM

Change 565270 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/Wikibase@master] Add a cancel hook handler and set store states

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

I was looking through this task. As far as I can tell to achieve what we need for the story we do not want to have the stopEditingHook set the TaintedState to false.

Indeed, the story is about keeping a statement tainted after cancelling.

I think we should actually only change the editingState on the stopEditing hook.

I therefore suggest we change the task title from "Cancel hook handler should set taintState to false" to "StopEditing Hook should dispatch STOP_EDIT action"

@hoo and @Rosalie_WMDE can you double check if I've made some mistake?

@Tarrow You are right, canceling an edit should not set the taintState to false, it should rather set it to the value before edit.
My bad, I created this task

Rosalie_WMDE renamed this task from Cancel hook handler should set taintState to false to StopEditing Hook should dispatch STOP_EDIT action.Jan 20 2020, 10:17 AM

The patch up now doesn't change the visible behaviour, as it still explicitly untaints the statement once the edit is cancelled. Changing that behavior (so that the statement will be shown as tainted still) is just a matter of deleting a line now, though.

Change 565270 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add a cancel hook handler and set store states

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

Change 566058 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/Wikibase@master] CancelHook handler should not set tainted state to untaint

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

Tarrow moved this task from Peer Review to Doing on the Wikidata-Tainted-References-Sprint9 board.
Tarrow added a subscriber: hoo.

Change 566058 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] CancelHook handler should not set tainted state to untaint

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

Change 566717 had a related patch set uploaded (by Tarrow; owner: Tarrow):
[mediawiki/extensions/Wikibase@master] TR: Don't dispatch STOP_EDIT action on save

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

Change 566717 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] TR: Don't dispatch STOP_EDIT action on save

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