Commit graph

290 commits

Author SHA1 Message Date
jenkins-bot c010450e08 Merge "Move MWReferenceSourceSelectWidget out to Citoid" 2015-08-26 15:40:19 +00:00
Ed Sanders 48a07e0bdc Use new internal link builder
Bug: T64816
Change-Id: I9ec857eef948028e65eb5e8bf21707f5f5bfd9c0
2015-08-25 16:39:32 +01:00
Alex Monk b0507f692d Move MWReferenceSourceSelectWidget out to Citoid
Merge after Iaca69f17

Bug: T109988
Change-Id: I80c1be419e545aecdc9f7db98133776d4b4cc326
2015-08-24 15:24:17 +01:00
Ed Sanders e59ee87887 Add spacer above basic reference option
Also add classes to basic/reuse so they can be differently styled.

Bug: T108725
Change-Id: I4d128afe86c7fae2d8cbd8a57749970942e39e76
2015-08-23 20:06:35 +01:00
James D. Forrester 00d3226be1 build: Enable jscs jsDoc rule 'checkParamNames' and make pass
Change-Id: Ifcd3f67524c32148ff3591263d6374b31ee57d3b
2015-08-19 11:33:59 -07:00
James D. Forrester 85f91f394e build: Enable jscs jsDoc rule 'requireNewlineAfterDescription' and make pass
Change-Id: I7c0fabc93834d19198caea8f5dd1834e9e473d0a
2015-08-19 11:21:01 -07:00
James D. Forrester 945242a55a build: Enable jscs jsDoc rule 'checkAnnotations' and make pass
Change-Id: I76abb1eb1f3e1a2e8a4c03f577a080f4889b3a6d
2015-08-19 11:09:34 -07:00
James D. Forrester 19df1d4c8a build: Enable jscs rule 'requireVarDeclFirst' and make pass
Change-Id: Ia2f765d12bde001c329c2ff4c080a36b71de9803
2015-08-19 11:05:01 -07:00
James D. Forrester f5c6f61163 build: Enable jscs rule 'requireSpacesInsideBrackets' and make pass
Change-Id: I846d36c15e1b1f810d2ef7fd422f8412790bcb0f
2015-08-19 10:33:02 -07:00
Ed Sanders 87daf4773d Fix typos in function names
Change-Id: Id8a9bcd1b4409bc8132ac6007b75274074f5f477
2015-08-18 13:54:51 +01:00
Robert Vogel 7047830bf3 MWMediaResultWidget: Fallback for 'images' without dimensions
When the MWMediaResultWidget receives a file that has no graphical
represenation (width:0 height:0) it uses minWidth of 30px for width of the
thumbnail.

This is, for example, the case with PDF files if the PdfHandler extension is
not active.

This patch solves the issue by falling back to the thumbwidth/thumbheight
values if width/height are 0.

Change-Id: I6bdaf1aafc0c45e26d31cd9dd9504e193f04e717
2015-08-14 19:40:48 +00:00
Alex Monk 5931751771 Trim external link before validating
We already trim it before setting it as the actual annotation href

Bug: T103450
Change-Id: I4c7117d7e1e89c98abbafb999033ab7b5f58bdff
2015-07-25 19:42:33 +01:00
Florian b390a32fda ParameterWidget: Connect to Search results widget 'choose' events
Instead of using the removed 'select' event submission on SearchWidget.

Rename event fired by MWParameterSearchWidget to reflect the new re-
emissioned choose event.

Follow up: I7fa97f208da0b3b185f1b09b87fef9c9afaee2f1

Bug: T106696
Change-Id: I1d954a7243649d7834373537d70bfadf68f52c9d
2015-07-24 20:25:01 +02:00
James D. Forrester 57f8fc5368 build: Drop last jscs over-ride and make pass
Change-Id: I4ff60af79cfc6e09e284d51f9b7ac2afa900f0f5
2015-07-22 15:13:09 -07:00
Ed Sanders bb46c34255 Update VE core submodule to master (edaa19b)
New changes:
aab2e90 Localisation updates from https://translatewiki.net.
826055a [BREAKING CHANGE] Rename SurfaceWidget to TargetWidget

Local changes:
* [PULL THROUGH] Rename MWSurfaceWidget to MWTargetWidget

Bug: T94066
Change-Id: If578e15c1ee7effd5ca1d6073521a6c59caac255
2015-07-18 17:19:05 -05:00
Ed Sanders 0c1eb0cf33 Remove listeners from deprecated search widget 'select' events
Attach listeners to search *result* widget 'choose' events instead.

Also, pass reference model as 'data' to MWReferenceResultWidget, instead
of index so we don't have to do a lookup later.

Change-Id: I8a9b7ddaa70e29406726ac8463582a8bcf813128
2015-07-13 17:06:28 +02:00
Ed Sanders 5fb8d3a4d0 ve.ui.MWReferenceResultWidget: Remove unused 'divider' code and styles
Also, tweak documentation.

