mw.Api has nice features now like automatically retrying bad tokens, we should migrate to it.
Version: unspecified
Severity: enhancement
mw.Api has nice features now like automatically retrying bad tokens, we should migrate to it.
Version: unspecified
Severity: enhancement
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Use mw.Api to run requests rather than our own stuff in ve.init.mw.Target | mediawiki/extensions/VisualEditor | master | +104 -148 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | Feature | None | T75593 VisualEditor: mw.Target / ViewPageTarget re-write | ||
Resolved | Krenair | T58659 VisualEditor: Use mw.Api library in mw.Target instead of our own functions |
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.
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
Change 186548 merged by jenkins-bot:
Use mw.Api to run requests rather than our own stuff in ve.init.mw.Target