Commit graph

69 commits

Author SHA1 Message Date
WMDE-Fisch
6df9ed1ad6 update mediawiki-codesniffer to 0.11.0 and fix issues
- mostly auto fixes
- some too long lines fixed
- ignore amp space in one case  passing by reference

Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
2017-08-11 22:27:51 +02:00
Jan Drewniak
f5afe60dec Changing interwiki results header from <p> to <h2>
Makes the header on interwiki results
(results from different languages on Special:Search)
bigger.

Bug: T146655
Change-Id: I10ea6f85f97b4c8a5e585b2b1090af68054cbe2c
2017-07-27 16:16:21 +00:00
Tjones
af420fe8b5 Merge "Revert "Make mw.widgets.SearchInputWidget extend OO.ui.SearchInputWidget"" 2017-07-19 21:51:18 +00:00
EBernhardson
baf123f07d Revert "Make mw.widgets.SearchInputWidget extend OO.ui.SearchInputWidget"
Typing a search query into the main box on Special:Search
causes the search to be performed for the first autocomplete
result, rather than the typed query. The first autocomplet 
result should only be searched for if explicitly selected with
the mouse or arrow key.

This reverts commit 7882e3b660.

Bug: T171112
Change-Id: I1af6ba90542fafe3ed1aeca420e9d6df6612f7d0
2017-07-19 21:39:36 +00:00
Umherirrender
b5cddfb27b Remove empty lines at begin of function, if, foreach, switch
Organize phpcs.xml a bit

Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
2017-07-01 11:34:16 +00:00
jenkins-bot
0d6f186487 Merge "Make mw.widgets.SearchInputWidget extend OO.ui.SearchInputWidget" 2017-06-30 11:25:43 +00:00
jenkins-bot
3431ab6d07 Merge "DidYouMeanWidget: Don't use deprecated Linker::linkKnown()" 2017-06-30 08:53:18 +00:00
jenkins-bot
e43c87efd8 Merge "SearchInputWidget: Fix documented default for 'pushPending' option" 2017-06-30 07:48:16 +00:00
Roan Kattouw
ef51ede976 UsersMultiSelectWidget: Port from CapsuleMultiselectWidget to MenuTagMultiselectWidget
Bonus:
* Remove puzzling code that claimed to fix a bug that I couldn't reproduce
  but instead made single-character searches never display suggestions
* Clear the input after choosing a menu item

Change-Id: I44e72205880d152639ee823238dc5ab84d34402b
2017-06-30 02:03:40 +00:00
Bartosz Dziewoński
7882e3b660 Make mw.widgets.SearchInputWidget extend OO.ui.SearchInputWidget
Mixin mw.widgets.TitleWidget instead of extending mw.widgets.TitleInputWidget.

* Remove code that reimplemented pieces of OO.ui.SearchInputWidget.
* Remove code that overrode pieces of mw.widgets.TitleInputWidget.
* Copy the code from mw.widgets.TitleInputWidget that we actually want.

This should result in no functional changes, other than losing the
TitleInputWidget API (some methods and config options) that no one
relied on, as far as I can tell.

Bug: T169194
Change-Id: Ic1482b4c7cfde7d4cf0b8900654bd3a454776010
2017-06-29 22:25:56 +02:00
Bartosz Dziewoński
49eeea2124 SearchInputWidget: Fix documented default for 'pushPending' option
Change-Id: Iadee48af255498c6608cfd00fca29eed9b14f1be
2017-06-29 22:24:56 +02:00
Kunal Mehta
80761e49ab DidYouMeanWidget: Don't use deprecated Linker::linkKnown()
Change-Id: Ie5464c9d8e3207e7d307bbd31f3c3026ac18fcf2
2017-06-26 19:17:17 -07:00
Jan Drewniak
48e15a4af5 adding data-attribute to sister-search sidebar results.
Adding source identifier (iwprefix) data-attribute
to interwiki search sidebar results.

