| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This field uses a new widget based on OO.ui.MenuTagMultiselectWidget to
allow choosing from multiple options in a dropdown. It internally uses
a textarea ensuring that order of selected chips are preserved. No-JS
fallback is a textarea with no dropdown, but validations ensure that
arbitrary values entered are not accepted.
Bug: T382995
Change-Id: I4c8548a820c6035b28efdb47df8d7cbeeb407031
|
|/
|
|
|
|
|
|
| |
The backend of HTMLMultiSelectField does not allow reordering options,
so set `allowReordering: false` so that the frontend doesn't either.
Bug: T383277
Change-Id: Ie0fabe3537c76238dc144c9a958ac965b998ea5b
|
|
|
|
| |
Change-Id: If9217731be62694a0d953f6405da7677131315ad
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Created a new input widget and used it for the dropdown mode of
HtmlMultiSelectField. Dropped the `mw-htmlform-dropdown` class
to avoid being affected by old site/user js/css targeting it.
Also, generalised the creation of no-js fallback implementation,
so subclass of TagMultiselectWidget can provide a friendly
interface suited for their options' data.
Bug: T380995
Change-Id: Ieeb02ad875c6932cf594de6585cdda79771f7e50
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Use PendingTextInputWidget to provide a "loading" state and avoid the
ugly transition from the vanilla input field to OOUI.
Make sure the no-JS version never sees the pending state.
Based on the implementation in TagMultiselectWidget.
Bug: T382186
Change-Id: Iebb497a9c4cfb2c7b76fb4ffb7709e05c77a068a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* In 5617115fe22337ba464bd6b253c1d2af941b2adc, the
NamespaceInputWidget class was modified to support filtering
out all namespaces but a specified few.
* The modifications to the ::__construct method incorrectly set
the default for this include list as an empty list, which meant
that by default all namespaces were excluded.
* This commit fixes that to instead make the default null, which
does not apply any filtering.
What:
* Fix NamespaceInputWidget::__construct to correctly set the
default for the 'include' configuration value.
* Add regression tests with this fix.
Bug: T378810
Change-Id: Ie00483641cf058b4522b60a72393a8f1ba4d15a1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Namespace select inputs already support an 'exclude' parameter, ignoring
any namespaces that match ids in that array. For
Special:GlobalContributions, it would be useful to have the opposite -
an array of namespaces to be included, as it only wants to support
filtering on common namespaces.
- Allow an 'include' parameter to be passed through to the namespace
select input
- Support 'include' in Html inputs and OOUI inputs
TODO: Support 'include in Codex inputs (see T378582)
Bug: T378179
Change-Id: I4170beb588292fbec26926ca3afe559c25de9f55
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* This change introduces two new optional parameters to the 'allusers'
API call named 'excludenamed' and 'excludetemp' that allows filtering
accounts based on whether they're named accounts or temporary
accounts. This is tested by using the temporary matchPattern
configured with $wgAutoCreateTempUser.
* User widgets that call 'allusers' have been updated so that
'excludenamed' and 'excludetemp' can be optionally set so that named
or temporary accounts may not returned with user suggestions.
Bug: T332030
Change-Id: I6563ae610017fd1cd35c36ba65906041f7f68c4b
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I1f306a3925d6768209a06e70082598b2f70cd319
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In PHP 8, but not in PHP 7.4, every class with a __toString() function
implicitly implements the Stringable interface. Therefore, the
behavior of checks like "instanceof Stringable" differs between these
PHP versions when such classes are involved. Make every such class
implement the interface so that the behavior will be consistent.
The PHP 7.4 fallback for the Stringable interface is provided by
symfony/polyfill-php80.
Change-Id: I3f0330c2555c7d3bf99b654ed3c0b0303e257ea1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch refactors various widget classes in the includes/widget
directory to use cleaner namespacing. The patches remove redundant backslash
prefixes in class extending statements and add use statements for OOUI classes
and other MediaWiki-specific classes. This patch improves readability and
maintainability of the code by following the MediaWiki coding conventions and
leverages the benefits of PHP's namespacing system.
List of affected classes:
- CheckMatrixWidget
- DateInputWidget
- DateTimeInputWidget
- NamespaceInputWidget
- SearchInputWidget
- SelectWithInputWidget
- SizeFilterWidget
- SpinnerWidget
- TagMultiselectWidget
- TitleInputWidget
- UserInputWidget
Additionally, the code now correctly documents exceptions thrown by
constructors where missing, enforcing clearer developer expectations.
Change-Id: I0fdaf68a412a1c3b7049a79222f4dbeaa95a6bbc
|
|
|
|
|
|
|
|
|
|
|
| |
This patch refactors the ComplexNamespaceInputWidget class to use
fully qualified class names for OOUI components. It removes the manual
specification of the OOUI namespace within the class and instead relies
on the `use` declarations at the top of the PHP file. Additionally,
it adds the Exception class to the list of used namespaced classes,
preparing for explicit exception handling.
Change-Id: I3fe255f491979b63b5361da69a87c32b4fa65b5f
|
|
|
|
|
|
| |
Bug: T290790
Bug: T254222
Change-Id: I69e8217c408acca6bd7f19e7e274b255336dccd2
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Capitals are meaningful on some wikis, and they call it out with
$wgCapitalLinks. Match the autocapitalization behaviour with this.
This is mimicing the same functionality as applied to the skin
autocomplete, found in SkinComponentSearch.
Bug: T335551
Change-Id: I98c39061cd7a3d601f5380edd9730bf61f8339fd
|
|/
|
|
|
|
|
|
|
|
| |
TitlesMultiselectWidget and NamespacesMultiselectWidget both default
to false, meaning click-to-edit on the tags is disabled. Allow this
to be overridden from the corresponding PHP form fields.
This helps to provide a workaround for the related bug: T334711
Change-Id: I4014c5ba7fea0647da6ec6c420342a41ac90518b
|
|
|
|
|
| |
Bug: T333581
Change-Id: I28dafd8894bb6073e5ef1b4419b6777bd6b2580a
|
|
|
|
|
| |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is required for HTMLDateTimeField to be compatible it:
HTMLDateTimeField filters out mustBeAfter/mustBeBefore, while
DateInputWidget didn’t understand min/max until now. Since moment.js
(used by the JavaScript side of the widget) seems to better like the
mustBeAfter/mustBeBefore semantics (strictly larger/smaller than) than
the min/max one (larger/smaller than or equal to), I decided to
internally keep mustBeAfter/mustBeBefore.
Bug: T219633
Change-Id: I487363e40d1e4f74780ed7146c8a6770bfc61fae
|
|
|
|
| |
Change-Id: I1d9d62d80b17d1a05222c6e82f631cb801c311a8
|
|
|
|
| |
Change-Id: I3dbb2ec9d3989a1278151090ad81c7fabd3afbde
|
|
|
|
|
|
| |
Found using IntelliJ's "Typo" code inspection.
Change-Id: I746220ebe6e1e39f6cb503390ec9053e6518cf16
|
|
|
|
|
|
|
|
| |
Nothing to learn from these.
You can find a longer explanation in the comments in I93751e6.
Change-Id: I195aae70fc282b58be5b18160783f27d38605d15
|
|
|
|
| |
Change-Id: Ia81903fb2a8157625fbe63115097eccc1161b5db
|
|
|
|
|
|
| |
Don't provide any addition information
Change-Id: I4f474537056e34bac74b0d0cd5b4beb800664f90
|
|
|
|
|
|
|
|
|
|
|
| |
Implements HTMLTagMultiselectField, a form field that instantiates
TagMultiselectWidget, the PHP representation of the OOUI's js-based
widget of the same name with the implemented parameters:
* allowArbitrary
* allowedValues
Bug: T278317
Change-Id: I3a6a30506d493be4185f917c577b3837fffd8ae1
|
|
|
|
| |
Change-Id: Id034c34a294585f58dba58c26db466e0e39cb557
|
|
|
|
|
| |
Bug: T254357
Change-Id: Iea2dd47f95bc3b84e8f29dff97d38fb1d989b9c7
|
|
|
|
| |
Change-Id: I7622b08ec89525d24a4a1a755ffeee1aace9d382
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expecting people to magically know that MediaWiki\Widget\SearchInputWidget is
generic and for use on random pages, but MediaWiki\Widget\SearchResultWidget
is super-specialised, based on bespoke technologies, and only for use on
Special:Search, is not great.
None of these are used outside the MediaWiki core codebase and so this change
whilst it would otherwise be technically breaking is fine.
Change-Id: I16d21dd5e1ac3aa9893863df272d1bbb4788066f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Done:
* Replace LanguageConverter::newConverter by LanguageConverterFactory::getLanguageConverter
* Remove LanguageConverter::newConverter from all subclasses
* Add LanguageConverterFactory integration tests which covers all languages by their code.
* Caching of LanguageConverters in factory
* Make all tests running (hope that's would be enough)
* Uncomment the deprecated functions.
* Rename FakeConverter to TrivialLanguageConverter
* Create ILanguageConverter to have shared ancestor
* Make the LanguageConverter class abstract.
* Create table with mapping between lang code and converter instead of using name convention
* ILanguageConverter @internal
* Clean up code
Change-Id: I0e4d77de0f44e18c19956a1ffd69d30e63cf51bf
Bug: T226833, T243332
|
|
|
|
| |
Change-Id: I94a0ae83c65e8ee419bbd1ae1e86ab21ed4d8210
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Passing around strings that are expected to be safe html and are
known to be based on user input is a fairly unsafe operation. Make
it harder to do the wrong thing by requiring HtmlArmor to be returned
from the ResultSet snippets. This does not address the snippets on
individual result objects as the api surface is larger and requires
more bc handling.
Change-Id: I76231d6fc53c4982eb4cd174d2e6a75eb2740497
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Scalar casts are still allowed (for now), because there's a huge amount
of false positives. Ditto for invalid array offsets.
Thoughts about the rest: luckily, many false positives with array offsets
have gone. Moreover, since *Internal issues are suppressed in the base
config, we can remove inline suppressions.
Unfortunately, there are a couple of new issues about array additions
with only false positives, because apparently they don't take
branches into account.
Change-Id: I5a3913c6e762f77bfdae55051a395fae95d1f841
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Repeating the variable name doesn't do anything. Documentation
generators don't need it. It's more stuff to read that doesn't add new
information. And it can become outdated.
Note there are two types of @var docs. When used inline (and not on a
class property) the variable name is needed.
Change-Id: If5a520405efacd8cefd90b878c999b842b91ac61
|
| |
| |
| |
| | |
Change-Id: I746a69f6ed01c3ff000da125457df62b02d13b34
|
|/
|
|
|
|
|
|
|
| |
Pass through config options from HTMLUserTextField that allow the
field to accept an IP address and/or range, and specify the maximum
allowed range size.
Bug: T238277
Change-Id: I0e0f6b6fd6801d5cd561def28917e81a81b3f7d4
|
|
|
|
| |
Change-Id: Ifaa7bef925cc4e1b3f1751bb66abdda7fe6763d8
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T231636
Change-Id: Idde7a766bb0d084d6b67bb0c940d7ad704847ad2
|
|/
|
|
|
|
|
|
|
|
|
| |
These were all checked with codesearch to ensure nothing is overriding
these methods.
For the most part, I've updated the signature to use nullable types; for
two Pager's, I've just made all parameters non-optional, because you're
already forced to pass them with a required parameter at the end.
Bug: T231636
Change-Id: Ie047891f55fcd322039194cfa9a8549e4f1f6f14
|
|
|
|
|
|
|
|
| |
Explicitly declare all dynamic properties. Add docblocks for several
props. Remove the defaults when they're already set in the constructor.
Make TagMultiselectWidget use ?? like other widgets.
Change-Id: I889bf6f9e1bbe381f5bffb8ce1370c9e2e863520
|
|
|
|
|
|
| |
Bug: T231636
Depends-On: I50377746f01749b058c39fd8229f9d566224cc43
Change-Id: I2cd24e73726394e3200a570c45d5e86b6849bfa9
|
|
|
|
|
|
| |
Bug: T231636
Depends-On: I58e67c2b38389df874438deada4239510d21654f
Change-Id: I6e5fba7bd273219b1206559420b5bdb78734aa84
|
|\
| |
| |
| | |
dynamically"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Alters the SelectWithInput to allow a required config to be passed from a
parent widget. Also handles the required state dynamically. If the widget is
an OR widget, then only the select dropdown is required. The text input will
be required when the other option is selected. If the widget is an AND widget
then both the select dropdown and the text input will be required.
Bug: T220533
Change-Id: I8479743126756f2b1bd7bcd53b100a0134f34d07
|