Commit graph

4079 commits

Author SHA1 Message Date
jenkins-bot
be619b8386 Merge "Add additional tracking information to mediawiki.searchSuggest" 2016-03-04 20:10:17 +00:00
Erik Bernhardson
c1159337a9 Add additional tracking information to mediawiki.searchSuggest
Adds a few pieces of information to improve tracking of autocomplete
usage.

* When using Special:Search 'go' feature forward wprov parameter to redirect
* Include a data attribute indicating autocomplete location to
  differentiate usage of the header and Special:Search content autocompletes
* Report exact query string that was used for impression-results
* Add handling to allow searchSuggest subscribers to append tracking
  information to generated article links
* Add a new hook, SpecialSearchGoResult, that can either change the url
  redirected to in the 'go' feature or cancel it entirely.

Bug: T125915
Change-Id: Iec7171fcf301f1659d852afa87ce271f468177c1
2016-03-04 11:53:39 -08:00
jenkins-bot
e8f68d8680 Merge "mediawiki.ui: Button group active buttons unchanged on user interaction" 2016-03-03 20:39:01 +00:00
jenkins-bot
16f1acae07 Merge "Upstream isElementInViewport from MobileFrontend" 2016-03-03 20:38:56 +00:00
jenkins-bot
e5977f6dee Merge "MediaWiki Widgets: Add new SearchInputWidget" 2016-03-03 20:30:49 +00:00
Volker E
b829f17d54 mediawiki.ui: Button group active buttons unchanged on user interaction
Applying default cursor and making active button's hover state behave same
as normal state for improved user experience.

Bug: T77916
Depends-On: Ib89500d70b3e79edcf9ba989f05a311e0edec82b
Change-Id: I8fd74c28ccb89df1e257aa3d63d362697c4542ed
2016-03-03 20:13:59 +00:00
Volker E
92b3774db8 Integrate Less helper .mixin-screen-reader-text()
Adding Less parametric helper mixin for screen reader users.
This will help with changes such as
I7db2d7e5387f1a4392d587764598dbd82dd0a5cd

Bug: T119444
Change-Id: Ie9bce512804385578361eb77579106c799d5ff57
2016-03-03 20:10:03 +00: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
jhobs
3f4e016873 Upstream isElementInViewport from MobileFrontend
As a useful utility function, we've copied this method several times
across multiple extensions, which is a pretty good sign it should
actually live in core.

Changes:
 * Add `mediawiki.viewport` module
 * Rewrite method to be more robust and accept any viewport
 * Add `mw.viewport` to jsduck categories file
 * Add method for checking if an element is close to the viewport
 * Add unit tests

Bug: T124317
Change-Id: I38eec4f1e568f51e7e212b2b3f10b8da8d36f316
2016-03-02 14:22:14 -08:00
jenkins-bot
601519ee36 Merge "Revert "Deprecating: Consolidating progressive & constructive buttons"" 2016-03-02 19:40:01 +00:00
Bartosz Dziewoński
ae0eb5fbe4 Revert "Deprecating: Consolidating progressive & constructive buttons"
I merged it too early, sorry. Deployment is planned for a week later.

This reverts commit cb8fa5fd17.

Bug: T110555
Change-Id: I369fa6d2b4f6531f7ec475c08cba283d323a0ffb
2016-03-02 19:27:52 +00:00
jenkins-bot
734ca2b4d2 Merge "Deprecating: Consolidating progressive & constructive buttons" 2016-03-02 16:39:17 +00:00
jenkins-bot
fb7b3eebeb Merge "mw.Upload.BookletLayout/Dialog: Add determinate progress bar" 2016-03-02 01:48:19 +00:00
James D. Forrester
906545d303 Update OOjs UI to v0.16.1
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.16.1/History.md

Change-Id: I4bd51d4c105a09d71a911e04538b51f58c3ea721
2016-03-01 14:00:31 -08:00
Alex Monk
46cabd4252 Add mobile target to mediawiki.special
Bug: T126935
Change-Id: I1135397d150b5ad978da88bfd9d85c1d9e294eb7
2016-03-01 11:50:16 +00:00
James D. Forrester
c721277e7d OOjs UI: CapsuleItemWidget: Revert regression on remove button in Firefox
Manual application of changes from up-stream ahead of v0.16.1 release, which
will miss the -wmf.15 cut, given the severity of the issue for Firefox users
and the simplicity of the change. Fix made by VolkerE in Ieac469d.

Bug: T128074
Change-Id: If43b86e27970ae0fe75a654a63f06cc19bcac865
2016-02-28 16:00:02 -08:00
Florian
8b32da49e5 Fix comment
According to comment on I2c7fc71d19cefaa16a6cc4526af05be9cd32366e
by @Majr.