Change-Id: I9e11a368fe4f5d79d81503fb4db1cc1649723839
2017-06-16 21:04:01 +02:00
Thiemo Mättig
e16191caa3 Remove unused and unnecessary imports
Change-Id: I26e623a4e4ba965c07670369a90c8a95185ea1e4
2017-06-12 15:50:43 +00:00
David Causse
9f24c73773 Properly check that the port key is present
Bug: T167301
Change-Id: I009c3d8e5805ddd2b75640ba582a648663c72b47
2017-06-07 18:46:42 +02:00
David Causse
6ffa1e302e Add 'show-multimedia-search-results' to SearchEngine feature data
Let the search engine controls if multimedia results have to be shown
in the new interwiki sidebar.

Bug: T164925
Change-Id: Ie3ccb28bf73110b136475e9527a2653bf06b8e45
2017-05-11 09:45:04 +02:00
Jan Drewniak
a0f492fffc Revised styling of sister-search sidebar.
Various improvements to the sister-search sidebar:

- using WM project favicons
- scoping CSS specific to sister-search sidebar
- making sister-search items more compact

Bug: T160724, T158938
Change-Id: I2794121ab83cbd4e2b8868150e4d61db376fa63b
2017-05-08 23:00:36 +02:00
Paladox
54c56da85a Fix php code style
Preparation change for updating mediawiki code sniffer to 0.8.0

Change-Id: Ib0b3fe4afea9096ffa3a1347b4f7e07d3398b0b2
2017-05-05 12:03:54 +00:00
Prateek Saxena
a6b31205ac mw.widgets: Add SelectWithInputWidget and its PHP implementation
Bug: T106999
Change-Id: Ic158bec3c463fba5099b05f41c9686f833e1c313
2017-04-24 10:19:55 +02:00
Mikhail Popov
489f7e0b54 Hold number of search results in a data attribute
Current way of counting returned search results (e.g. for
Event Logging) relies on counting the appropriate elements
in the search results page's DOM, up to the limit the user
requested (e.g. 20 by default). This allows us to record
the total number and the offset, useful for event logging.
For example, if we wanted to know whether the user viewed
2nd or 3rd set of search results.

Change-Id: Ic8601e9eeddac84ba8e0d7dc6f127bf360b6f90f
2017-04-19 11:29:45 -07:00
Fomafix
7a3418ae33 Use consistent spaces at start and end of comments
Change-Id: Idbb09b69aa1ef4e46433319aaea62f34f0dbc038
2017-03-30 22:06:40 +02:00
Bartosz Dziewoński
e218f21d44 mw.widgets.SearchInputWidget: Do not pass type: 'search' to TextInputWidget
Causes deprecation warnings.

Most of this code is copy-pasted from OO.ui.SearchInputWidget.

Bug: T148471
Change-Id: I81d52ba938a8b90c5d2c173f1f2682d9e3300e43
2017-03-14 21:44:42 +00:00
Jan Drewniak
dfac17c488 Minor fixes for second sister search AB test
These are a few minor fixes to improved the
UX of the new sister search sidebar.

- Making the link color on sister search results blue
- Fixing the order of the multimedia search results widget
- added a more explicit 'more results' message instead
of the current '(more)' message.
- aligning the top of the sidebar with the top of the regular
search results.
- fixing a typo in the multimedia widget.

Bug: T158935
Change-Id: Iaae603cc217b7847bebfa61b050b7c86bdd19f14
2017-03-14 12:26:28 +01:00
Eddie Greiner-Petter
d6709386bf Remove redundant input from search form
A hidden input 'profile' gets added within the search form widget no
matter what profile is loaded at the moment.  This is done in
shortDialogHtml along with a few other hidden fields. The same hidden
field is added a second time in optionsHtml if the profile 'advanced' is
run. Remove this redundance.

Bug: T158869
Change-Id: I3be598702dbe9fa2cfe0fdd6c23fe6d88477626d
2017-03-04 01:41:19 +01:00
Bartosz Dziewoński
6f2177e00e SearchFormWidget: Move hidden fields below the ActionFieldLayout
I think ideally, these would be at the end of the form, but there
are some hooks below which can produce arbitrary HTML and potentially
want to override these with their own fields, so I'm avoiding any
revolutionary changes to the field order here.

