Look at diffs from my watchlist on my mobile phone. Big green "Thank" button is too easily accidentally pressed (large and near to phone's "back" button), and does not then ask for confirmation as the desktop version does. I have accidentally thanked editors, through fat finger accidents. It's ironic that I get asked for confirmation after clicking the small "thank" link on desktop, but not when touching a large touchscreen button here.
Reproducible: Didn't try
Please provide a forum on English Wikipedia where questions about mobile access can be discussed.
T49658: Thanks workflow needs further thought
T71804: Thanks: add instrumentation to Thanks
- When clicking thanks button an API request is queued and a notification is shown
- When undo in the notification is clicked, the API request is cancelled
- When the notification disappears the API request is sent
- When the API request is fulfilled, the thank button label changes to "Thanked"
This is pretty straightforward https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Thanks/+/442749 does most of the legwork so take a look at it. Needs i18n and some CSS to handle the disabled state.
This will require a 2nd patch in Minerva (to style undo icon).
Talking to @Mooeypoo, apparently the issue with undoing Thanks is how to handle things in the log. Do we log that a user undid a thank or do we not log that at all.
As a result of this, we plan to introduce a client side delay on the api call allowing user to click again to undo:
We will leave 2* seconds between clicking and sending the thanks - allowing user time to click it again to cancel.
(note:delay intentionally long so its obvious there is a delay,but in practice I suspect 2seconds should be enough)
@alexhollender provided these mocks:
Note: The code is located in Thanks extension
- It will now be possible to have a single action inside a toast. Given mw.notify does not support this, this should be implemented within the Toast component -
Under the hood might work like so:
mw.notify($('<span>Hello <a class="link-created-by-toast-with-correct-classes">action</a></span>'))
- When clicking thank, the button should change state and a a "Thanking TestTest... UNDO toast will show.
if the user hits undo the API request will be cancelled.
- If the user does nothing, the API request is sent.
- On completion of the API request, a toast will show saying "You have thanked TestTest."
If the user clicks undo, the thank button should return to its unclicked state.
- subject to tweaking
- Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:MobileDiff/389079
- Accidentally thank Rummana
- Click the cancel button to prevent the thanks
- Thank Rummana again but this time intentionally
- Ensure Rummana receives her thanks.
(heads up @Ryasmeen you may get some Thanks love as part of testing - let me know if that's a problem :-))