Change-Id: I743699831554f9e51157a9c9e3405ebc222cdb15
2016-02-27 16:51:38 +01:00
jenkins-bot
9fd930f745 Merge "Implement HTMLTitleTextField with suggestions for non-OOUI forms, too" 2016-02-26 20:11:46 +00:00
jenkins-bot
663d41c91c Merge "ApiSandbox: Blur before sending request" 2016-02-26 18:13:19 +00:00
jenkins-bot
5353260265 Merge "Make mediawiki.action.view.redirectPage available on mobile" 2016-02-26 00:13:18 +00:00
Alex Monk
848eabef42 Make mediawiki.action.view.redirectPage available on mobile
Bug: T63861
Change-Id: I71d3d415fe918e8b0a090860cad9271092b1bd7e
2016-02-26 00:02:16 +00:00
jenkins-bot
2752ce2b6b Merge "OOjs UI: Fix #gatherPreInfuseState called incorrectly, causing TypeErrors" 2016-02-25 15:48:55 +00:00
Brad Jorsch
d61d185a73 ApiSandbox: Blur before sending request
OO.ui.ButtonWidget doesn't take focus itself, so clicking the "Make
request" button isn't sending the blur event, so stuff like
OO.ui.CapsuleMultiSelectWidget doesn't get to process its input until
too late.

Bug: T128054
Change-Id: I00913123e0019c096890b2829bfea3a77c551b2e
2016-02-25 10:37:34 -05:00
Thiemo Mättig
faba9bc36d OOjs UI: Fix #gatherPreInfuseState called incorrectly, causing TypeErrors
This bug is currently live. Try opening
https://www.wikidata.org/wiki/Special:NewItem
and have a look at the JavaScript console.

Introduced in If07d40a.

This patch is a manual cherry-pick from I748a4bc, which is the same
fix in the original repository. I feel we should backport this to
production.

Bug: T106313
Bug: T128075
Change-Id: I25a5deab2c287e97086726d0acbb3afeee842e0b
2016-02-25 15:15:55 +00:00
Matt Russell
65bc5487e9 ApiSandbox: Convert all pluses in URL to spaces, not just the first one
This would prevent linking to any query that contains spaces.

Change-Id: I45607c1eb465d4d9bf7bbb1de7098bb1450b5043
Bug: T128053
2016-02-25 13:28:20 +00:00
jenkins-bot
4b73a8b6fb Merge "ApiSandbox: Visual separation of fields" 2016-02-25 02:52:29 +00:00
Ricordisamoa
1b2a0b05d9 build: Tweak jscs jsDoc rule 'checkAnnotations' and make pass
* Don't override "private", the default is to require empty
  values for the tag

* Move some @private tags after descriptions so the latter
  are not mistaken for tag values

* Require some value for @context, @source and @see tags

Change-Id: I583bb2ff3ec6537e1419732aaf1644ea8feb2255
2016-02-24 03:47:10 +01:00
Volker E
05c3114029 mediawiki.ui: Buttons should receive max-width
Applying `max-width` to mw-ui-buttons and center-aligning subgroup
when class `mw-ui-block` is available.

Bug: T95367
Change-Id: I4aaf24042f451c3b5489f49098f4b9e7eeef8098
2016-02-23 14:36:55 -08:00
Florian
13498fabdb Implement HTMLTitleTextField with suggestions for non-OOUI forms, too
Also implement a way to use mediawiki.searchSuggests without wrapping
a link around the suggestions.

Bug: T117033
Change-Id: I2c7fc71d19cefaa16a6cc4526af05be9cd32366e
2016-02-23 19:01:17 +01:00
James D. Forrester
1cdee33835 Update OOjs UI to v0.16.0
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.16.0/History.md

Change-Id: I9c170fce1c65ae65b0b33342572fe4d3bb613774
2016-02-22 14:36:26 -08:00
jenkins-bot
e857ef14ad Merge "mw.Title/NamespaceInputWidget: Use wgNamespaceIds for namespace constants" 2016-02-22 15:51:02 +00:00
Ed Sanders
3bc6281f21 mw.Title/NamespaceInputWidget: Use wgNamespaceIds for namespace constants
Avoids duplication of numerical constants.

Fix instance of variable changing meaning (ns = ns.toLowerString()).

Change-Id: I0e21c51d0e1bdf8340d5d7c927cee7619171e14b
2016-02-22 10:37:01 +00:00
Ori Livneh
9fe0c54a79 Compress PNGs with zopflipng
Zopfli is the most efficient DEFLATE compression algorithm, trading run-time
performance for file sizes that are typically 3-8% smaller than those produced
by zlib with the maximum compression setting. Its output is Deflate-compatible,
so no specialized decoder is needed.

This change was created by running zopflipng against all the PNG files in this
repository. The exact invocation was:

  git ls-files --exclude-per-directory=.gitignore -- '*.png' \|
    parallel zopflipng -m -y {} {} \;

Files which zopflipng was not able to compress more efficiently were left unmodified.