Bug: T158856
Change-Id: I377c0061a365930e11454a86c1e0926853789b55
2017-02-23 18:02:29 +01:00
Aaron Schulz
58ecdd060c Fix assortment of IDEA warnings
Change-Id: I3fb482232483f37bf73ebbeb405056794109e618
2017-02-11 18:12:42 -08:00
Erik Bernhardson
713de3808f The correct method is parse, not parsed
A recent patch updated these two calls to use Message::parsed(),
but it should have used the Message::parse() message.

Change-Id: I5aba40576b89f21d2b1416ca0db0d28d2a088c39
2017-02-06 14:22:07 -08:00
Erik Bernhardson
20f251618f Switch search-interwiki-caption i18n to parsed
A recent refactor of the interwiki sidebar looks to have a small
regression, in that this message used to use ->parsed() but now
uses ->escaped(). Switch back so the interiwki results on beta
render appropriately.

Bug: T149806
Change-Id: I44d0b1cd3bcc0606a0fb14e171d51bec1c310a91
2017-02-06 13:58:48 -08:00
Pmlineditor
83b4077eb3 Allow wikilinks in "Powersearch-ns"
Changed use of escaped() to parse() to allow wikilinks in
MediaWiki:Powersearch-ns. Use case is provided in T157204.

Bug: T157204
Change-Id: Ic2eb28aaf735c31b50f3365176966e2e48091e54
2017-02-06 03:27:35 +05:30
jenkins-bot
ec84fa3d7d Merge "Displaying interwiki results in sidebar" 2017-02-03 19:04:54 +00:00
Jan Drewniak
d78a470fcd Displaying interwiki results in sidebar
Displays newly designed interwiki search results in the
sidebar of the specialSearch page.

A prototype of this change can be viewed on this labs url:

http://sistersearch.wmflabs.org/w/index.php?title=Special:Search&search=mars

Bug: T149806

Change-Id: I66e4b6a502dae488d105f11cad73e145990c2327
2017-02-03 18:18:20 +01:00
jenkins-bot
fb52b78920 Merge "UsersMultiselect widget and form field." 2017-02-01 14:37:50 +00:00
Phantom42
c70f464c07 UsersMultiselect widget and form field.
New widget and html form field, which allows selecting multiple
users using convenient single-line input (CapsuleMultiselectWidget)

Bug: T131492
Change-Id: I7b6ffe7fb47e0a7083e2a956156ab0f142444398
2017-02-01 00:35:33 +02:00
Geoffrey Mon
9ce66e5b67 Option for DateInputWidget to display full month and day names
Add a "longDisplayFormat" config option to DateInputWidget to show
full month and day names when using the default locale-specific
display format.

Bug: T120733
Change-Id: I2db6892720abf86dfc9655291b1070aa7f7bf77b
2017-01-31 14:20:02 +00:00
Thiemo Mättig
fa6ade7262 Update docs/hooks.txt for ShowSearchHitTitle
Reasons:
* $text is vague. It's the label of the link. There is a function named
  getTitleSnippet, which is what I'm reusing for the variable name.
* $page is vague. It's not the page of the search result, but the search
  special page.
* $queryString is not a string but an array of strings.

I also updated https://www.mediawiki.org/wiki/Manual:Hooks/ShowSearchHitTitle
accordingly.

Change-Id: Ia18dbf5ccf7f9fcc8890ad01641d0b7ff3e6eee8
2017-01-20 10:40:28 +01:00
Chad Horohoe
256a5cf1c4 Unbreak extensions from ShowSearchHitTitle signature change
Fixes If78cb0c29ae394f16e465c15a8e8246c1b56dcea

Change-Id: Ia56f2eb4a5ed98f727f924666322e1c97b3ee183
2017-01-18 14:05:46 -08:00
Erik Bernhardson
c43655edc9 Extract 'did you mean' widget out of SpecialSearch
Bug: T150390
Change-Id: I41d767550ab4112fcd9cc4094b27a14c7d29169b
2017-01-17 15:58:00 -08:00
Erik Bernhardson
a0936780bb Extract main search result rendering from SpecialSearch
Has a pre-existing problem related to the link offset of secondary
inline results. Specifically the offset of secondary inline starts
at the provided offset, even though there may be primary results
displayed above it.

