Commit graph

163 commits

Author SHA1 Message Date
James D. Forrester 11769a5196 stylelint: Drop old 'no-unsupported-browser-features' rule
Unsupported now.

Change-Id: I176c1f446ee2196327f6a4135090d666dc3dd1cc
2017-04-10 08:58:33 -07:00
Translation updater bot 76d3e0e57a Localisation updates from https://translatewiki.net.
Change-Id: Iee455167d41de5314d101c7257a547518b8934dc
2017-04-09 22:39:38 +02:00
jenkins-bot 149d6ed3b4 Merge "Send better HTML to the clipboard" 2017-03-20 17:02:28 +00:00
Ed Sanders b58db89aac build: Update stylelint to 0.4.1
Change-Id: Ia7d685d9e10468d2303c68dc88fee8811251ffcb
2017-03-20 14:37:33 +00:00
Ed Sanders 61a624584b Send better HTML to the clipboard
Change-Id: Id8539697e6b30fd98e672452eda9b9c792c3c366
2017-03-20 13:42:03 +00:00
Timo Tijhof 04c3ad0107 Implement responsive columns for reference lists
This is based on the popular 'count' parameter from Template:Reflist on
English Wikipedia, which has also been adopted by many other wikis.

That template's 'count' parameter allows maximum flexibility on a per-
page basis. This was important because the template can't know how many
references the list will contain. Users typically manually add (and
later, increment) the 'count' parameter when the list exceeds a certain
threshold.

The template currently sets an exact column count (via the CSS3
property `column-count`).

This patch improves on that by instead using the closely related CSS3
`column-width` property. This automatically derives the column count
based on the available space in the browser window. It will thus create
two or three columns on a typical desktop screen, and two or no columns
on a mobile device.

The specified width is the minimum width of a column. This ensures that
the list is not split when rendered on a narrow screen or mobile device.

It also hooks into the raw list before parsing and adds the class only
when the list will contain more than a certain number of items. This
prevents very short lists from being split into multiple columns.

Templates like Template:Reflist on English Wikipedia currently are not
able to set inline styles on the list element directly, which is why
they set it on a `<div>` wrapping the `<references />` output. Because
of this, the feature of the Cite extension must not be enabled at the
same time, as that would result in both the template's wrapper and the
references list being split. The end result would involve sitations with
three columns split in four sub-columns, creating a complicated mess of
nine intermixed columns.

To provide a smooth migration for wikis, this feature can be disabled by
default using `$wgCiteResponsiveReferences = false`. Each individual
template createing reference list can then be migrated, by removing the
wrapper column styles and instead settting the new "responsive"
attribute, like so: `<references responsive />`.

Once any conflicting templates have been migrated, the default for the
wiki can be swapped by setting `$wgCiteResponsiveReferences = true`.

If wikis wish for some templates to keep their custom column splitting
behaviour, templates can also opt-out by setting `responsive="0"`, which
will make sure that it will keep behaving the current way even after the
feature becomes enabled by default for the wiki.

In summary, when disabled by default, pages can opt into this system
with `<references responsive />`. When enabled by default, pages can opt
out of the system with `<references responsive=0 />`.

* Deprecate cite_references_prefix/cite_references_suffix.

  This message is rarely used and opens up compatibility hazards.
  It was already removed by Parsoid, but the PHP implementation
  still had it. It's typically used to add inline styles to the
  wrapper which is more appropiately done in Common.css (or
  obsoleted as part of the skin or Cite extenion itself nowadays
  depending on what style in question).

  It was also a HTML-style message with separated open and close
  segments, which is an anti-pattern in itself.

* Declare module target explicitly and include mobile. The absence of
  this stylesheet caused subtle BiDi/RTL bugs on mobile.