Bug: T127608
Change-Id: Ia9c70cf35da489985af39df1f8b58469eb4813fd
2016-02-21 19:15:23 +00:00
Fomafix
5ce8c0a496 mediawiki.api.options: Use formatversion=2 for API requests
The format of the JSON response does not change.
But the request is different so the test also have to be updated.

Change-Id: I391a221f81fd92731c331363a8202c21d6b933b5
2016-02-20 20:52:55 +00:00
Bartosz Dziewoński
e303feff77 mw.widgets.CalendarWidget: Lazy-initialize calendar buttons too
Bug: T126788
Change-Id: I9b0e67ea5b9854745928e3c63e73d701c6a83daf
2016-02-19 22:59:44 +00:00
Bartosz Dziewoński
cb519ced0f mw.widgets.DateInputWidget, CalendarWidget: Lazy-initialize calendar when first shown
Bug: T126788
Change-Id: I469cd7dd77108435459b0f1feba953febd82e91b
2016-02-19 22:57:11 +00:00
Bartosz Dziewoński
189ace06d8 mw.widgets.DateInputWidget: Don't construct moment() objects when not needed
Fixed a typo too.

Bug: T126788
Change-Id: I3b2dac752a43945e5525a8ea9349a4b46a7549b2
2016-02-19 14:56:39 -08:00
James D. Forrester
0964884cce Follow-up 6281b0a: LookupElement is still not in core
Change-Id: Ie5300ae042d31a64d2b5d40bcf289f4474d3f898
2016-02-19 11:53:26 -08:00
Volker E
a97919d2ee Align mixin whitespace to CSS/Less coding guidelines
Aligning mixin whitespace to CSS/Less coding guidelines. Also fix some minor
inconsistencies and add browser support comments.

Change-Id: I50841e6062e59513def49719dc7a04956002de0e
2016-02-19 19:33:55 +00:00
Bartosz Dziewoński
6281b0a353 Resources: Narrow down dependencies on 'oojs-ui' to the smaller modules
I wasn't reading through them very carefully, so it's possible
that some of the 'oojs-ui-widgets' could be narrowed down further
to just 'oojs-ui-core', but this is good enough for me. At least
we're no longer loading toolbars everywhere.

Change-Id: I58799e22f9c0a2f78c1b4a02c4b7af576157883a
2016-02-19 11:11:14 -08:00
James D. Forrester
5bf4f0e9bb feedback: Update Phabricator URL broken by upgrade
Change-Id: I4e52476b386cc0c196cdb7ca8d1ed98a4d4889da
2016-02-18 11:23:04 -08:00
Bartosz Dziewoński
23fbf4aa22 Avoid parsing HTML when creating <input> nodes
We used to create them like $( '<input type="checkbox" />' ), which
actually does HTML parsing under the hood, because on IE 8 and lower
trying to change the 'type' of an <input> node throws an exception.
But we dropped support for IE 8 recently and no longer need to do that.

Upstream change for OOjs UI is I166f5ab0dce5ab47dc6a1f4e2e5ad012635911ed.

Find:         \$\( '<input type="(\w+)" ?/?>' \)
Replace with: $( '<input>' ).attr( 'type', '\1' )

Change-Id: Ie86f8917e8ce100de22006516daa542ad178aab6
2016-02-18 03:07:08 +01:00
Volker E
392850cc93 Remove superflous background-size property & make use of mixing
Removing superflous `background-size` property, which is overwritten
few lines below and make use of correspondent mixin in `:checked`
state.

Change-Id: I4f24c84c2f93bd85f495ff74ae21fbc210c18f57
2016-02-17 23:30:36 +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
Prateek Saxena
90a8212c14 mw.Upload.BookletLayout/Dialog: Add determinate progress bar
The BookletLayout now emits events during the upload file phase. It
uses these events to update a progress bar at the top of infoForm.

Bug: T115861
Change-Id: I0fd7f21f3fc1ef042330b7571c247e09c24d1a5c
2016-02-17 08:33:58 +05:30
James D. Forrester
c420284038 Update OOjs UI to v0.15.4
Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.15.4/History.md

Change-Id: I29c8db4c654ecf575113199ace1006d70ce29012
2016-02-16 18:10:44 -08:00
jenkins-bot
b06ff790ae Merge "resourceloader: Implement modern module loading (1/2)" 2016-02-16 17:32:27 +00:00
jenkins-bot
6c2a06965a Merge "TOC: Use padding instead of inline-block for space" 2016-02-16 11:58:10 +00:00
jenkins-bot
3c6dec4718 Merge "mw.Upload.BookletLayout: Use notice instead of popup for help text" 2016-02-16 02:40:00 +00:00
Prateek Saxena
e80ea1c4e3 UploadBooklet: Show image thumbnail in both steps
Bug: T115860
Change-Id: I0794206dad06fd0652e9b62884e8996e836b73b3
2016-02-16 07:13:12 +05:30