* Mismatching capitalization.
* Unused pieces of code.
* Properties that can be constants.
* Use $this->getConfig() in special pages.
Change-Id: Ia7e2c438c5ddd3c770070701e4cbdfc79fccf009
Depends on whether this is a new or existing template transclusion.
Split from Ib9b76cac7cd57245e8db2ef10879069a86a6269e
Bug: T276568
Change-Id: I4d22e32fef067b640e9a9389deffaace736c3405
When the existing search results don't contain an exact match
(see previous patch), perform an additional search for the
title. This uses OpenSearch. This is recommended in multiple
places and also used in the quick search field at the top of
MediaWiki.
Again, I came to the conclusion that an isolated unit test
would be complicated and not test much anyway. Better test
on-wiki.
Bug: T274903
Change-Id: Ib575248e089ff66814400202d224deff6369c772
This code detects a few edge-cases:
1. When some search results are exact matches, make sure they
are always at the very top.
2. When the prefixsearch API is used, e.g. as a fallback,
redirects show up as a separate metadata structure outside of
the pages array. Consider these and stop if there is already
an exact match.
3. CirrusSearch returns redirects as part of the pages array.
When there is an exact match, make these redirects separate
options and add them to the top.
All of this is case-insensitive, on purpose. In case two
templates with different capitalization exist, we rely on
the backend to return both. The code introduced here is fine
with this.
Notes:
* This doesn't guarantee an exact match is always there. This
requires an additional HTTP request and is done in the next
patch.
* I tried to write unit tests for this, but gave up. The setup
is complicated. An isolated unit test would not test much
anyway. Better test this on-wiki.
Bug: T274903
Change-Id: I64e1b5633e7b878a4d0d23d66229ca87e69d0045
These are the most minimal (and therefor most stable,
hopefully) hacks I could come up with so far.
Bug: T274903
Change-Id: I28ba414dd34aad756e29400eb656f0942291a923
New changes:
aea74f1ae ui.actions: Move var statements inline
beb396899 IndentationAction: Refactor case runner
80379d8b2 IndentationAction: Add coverage for slug edge case
8d24c0a82 build: Updating browserslist to 4.16.6
55460cee6 utils: Move var statements inline
8592347e3 ve.ui files: Move var statements inline
ab2cf84d2 IndentationAction: Handle 'increase' when in a slug as well as 'decrease'
0470dddf6 IndentationAction: De-duplicate increase/decrease methods
c16ca4363 IndentationAction: Complete coverage
Change-Id: I95fd8022a07b3c7bec316498e0dc255144e584f1
New changes:
e117cd238 Call contextItemFactory.lookup, not contextItemFactory.registry.lookup
2b81a0b7b Deactivate selection on mobile while in read-only mode
e9a8ff887 Actually handle inTargetWidget config
Bug: T281771
Bug: T282194
Bug: T283445
Change-Id: Ied3e94bc3ebd2b390d9832215a94893fce64a5d3
New changes:
adb902514 Localisation updates from https://translatewiki.net.
d1af2fd53 Dist: Update language lists
Change-Id: I7c32537d3387c4d542842d9f10832db774573b6c
* Create getSurfaceClasses method.
* Pass surfaceClasses to target widgets.
This ensures that the 'content' class is passed to mobile
target widgets, and the 'mw-body-content' class is added
in a less hacky way.
Change-Id: Ibce6d1a1d0fda63cca354761f1b91f808858e95b
This reverts parts of commit
b72459409c.
Reason for revert: A user emptied several translations,
causing CI errors. The bogus edits are already reverted on
translatewiki.net.
Change-Id: I6600cb901953f99d363e14d2f41978ce9a447658