Change-Id: Iaf5045bd65d0d484c8810f4bbe097d6710ca6e7e
2015-07-13 17:06:27 +02:00
jenkins-bot de8afeb833 Merge "MWInternalLinkAnnotationWidget: Force 'Open' button to use full path" 2015-07-02 22:39:21 +00:00
Ed Sanders 472c98053d Ensure placeholder styling matches document
Bug: T96593
Change-Id: I23bb1393a9a6779b70ed1004496f3ca6ff038e43
2015-06-30 09:47:34 +01:00
Alex Monk d4e2c55cfc Get rid of Category: prefix when looking up categories from the API
Bug: T103777
Change-Id: I27a81d832e3da7a0177d1c69af605c0525415b6b
2015-06-25 20:19:15 +01:00
Ed Sanders 52cb066dc7 Use new MediaWiki core TitleInputWidget
All link input/title input functionality has been moved to core, so
we can replace the link widget, redirect widget and template search
widget with it.

Depends on Ib463e60cad96 in MediaWiki core.

Change-Id: I452f3b86ead403307072cf904f0553c9771f4300
2015-06-24 17:06:00 -07:00
Alex Monk c0de5f2f51 MWInternalLinkAnnotationWidget: Force 'Open' button to use full path
Instead of just assuming we're in /wiki/. That might be OK for VE core
and external links, but not for internal MW links.

Bug: T85619
Change-Id: I53d7fed63a66e3c72d4c8fd66cd1f85fb10a2e55
2015-06-23 22:26:10 +00:00
C. Scott Ananian 85b86fb45d Stop using deprecated aliases for OO.ui.mixin.*
These classes were renamed in OOUI v0.11.4.

Change-Id: Ie932eb3bf5e65866ae4ba3bf2317facb1e740d3b
2015-06-10 20:25:04 +00:00
James D. Forrester df79ed8c4b Update VE core submodule to master (5befc34)
New changes:
3368c4c Remove some assumptions about the state of the context
79918af Move contexts to subfolder
820eaec Tests for some drag/drop functionality
e5f0e3e Convert CE surface tests to use a mock UI surface
c81dbcf Localisation updates from https://translatewiki.net.
7561ff3 Create a mock UI surface that only contains a model for model-only action tests
ad60333 Convert test timings on APIResultsQueue from seconds to milliseconds
b52d7df Table cursoring tests
3f8e821 Localisation updates from https://translatewiki.net.
9c737df Update OOjs UI to v0.11.4
5befc34 Stop using deprecated aliases for OO.ui.mixin.*

Change-Id: Ida6d4ba724686d8189975c55a18c4a6c2cfe4875
2015-06-10 12:44:55 -07:00
Bartosz Dziewoński abbb62fe8e ve.ui.MWTitleInputWidget: Restore 've-ui-mwTitleInputWidget' CSS class
've-ui-mwTitleInputWidget-menu', too. Removed in
b3d2e9013f, but we actually
use these classes in styles and in browser tests.

Bug: T101600
Change-Id: I40dae9c68bbcba2f980c307fe0dfa0956b4eb78a
2015-06-06 13:17:32 +02:00
jenkins-bot 236e02aed6 Merge "Account for MWTitleInputWidget having been moved into MW core" 2015-06-04 23:11:01 +00:00
Ed Sanders e9384ad9ac Update VE core submodule to master (83d45d1)
New changes:
9d162ce Restore the selection to a sensible place when closing FindAndReplace
57229ac Only apply annotations if 'done' is clicked
bfb17ee Always show cancel button on annotation inspectors
91672cf Disable 'done'/'insert' button when input invalid
aef9cbd Only create annotations from text input if it is valid
a384b96 [BREAKING CHANGE] Make getTextFromAnnotation/getAnnotationFromText static
fa09ab7 Scroll table selection into view when it changes

Local changes:
Make getTextFromAnnotation/getAnnotationFromText static

Change-Id: Id3c2a1efb1f327fa6d5b93d57d90bb5bb8ee88f8
2015-06-02 00:47:13 +00:00
Roan Kattouw b3d2e9013f Account for MWTitleInputWidget having been moved into MW core
Depends on I43fb412ff6 in MW core.

Change-Id: Ia189e19f0ccb71adf9f3eeba4d600c2bcb360037
2015-06-01 17:24:52 -07:00
Ed Sanders ff9bf1fcb3 Update VE core submodule to master (2c0224d)
New changes:
68959f2 Localisation updates from https://translatewiki.net.
2c0224d [BREAKING CHANGE] Link widget refactor
f81eefa [BREAKING CHANGE] Rename LinkInspector to LinkAnnotationInspector

Local changes:
Adjust for link inspector refactor

Create separate widgets for internal and external link
annotations. Remove annotation specific logic from link
target input widget.

Change-Id: I054c3fe7ac9c61fbc3302471abd58cab89fed5a4
2015-05-08 09:56:11 +01:00
jenkins-bot f1a6e87bc5 Merge "Don't show placeholder references in lists" 2015-05-06 23:17:28 +00:00
James D. Forrester 38239707b0 jshint: Kill file-level globals and add "moment" to the list
Change-Id: I923ba3490f5fc9b2aaf52d10a163f75dd6401c71
2015-05-06 19:01:27 +00:00
Ed Sanders 9811bc4fd9 Don't show placeholder references in lists
Allow references to be created as placeholders and exclude
them from ReferenceListNodes and the ReferenceSearchWidget.