Bug: T33597
Change-Id: Ia535f9b722e825e71e792b36356febc3bd444387
2017-03-07 22:42:47 +00:00
Translation updater bot 6a0017a356 Localisation updates from https://translatewiki.net.
Change-Id: I0d29ce305e3b1d495598b9ec190f22bd2dd3127f
2017-02-28 22:52:10 +01:00
Translation updater bot 174a93a4b0 Localisation updates from https://translatewiki.net.
Change-Id: Id99b330d2098e0fc7f05fb92a836d9948bc756a4
2017-02-19 22:24:14 +01:00
Translation updater bot 204b6a7621 Localisation updates from https://translatewiki.net.
Change-Id: Iebe54825250d094a8c6e6c4d2406ff87a1a6b2a0
2017-02-16 22:37:55 +01:00
Translation updater bot cf9b2c9633 Localisation updates from https://translatewiki.net.
Change-Id: Id0249fc01a38184b96f658fe934c5126f639e1dc
2017-02-10 22:19:15 +01:00
Translation updater bot e129c05dba Localisation updates from https://translatewiki.net.
Change-Id: I2edb80594630318bfe5c7683735f052a6d67d266
2017-02-07 22:39:48 +01:00
Translation updater bot 6d169dca22 Localisation updates from https://translatewiki.net.
Change-Id: I7076b3aec1866308c7f51f59f51b6a4482ffe111
2017-02-06 22:26:49 +01:00
Translation updater bot 72b07873f3 Localisation updates from https://translatewiki.net.
Change-Id: I7fd6090b003545d150775092ac8453e062773e83
2017-01-28 22:31:08 +01:00
Translation updater bot b4441fe5ca Localisation updates from https://translatewiki.net.
Change-Id: Ib7a67a8359810da9775fd5775e7d5b5cb9403106
2017-01-23 22:24:26 +01:00
Translation updater bot 417d4b3285 Localisation updates from https://translatewiki.net.
Change-Id: Icbdce3f9a4ec9cfcc3dbd0d66054ecf79eabeb1e
2017-01-21 22:20:06 +01:00
Translation updater bot f18107effc Localisation updates from https://translatewiki.net.
Change-Id: I291de1659ce54a9675f693ae74c9124ed8520d65
2017-01-20 09:20:38 +01:00
Translation updater bot e7a2c9c1f9 Localisation updates from https://translatewiki.net.
Change-Id: I095d6fb59a1bed01640503940c4c8f1bcdf48e35
2017-01-04 22:30:04 +01:00
Translation updater bot ae20c91abf Localisation updates from https://translatewiki.net.
Change-Id: I9dfd1d34aed73e88e63094ae450e6640bf66676f
2016-12-28 10:45:06 +01:00
Translation updater bot 8a7820e865 Localisation updates from https://translatewiki.net.
Change-Id: I00e77ce7ddadbb53c613b8647ec211b122a4239a
2016-12-18 22:12:24 +01:00
Translation updater bot b9843c74fa Localisation updates from https://translatewiki.net.
Change-Id: Ie577da1b742c285e1d6b9f40fe9c2446854a95ec
2016-12-12 22:21:24 +01:00
Ed Sanders 4ff0db7100 Force word break in context preview for long links
Bug: T152680
Change-Id: I50c547703d86def747655567a76702e9bc6610e7
2016-12-08 13:11:18 +00:00
Ed Sanders 099b8f8153 Use canonical ve.dm.TransactionBuilder.static.newFrom* methods
Change-Id: I9ce6860e19e833b576f7b9fb239b96de394b667c
2016-11-30 19:06:13 +00:00
jenkins-bot 964e8644dc Merge "Re-use target widgets" 2016-11-29 20:50:04 +00:00
Ed Sanders ee40877e83 Re-use target widgets
Depends-On: I5ed0591048a17e84077bde5490e05c0467d0394a
Depends-On: I5decb918f398704d4b6c108a16fbc1cc073ef077
Change-Id: Icba13d84e10cf18a6c68e26448b2efe93b8c42b8
2016-11-29 19:50:09 +00:00
Translation updater bot 5b71049da9 Localisation updates from https://translatewiki.net.
Change-Id: Ie5336b0a57050bd7f19a6a7202e3b5e74daf7f59
2016-11-25 22:48:28 +01:00
Translation updater bot 2e027352c4 Localisation updates from https://translatewiki.net.
Change-Id: I90c7105100b3ed48eaebdb524802512136899de8
2016-11-18 22:13:52 +01:00
Ed Sanders ec1cf7c029 Update ComboBoxInputWidget API
Bug: T150555
Change-Id: I29ce9a806cdadf02798fa23de993fcca6ab476f6
2016-11-15 17:28:49 +00:00
Ed Sanders 04fca616e9 eslint: Re-enable wrap-iife and partially enable dot-notation
Change-Id: I8f5e8d7b4547337943ec6df8ffb3d8db9f466217
2016-11-15 12:59:21 +00:00
Translation updater bot a2d58ca043 Localisation updates from https://translatewiki.net.
Change-Id: I01414094f9a3cf85dabb787c022568835a564238
2016-11-13 22:40:47 +01:00
Ed Sanders 43f56c81a8 Fix MWReferenceGroupInputWidget and uses
Now it is an actual input widget, remove references
to .input property.