Bug: T150390
Change-Id: Id1d6b357f45a2cf615d9412cc95dd597c724e8b6
2017-01-17 15:57:40 -08:00
Erik Bernhardson
d400f7a668 Extract search form from SpecialSearch into widget
Bug: T150390
Change-Id: Ibda84349e1f552641805d6236605c8718540817f
2017-01-17 15:12:22 -08:00
Erik Bernhardson
6e155624fa Pull rendering of single result out of SpecialSearch
First step in refactoring the search results page. Pulls out widgets
to render our two styles of search result, Full and Simple.

Bug: T150390
Change-Id: If78cb0c29ae394f16e465c15a8e8246c1b56dcea
2017-01-04 13:33:19 -08:00
Geoffrey Mon
fbc80326a6 Add PHP DateInputWidget
Bug: T120733
Change-Id: I8f80e27304a916bba16ed255c8e78073f9da3813
2016-11-01 17:37:52 -04:00
Brad Jorsch
12bdc84219 HTMLForm: Add HTMLDateTimeField
And to do that, an OOUI PHP widget for
mw.widgets.datetime.DateTimeInputWidget too.

Bug: T146340
Change-Id: Iaa8b5892b6c3a1f3698cef59684cc3cdc9d483ea
2016-09-26 12:08:56 -04:00
Bartosz Dziewoński
7c987a0235 Don't magically make MediaWiki\Widget classes infusable
For consistency with how normal OOjs UI widgets behave.
Only one usage outside of HTMLForm needed updating. There
are no usages in extensions in Gerrit.

Change-Id: I9b5de86307a13ca7355b7541e8683e4d6a10431f
2016-07-26 13:56:47 +02:00
James D. Forrester
9c83f632ef SearchInputWidget: Use isset on dataLocation in case it isn't
Change-Id: I88f4d1624ee0e1f64d8f591dd8936e875211c53d
2016-07-01 12:34:51 +01:00
Kunal Mehta
63b562b3f5 Fix file permissions on SearchInputWidget.php
Change-Id: I0c7b149a0c62f02b655e53c255ba01a92fc6c4a8
2016-06-09 16:11:29 -07:00
Florian
36784f7c35 Search: Change dataLocation default value and add docs
Implemented Krinkle's comments of the followed up commit.

Follow up I2480149

Change-Id: I8e51c0d3a3ca1690ea3ea08469a1cd52d9c151f3
2016-05-06 12:18:19 +00:00
Florian
e429497501 Convert Special:Search input to OOUI
Bug: T100898
Change-Id: I24801495dfad71f457bc4afdd28474f74b219024
2016-03-22 18:38:52 +01:00
Florian
18c6615d01 MediaWiki Widgets: Add new SearchInputWidget
SearchInputWidget is similar to a TitleInputWidget, but doesn't has
a visible loading indication, doesn't highlight the first result and
uses the opensearch api endpoint for suggestions, instead of
prefixsearch.

Extra points:
 * Improve documentation of mw.widgets.TitleInputWidget's configuration
   option validateTitle

Bug: T118443
Change-Id: I8b8098041fe2971389fa908d007d2e77255829ec
2016-03-03 16:29:40 +00:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Florian
afd67e7bfc Fix conflicting configuration name in TitleInputWidget
config.validate is already given and used in OO.ui.TextInputWidget to
define a string/regex/method where a query is checked against. TitleInputWidget
would override it with a config option to enable/disable this check.

The config option "validate" uses the "validateTitle" name, now. There was
no usage so far.

Follow up: I732a2f56a2375d8c708e3b295996187ee209f1a6

Bug: T119075
Change-Id: Ibb47b20506d21213fc9681b6aa919ce45505e474
2015-11-19 22:29:34 +01:00