Changes:
* Use Codex markup instead of mediawiki ui markup
* We limit what can be customized by the skin
* Current rules for touch area and snapping of
inputs is moved from Minerva into core so other skins
benefit from the styling
* A placeholder text is adding to the "real name" field.
* Introduce CodexHTMLForm
Bug: T182050
Change-Id: I834cc0e07fc1e705753df6866a5eeda2ac77fb8e
This was a mistake in I892364b. Unfortunately the codebase was in a
confusing state with many classes in no namespace. But this class was
in one.
Bug: T339184
Change-Id: Id31b9f53ffb6483c1901db8ab26fcb40368ec074
When the old and new content object for a slot cannot be compared,
show an error message for that slot only, instead of throwing an
exception.
Bug: T214217
Change-Id: I6e982df358f85ca78f0448b3a93ded3f40676310
To fix legacy encoding entries in external storage which means they
can't be fixed via calling moveToExternal.php.
The script originally was copy-paste and clean up of moveToExternal.php
but it made so much duplication that I went with subclassing.
Bug: T282734
Change-Id: Ic52e843f3dbe7d14cc8df5e8f3fe7aada7681bc9
Using a helper object instead of a trait allows for dependency
injection through PageRestHelperFactory. This will make it easier to add
language variant redirects in the next step.
Change-Id: I1d4f26c380797e28e1b97051400bb9b1301b89ab
The --force option is supported. NOTE: Without supplying any
arguments/options, the script will run for all pages in the wiki.
TODO: Run for all pages in batch sizes, so things don't explode
if we have so many pages.
Bug: T338922
Change-Id: Id894f4769ad6f20137b13143178f50f227d7481a
- Rename methods to follow the more standard convention used for
commands.
- Update doc comments.
- Add new hooks with final method names and parameter types, to replace
the old messy hooks.
- Deprecate the remaining old hooks.
Bug: T265541
Change-Id: I609709a70fb58ce00b9f179ee4de2f6ac5e0a1cf
RangeDifference was introduced in 89f8141a7 (2008) by Guy Van den
Broeck as part of his experimental "wikidiff3" engine.
Wikidiff3 was mostly removed in dcac5f19 (2009), although the Wikidiff3
class itself remained until 20f066e97 (2016) when it was merged into
DiffEngine. The merge left diff_range() as an unused method with no
visibility modifier being the only caller of RangeDifference. "private"
was eventually added, and then finally the unused private method was
deleted, leaving no callers in core or extensions.
Change-Id: I11fd03b9b36449620518b94e2c4be02da32d1271
Creates a new skin component for informing users with
temporary accounts that they can login or register if they choose.
Adds:
- New skin component: SkinComponentTempUserBanner.php
- Skin feature: "temp-user-banner"
- Associated styles
- New i18n messages for banner
NOTE: This component is not registered via the skinComponentRegistry
because it doesn't output any data, only a string of HTML.
Instead it is appended to the body element before the skin is rendered.
Bug: T330510
Change-Id: I1e137dbd29f3c73efac901f43f8a8258e2a111fc
Right now, Extension:TimedMediaHandler hardcodes checks for
ForeignDBViaLBRepo, which makes it inoperable for wikis making use of
ForeignDBRepo or an extension-provided foreign repo that exposes direct
access to the remote MW database. Introducing a new interface in core
will allow TimedMediaHandler to check for this interface instead of
specific implementations of foreign db repos.
I wasn't quite sure what methods to populate the interface with, since
all current implementations extend from LocalRepo, and most things that
interact with it largely expect (close to) the full API surface that
LocalRepo provides. Rather than duplicating all of those methods in the
interface, I opted for providing two methods that any custom
implementations would be required to override should they extend from
LocalRepo as a base class. I'm open to other approaches here, however.
Bug: T63986
Change-Id: I76b43e77f44e90eef5f3d2ac05ef203ed3085bd2
== Background ==
In 2012, commit afe46f1403 (Id7e9b59c7e) added libs/GenericArrayObject
along with an (unused) abstract GenericArrayObjectTest case.
The same code was also added to the Wikibase extension with
change 6347b35a55cd (Ifa7f1dc702).
The code was then factored out from Wikibase into the wmde/Diff
library.
In 2013, GenericArrayObject was removed from wmde/Diff in the commit
at https://github.com/wmde/Diff/commit/d9c2bd5c140e2a783fd42298db6c.
== This change ==
Remove the GenericArrayObject indirection from SiteList as there exist
nothing outside SiteList refering to it in Codesearch Everywhere, and
even in SiteList much of the code in GenericArrayObject is overridden,
unused, or otherwise needlessly indirect.
Change-Id: Ifea09c5de50af1616058d8baa9037db273dfb0e5
* Is generally useful for Rdbms consumers.
* Has no dependencies besides stable constants and interface from Rdbms.
* Is generic, i.e. not specific to MediaWiki in its naming, purpose,
or required domain knowledge.
Current rationale is that "dao" is not a recognised component
in MediaWiki core. Its super tiny and a handful of changes in over a
decade, so seems overkill to make a big deal out of it by creating a
whole new component for it in all the usual places. Yet, having it
fall into a gap with no owner for issue tracking, code review, no
documentation, and no definition of what this directory is for
exactly, is also counter-productive. Hence, finding a suitable place
for it.
Change-Id: I8cbb9ebfa8873085a30cb355e3299493538006ae
This is necessary so that EmailUser can behave as a command. EmailUser
now takes the performer as a constructor parameter; this, in combination
with the statelessness of the service, allows it to be reused for
multiple sends. Some BC code was also moved to the factory.
Bug: T265541
Change-Id: I2568359f00f429ef3ab3bfbfb803dc8e51cd8add
Add a legend at the top of the inline diff display, showing the
meanings of the colours of the inserted and deleted highlighting.
Also add the same text as tooltips on the highlighted elements.
The legend is added as part of a new area above the diff table
that can be modified via a new TextSlotDiffRendererTablePrefix
hook, so that extensions can add other buttons etc. there as
required.
This is a follow-up to the previous attempt, which added the
legend in DifferenceEngine::showDiff() and was called from
too many places. This patch moves it to be called in
DifferenceEngine::showDiffPage().
Bug: T324759
Change-Id: I2a3c67bcfa47313dee597e602a62073e4e298cd2
Follow-up: I6de30bf79eb5ac262285951792782b870d075e00
This patch doesn't deal with the injection of dependencies
and removal of the global state, but rather moves the code
from DeferredUpdates to the new service essentially as-is,
to simplify review. The changes to inject the various
services needed and make DeferredUpdatesManager a proper
service will be done in follow-ups, to make them easier
to follow.
While almost everything is changed from static to non-static,
DeferredUpdates::$scopeStack remains static as
DeferredUpdatesManager::$scopeStack, just in case multiple
versions of the service are created, to ensure that no
updates are missed.
Bug: T265749
Change-Id: I7f07eddf2fc399b15db4fe9be4c792ef8eb0747b
This is the more native way of doing things, which avoids syncing
different states between the toggle and the hidden widget.
The DOM structure is also better and don't confuse screen readers.
Bug: T333496
Bug: T334705
Bug: T336107
Change-Id: I47de69459b96f172153065094eb4113584bb435a
Introduce two new classes, containing code split off from EditPage:
* IntroMessageBuilder (edit notices and other intro messages)
* PreloadedContentBuilder (initial text of new pages / sections)
I'm doing both of these features in one change, because they share a
lot of code. They are meant to be used by alternative editors to
support all of the features of the MediaWiki edit form. This isn't
everything you need yet (we should at least do this for the edit
checkboxes too), but it's a step.
Bug: T201613
Change-Id: If0b05710cb52a977bf4e85947d72d68683a0a29e
Better DI, cleaner code, etc.
Way more needs to be moved but let's avoid exploding the patch.
Bug: T245964
Change-Id: I63b0f60187250fabf4d17c80a794877f07d2b1a2
To implement source maps, we want FileModule::getScript() to return
an array with path information, but that would break subclasses of
FileModule which concatenate to the return value of parent::getScript().
So allow scripts to be generated by a callback, eliminating the need for
concatenation in subclasses.
* Factor out most of the loop body of expandPackageFiles() into
expandFileInfo(). Add 'name' to the return value. Ensure 'filePath'
is always a FilePath object since we need that to safely return it
to ResourceLoader later. Document the return value.
* Make sure the base path is always set in FilePath objects returned by
expandFileInfo().
* Factor out the loop body of the final stage of file info expansion
into readFileInfo(). Retain filePath, do not unset it.
* Assert that $fileInfo['content'] is definitely set.
* Convert array_map() in getDefinitionSummary() to a loop.
* Migrate LanguageDataModule.
Bug: T47514
Change-Id: I97d61b5793159cea365740e0563f7b733e0f16de
The db/ directory does not have an owner and it's a mess in general.
These classes don't depend on anything in core except the rdbms library.
Let's simply move it there. In other words, Krinkle made me do it.
Since the class was moved in I6202e52ba73 merged less than a week ago,
no need to alias anything.
Bug: T321882
Change-Id: I24ceeb8bf765a50f441270136acd612359d50aa2