Bug: T150491
Change-Id: I826a2cb5ecf98d0e35ccab804f2aa90bbff7ada2
2016-11-10 23:23:58 +00:00
James D. Forrester c9c10d2998 MWReferenceGroupInput: It's ComboBoxInputWidget, not ComboBoxWidget
Change-Id: I7d16ab96363f13fc12df0ef17d5e7dcec6321bd9
2016-11-09 11:29:52 -08:00
jenkins-bot 5654987b74 Merge "Re-use internalList when building index" 2016-11-07 16:28:45 +00:00
Translation updater bot 2c33f274ee Localisation updates from https://translatewiki.net.
Change-Id: Ic3b7b5b81ef23712d9a559b10d648c29063899d5
2016-11-05 22:52:42 +01:00
Ed Sanders 753d87b072 Re-use internalList when building index
Calling #getItemNode on the un-initalised internalList caused
a tree rebuild of the sub-document.

On a page with 200 references this cuts the time it takes to
render the re-use list from ~2000ms to ~1000ms.

Bug: T134975
Change-Id: I696a965e88338e1bec2a14f61dab158c56728f2e
2016-11-05 18:05:59 +00:00
David Lynch 36c2f42226 Give cite dialog a keyboard shortcut: meta-shift-k
Very similar to the link shortcut, on logic that they're similar actions.

Bug: T148302
Change-Id: I540a9fb5c61f796bebd8558557936898d5f9b8a0
2016-11-03 11:34:49 -05:00
Ed Sanders 4c0e837dad Use stricter test for originalDomElementsIndex
Change-Id: I43a0f639fa50fb2bbe9f935dd141d595571d8e24
2016-11-02 12:51:10 +00:00
Ed Sanders a42c656c53 build: Replace jscs+jshint with eslint
Change-Id: Ibcfab289a6dd4dcac853aa2e5338516994067cd5
2016-11-02 12:50:48 +00:00
Ed Sanders f4240f13f9 Use 'super' to call parent methods
Change-Id: Iba051a1e84b2ea805d0b3795933587c735ec0d88
2016-11-02 12:43:14 +00:00
Translation updater bot d548b8fbda Localisation updates from https://translatewiki.net.
Change-Id: Ib7eaa8d5219c9b498e6dd27e626d89508a495d6a
2016-10-20 23:45:45 +02:00
Translation updater bot 14ba2c05e2 Localisation updates from https://translatewiki.net.
Change-Id: Iafcd62f1cdd89c754274fa0f63f6c4e165f146c2
2016-10-19 23:23:52 +02:00
Translation updater bot 3ac0219e4d Localisation updates from https://translatewiki.net.
Change-Id: Ic21b0e2c92a7fe54f9ef4eab93d1d092abdbff6d
2016-10-18 22:33:11 +02:00
Translation updater bot dda2f7b145 Localisation updates from https://translatewiki.net.
Change-Id: I001657856abb9638b55f5848a11bf3df357a6d69
2016-10-16 22:39:20 +02:00
Translation updater bot 8cb1144177 Localisation updates from https://translatewiki.net.
Change-Id: Ifd1091cff7f4a6ad9bae32314536e21a009bdbc2
2016-10-15 22:58:41 +02:00
Translation updater bot ced303370e Localisation updates from https://translatewiki.net.
Change-Id: I7e246f5a17f71a1d054db9c91bf5e67b5e740f57
2016-10-10 22:25:51 +02:00
Translation updater bot dbc98ab1f1 Localisation updates from https://translatewiki.net.
Change-Id: I1ef8d968104aaf3e6b70cd4698b60e4ff2cfcba1
2016-10-02 10:35:47 +02:00
Translation updater bot c11d591f5d Localisation updates from https://translatewiki.net.
Change-Id: I74cb5f446d8e164215912cef092e02f221b2e130
2016-09-27 22:34:49 +02:00
Translation updater bot 31d7324c5b Localisation updates from https://translatewiki.net.
Change-Id: Ib5a1c4df6c5b509fbf06b8f26807fcc70820742c
2016-09-24 22:39:23 +02:00
Translation updater bot 593497b54c Localisation updates from https://translatewiki.net.
Change-Id: Ie630ebc299812057c2ed160fc60e590fc71ed253
2016-09-23 22:32:05 +02:00
Translation updater bot f16390b461 Localisation updates from https://translatewiki.net.
Change-Id: I22969a9d0d2d55efd72729f53458978390b06814
2016-09-13 22:48:20 +02:00
Translation updater bot 77a231d093 Localisation updates from https://translatewiki.net.
Change-Id: I0fe83045bce551e49deaf964b29c7db395734a08
2016-09-07 22:40:48 +02:00