Bonus: Fix reference numbering when items are skipped (in
list nodes and search widget).

Change-Id: I8dc5146c21f309e89ff4ddd939f7c65a0c358378
2015-05-06 19:15:20 +01:00
Ed Sanders 283047b604 Refactor reference source selection out into a widget
This can be re-used by Citoid.

Bonus: Improve placeholder copy.

Change-Id: I429ce5d7faae56955bcc09a9662d8a36c5098e44
2015-05-06 19:11:35 +01:00
jenkins-bot b1e426d805 Merge "Convert 'external' links to internal pages pasted into the search field" 2015-05-05 17:47:43 +00:00
jenkins-bot 7d85bc3ae3 Merge "Highlight matching parts of link suggestions" 2015-05-05 10:12:28 +00:00
suchetag 6983fbe3d0 Highlight matching parts of link suggestions
Bug: T93697
Change-Id: I1778dc204e45e0b124e3a171b9cce171a3138a58
2015-05-05 10:08:26 +00:00
jenkins-bot 1094dc82cc Merge "MWTemplateTitleInputWidget: Add missing local var" 2015-05-05 00:00:45 +00:00
Ed Sanders d921a942b4 MWTemplateTitleInputWidget: Add missing local var
Change-Id: I7faf7610d3d75a4df1fa0f565fb32b08581e44d1
2015-05-04 16:55:02 -07:00
Ed Sanders 563bb66fc6 Make 'Search articles' / 'External links' i18n messages
Change-Id: I85e13821079c1c04c5f183fc63ba9243ce01a12d
2015-05-03 12:54:33 +01:00
Ed Sanders c32cccd90b Make static methods static in linkCache
Also switch out logic duplicated in MWLinkTargetInputWidget with
LinkCache#processpage.

Change-Id: Ie6f3599d4ea5cc9057cf4403f003da00f18cdebe
2015-04-30 17:00:45 +01:00
James D. Forrester 65112a7e10 Show different icons for different result types
* Disambiguation
* Redirect
* Not found
* Page exists

Bug: T93694
Change-Id: Ic4a60c95e37de372e8d0c12878dece67a2662343
2015-04-29 17:51:34 +01:00
Alex Monk 6f17fde4cd Convert 'external' links to internal pages pasted into the search field
Bug: T94334
Change-Id: I0ed67e6579b9ed0a0565968fd253fdf5c6151683
2015-04-29 16:11:32 +01:00
Ed Sanders 702fc724d7 Follow redirects in the link inspector API
Show redirect targets first, then any redirects to it
immediately after.

Change-Id: Ifde579410b4fbf42e0598e4b069963162333da55
2015-04-29 11:53:40 +01:00
Ed Sanders df6a570f82 Only pull description from wikibase
Filters out 'alias' and other terms not being used yet.

Change-Id: I5d155c76b85de1e5d1d5fb234f565fd6f1658766
2015-04-29 11:17:24 +01:00
Ed Sanders 377f6e4eea Separate inputting of internal and external links
* If the user switches to external links, clear the input
* If the user types something with a protocol, automatically switch
  them to external links. If they manually switch back to internal,
  remember that and don't auto switch them again.
* If the user inputs something without a protocol into the external
  link box, prepend 'http://'

Bug: T93699
Bug: T93700
Change-Id: Ia0e3a04f34077e7bd56254112dafd86ad865cbe2
2015-04-29 11:17:24 +01:00
suchetag 00745cda87 Replacing current order of link suggestions
Replace current, sectioned, order of link inspector suggestions
(existing, redirect, disambig) with order from API.

Reduce number of matches to 5, and show new page suggestion last.

Bug: T93698
Change-Id: Ida887d889730d7749041942636d24e181c335697
2015-04-29 11:17:11 +01:00
jenkins-bot d8c0f9e8b3 Merge "Link inspector images and descriptions" 2015-04-27 23:51:38 +00:00
suchetag 3963b1daf2 Link inspector images and descriptions
Fetches images from PageImages extension and descriptions
from Wikibase.

Bug: T93693
Bug: T93694 (partial)
Change-Id: I1bea6b7b57ab951e79468cfa00e9eecddc113d18
2015-04-28 00:23:40 +01:00
jenkins-bot 1b4fecb61b Merge "Keep the parameter list expanded after it was expanded once" 2015-04-24 16:52:29 +00:00
Moriel Schottlender 3a7b99f6a6 Keep the parameter list expanded after it was expanded once
In the template dialog, keep the parameter search widget expanded
with all parameters showing if it was already expanded once.

Also keep the parameter list available after inserting each parameter
instead of asking the user to click the add details repeatedly.

Bug: T95696
Change-Id: I14a47dbea5c69532238e7e67290e613121fdc40e
2015-04-24 17:45:04 +01:00