Page MenuHomePhabricator

Allow copying revert reason after revert failed
Open, LowPublicFeature

Description

"I hate when I write out an AGF revert reason through ultraviolet and then I go to revert, and then theres a newer edit and I lose the reason" (Yoshi24517, Wikimedia Discord)

Feature summary (what you would like to be able to do and where):
Add a button in the "new revision was detected toast" to copy the revert reason. Also redisplay this toast after navigating to the new revision.

Event Timeline

Sportzpikachu moved this task from Needs Triaging to Backlog on the Ultraviolet board.

Hmm, perhaps allowing copying isn't the solution here, as it involves another button press. Two things I see that we could do here:

  • Upon finding a new diff, store the saved edit summary, then redirect to the new diff. Upon pressing the rollback button again, pre-fill the text input box with the typed-out reason.
    • This only ever requires local storage (or perhaps IndexedDB), so not so expensive.
  • We could also just steamroll revert the target user's edits, but this could cause some collateral damage.
    • This should only ever be considered if "rollback" was selected instead of "rollback-like" in the options.
    • This applies the revert immediately, unlike the first option which requires another page load.