Page MenuHomePhabricator

VisualEditor: Use mw.Api library in mw.Target instead of our own functions
Closed, ResolvedPublic1 Estimated Story Points

Description

mw.Api has nice features now like automatically retrying bad tokens, we should migrate to it.


Version: unspecified
Severity: enhancement

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:11 AM
bzimport added a project: Technical-Debt.
bzimport set Reference to bz56659.

One of the intentional functionality points in current VE is warning users when the token is bad because they user has changed (i.e. you've been logged out, or logged in as someone else), and explicitly asking for the user to consent to continue.

This avoids the repeated cause of pain for users of the current wikitext editor where if you get logged out for some reason, it just saves as your IP, outing you (and needing revision deletion, drama and anguish). We should be fixing the wikitext editor to mirror the protocol in VisualEditor.

It's unclear from how this is written whether "automatically retrying" means getting a new one, but only for a given user, or getting a new one regardless. If the latter, I think this is a WONTFIX. Advice?

Yeah, you're right, the automatic retry without regard for the user changing is not what we want.

gerritbot subscribed.

Change 186548 had a related patch set uploaded (by Alex Monk):
Use mw.Api to run requests rather than our own stuff in ve.init.mw.Target

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

Patch-For-Review

Change 186548 merged by jenkins-bot:
Use mw.Api to run requests rather than our own stuff in ve.init.mw.Target

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