This introduces an extension attribute EditIconSkins which allows extensions
or skins to request the rendering of edit icons.
This will be used by Minerva in I3c9d59f49f1b939981a7b2b450448db6736d5958
Bug: T346944
Change-Id: I401805224c0f387ac85b52b50c1f298b83c03a91
There's no product need for anything other than an upper limit
on edit count. If one arises in the future we can adjust accordingly,
but better to keep the JSON, and any UI implementation, simple
for now.
Change-Id: I892847ad78b19695f0f0f664002d3c566f7806de
This solves a conflict with RevisionSlider, in which navigating
between diffs caused inconsistent rendering depending on whether the
user first entered the page through a diff with or without a
text-slot change. After this change, the ResourceLoader modules are
always available.
Module initialization seems to be safe to run on non-text diff pages.
Bug: T344596
Change-Id: I936d45a132dee3a044a52e22c4751c0538a5bcdc
This creates a message called `editcheck-config.json` which will be
loaded and sent to the `modules/editcheck/config.json` packageFile.
Bug: T330112
Change-Id: Idc58ddf1045fcc0491701a739f3778c8cf4dd955
Abortable promises are definitely among my least favorite things.
It takes all of this bookkeeping to make .abort() work consistently
(so that it always aborts a request if one is in flight, and always
causes the final promise to be rejected even if we didn't start a
request yet or it has already finished). But, if you squint and ignore
every line with the word "abort", it's like a normal promise chain.
Depends-On: Iec8a15dadd595bed0f7e54f907fbb8e192b45cf3
Bug: T331397
Change-Id: I67309c79e6d211d69630fe89cbf5402f8fbd350c
* Remove full stop. No other preference label has a full stop.
* Mention "2017 wikitext editor" as the alternative name, similar to
WikiEditor (I6d17359166f58811ba99893ce4a4500a87deb827).
Change-Id: I48f64f1507b263da61c8a5711afc8ac4981763ee
Don't use RawMessage, the API error formatter doesn't know what to do
with it. Instead call dieWithException(). These exceptions probably
shouldn't bubble up here, but we can worry about that later.
Bug: T344173
Change-Id: I3d1645a3580feeed6fe1431a7bfcdc584f681061
After catching the REST exception, just throw an API exception.
Remove the step inbetween where we built a response array.
Bonus:
* Remove tests that only tested this array building.
* Remove the unused 'code' from successful responses, and update
documentation of return value shapes.
* Remove impossible check for `$ex instanceof LocalizedException`.
After moving the code into one place, it's obvious that it can't
happen, since LocalizedException doesn't inherit from HttpException.
Bug: T341613
Change-Id: I31370efeed9d5283b53eafca102b2f1efc811d27
- The code in the hook handler is more related to the hook and the
structure of the $links array as to the special page.
- Loading another class to process the hook is not necessary.
- Allows better migration to new hook handlers (special page classes and
hook handler should be separated).
- Replace SpecialCollabPad::getSubPage with
SpecialPageFactory::resolveAlias.
- The local url to Special:CollabPad is now in the content language
(only relevant for non-english wikis).
Change-Id: I82985a8ba129b4e336cee337af31452e804090b3
After we removed other clients, the $response array can only be
generated by DirectParsoidClient::fakeRESTbaseHTMLResponse(),
which never includes a fake 'x-cache' header in the response.
Bug: T341613
Change-Id: I90bcb1e26e4164f8f4a34da3abcb01ac0769e21a
Why:
ApiVisualEditorEdit passes most of its params down to
action=edit. However, $params contains parsed version
of the params. Using it with tags results in the param
validator logic on ApiEdit's end receiving a PHP array,
which it does not expect (neither it should; it is impossible
to pass one via an actual API call).
This feature will be used in DiscussionTools,
which itself reuses ApiVisualEditorEdit.
What:
Use WebRequest::getText() to get the unparsed
value for 'tags', which makes the parameter
forwarding actually work.
Bug: T343339
Change-Id: I0ac60ca8473fe28461b2da60f9911baac4994388
I've verified that no other extension uses this code apart from VE
and locally tested that with this patch, VE still works and nothing
explodes.
There parent patch takes care of making sure the mode is no longer
injected and we now have just etags with no hacked in modes because
we now use direct mode always.
Bug: T341612
Change-Id: Ib1756bf60104467a3a34be9bbb06d8f63537e550