Commit graph

1984 commits

Author SHA1 Message Date
Ed Sanders 9e16e1cbd4 textSelection: Implement getCaretPosition
Bug: T185992
Depends-On: Id60f4b8aa177564f5252508ce6cff2424eb03fc8
Change-Id: I1a1a953dfbb299a15ba9d4d3e624e6779e72d11c
2018-01-30 10:54:02 +00:00
Ed Sanders aeb4f2f2b7 Implement simple methods from $.textSelection API
This should make it easier for some gadgets to work
with NWE.

Bug: T185992
Change-Id: Ic60440f345b8226fb5acaeb966e25eb003ad7866
2018-01-30 10:53:49 +00:00
Volker E e64ede5b49 Remove unnecessary and low-contrast opacity
Change-Id: I4853a77679687d23059c118914df42a1d3c2785c
2018-01-29 23:51:08 -08:00
Ed Sanders 9770c80615 Load modules for preview
Bug: T147702
Change-Id: I94f6bdf122d4e2c9fba3103f36c438980ce8228d
2018-01-29 22:35:00 +00:00
jenkins-bot d7d026425c Merge "Make visual diffs the default in visual mode" 2018-01-27 00:21:24 +00:00
David Lynch d97b734352 MWWikitextStringTransferHandler: Perform Parsoid cleanup on result
Parsoid markup delivered as a result of a paste was being handled differently.

Bug: T183173
Change-Id: Ic563d2c5cd1f663f35860892b369fb7ba34b9c55
2018-01-22 14:43:19 -08:00
David Chan c7b76329ad Use ve.dm.MetaList without explicitly requiring metadata index
For future compatibility with Ib5174b0dcba1c24f44d889e08140bee31a064011 .

Change-Id: I15f252ce5d36bc0c38c5f5035e5176bf5e6d96e5
2018-01-21 18:33:28 -08:00
David Lynch a52dc16244 Update TitleInput's getTitle to getMWTitle
cb92c72c63274b332dc81edf473b1b3979ab4bdf in MW core changed this.

Bug: T185231
Change-Id: I9084a11bd40e46bddbcd1922ff549703bc90f60f
2018-01-18 11:39:23 -06:00
jenkins-bot d5bf4d41de Merge "Remember preferred diff viewer" 2018-01-18 15:37:35 +00:00
jenkins-bot 31e7006610 Merge "getSelectedItem() -> findSelectedItem()" 2018-01-17 17:29:36 +00:00
Ed Sanders a1e2cb237c Resize link context item after getting description
Descriptions can run to more than two lines.

Bug: T183650
Change-Id: I3d0a5787cab19abc4851340b08fe4a109e7aec31
2018-01-17 16:06:28 +00:00
Ed Sanders 0169701257 getSelectedItem() -> findSelectedItem()
Change-Id: Idf90335d06800b690063c7b2a781e822f0ee7ba9
2018-01-17 13:39:13 +00:00
Ed Sanders e70fe7c1a1 Make visual diffs the default in visual mode
Bug: T178248
Change-Id: I9fe22862d4415df034a0054f934c9ebd1d731a5d
2018-01-17 13:31:07 +00:00
Ed Sanders 7661081ab9 Remember preferred diff viewer
Separate the preference by surface mode, so you can
use a different preference for NWE.

Bug: T178691
Change-Id: Ib8494a4562ce766a7c8ef7ec1447d06f5d0f17c5
2018-01-17 13:31:07 +00:00
jenkins-bot 2ea64bdd27 Merge "Change save dialog accesskey to be entirely off the trigger" 2018-01-10 21:30:51 +00:00
jenkins-bot 9768750cd3 Merge "Use findItemFromData instead getItemFromData" 2018-01-10 19:54:30 +00:00
David Lynch 64944c119a Use mw.storage instead of localStorage
mw.storage catches errors, so we won't crash horribly when the user has
localStorage disabled / full.

Bug: T181822
Change-Id: I212994eb535b9a8fb5f6c09deaa10b16c3d7f10e
2018-01-10 11:44:24 -06:00
David Lynch a89c79dc79 Change save dialog accesskey to be entirely off the trigger
Accesskeys in this situation are unreliable cross-browser. Firefox won't
trigger the accesskey inside the dialog. We can manually simulate it, via the
existing trigger.

Bug: T121183
Change-Id: Ib919d8b9fcd9324a517037bcc6ef93a26d1488b9
2018-01-08 11:52:06 -06:00
jenkins-bot 683ac88fcc Merge "doc: Bump copyright year" 2018-01-03 19:20:07 +00:00
James D. Forrester 0a7a845a42 doc: Bump copyright year
Change-Id: I0b299c840ede1a1b8552cecfc70c5760ab036181
2018-01-03 17:45:07 +00:00
jenkins-bot fad1466d84 Merge "Fix editfont size in source mode" 2018-01-03 01:12:25 +00:00
Ed Sanders 459ce75cb2 Fix editfont size in source mode
Bug: T182320
Change-Id: I777a1a80cb9887bc473aecb5d7b25fd6454a3d60
2018-01-02 19:20:18 +00:00
Bartosz Dziewoński 578c55b7c1 ve.ui.MWSettingsPage: Fix doc comment
Change-Id: Iff4e8854124340a30081009221cde5b2831c81f3
2017-12-30 03:26:13 +00:00
Prateek Saxena ecd663c4a0 Use findItemFromData instead getItemFromData
Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
Change-Id: I379da96a42c440c7d2d5dc2f3de2773c03546c04
2017-12-28 11:53:29 +05:30
Ed Sanders 8a356b19d7 Enable spellchecking on media caption inputs
Bug: T182393
Change-Id: I23d3f1b37225f9e5a9a9651b6e7b590d38dc99b3
2017-12-12 16:42:55 +00:00
David Lynch 7777f69e7b Use rel="noopener" on links targeted at new windows
Bug: T180932
Change-Id: I93bda6aaebf97727a187774cccbeba4f27fcddd5
2017-11-30 13:15:38 -06:00
David Lynch efbfcd8b35 ui.MWSaveDialog: consistent handling of preview category links
Category links weren't being checked for redlink status, and weren't opening
in a new window.

Bug: T179913
Change-Id: Ic665583128bf51710178c5674cd35c273f5f207e
2017-11-29 11:24:32 -06:00
Ed Sanders 77773df985 Create MW tables with captions by default
Bug: T181173
Change-Id: Ib17331e0e8478ba67c1ecbbee4a284d9993cb552
Depends-On: Ieb668d282f7afa9332cead94c95f19f652102af1
2017-11-27 16:37:24 +00:00
Ed Sanders 57bf86b69e Add mw-parser-output to preview elements
Bug: T180214
Change-Id: I74700061c89ab4004229e3b03353067e92031774
2017-11-10 15:34:51 +00:00
Volker E fdf30c1793 Unify SVG markup
Align SVG markup across Foundation products by:
- unifying XML declaration,
- removing unnecessary `standalone="no"` attribute as it's default,
- removing all SVG editor metadata
- removing all `g` group elements except where necessary for transforms,
- putting attributes on `path`,
- removing unnecessary ids and
- unifying whitespace.

Saving up to 23% file size before gzipping.

Bug: T178867
Change-Id: If0339073a12f24df1a0f8dcc110c35e0ee2d38a7
2017-11-06 10:43:56 -08:00
Ed Sanders 3fff0a88d7 Fire wikipage.content hook on edit notices
Bug: T179315
Change-Id: Ib9a19acbb2459c5b94fc72610f86a48feb80a380
2017-10-30 22:21:50 +00:00
David Lynch ab1e5d58d4 MWInternalLinkContextItem: increase specificity to override OOUI changes
OOUI 8e31b2f273 increased changed various icon CSS rules, and increased their
specificity. Increase ours to match. This restores the correct size/ratio of
the images in the link context item.

Bug: T178933
Change-Id: I4f1a6dde363cf99f7665dc83f4b0fa6b1dd3c29e
2017-10-24 16:09:38 -05:00
Ed Sanders b752a0620b Increase selector specificity to fix layout regression
Removes negative margin from first item in help popup.

Change-Id: I87ecca9f886dd4061a2afa781ca997ef751907ef
2017-10-19 15:21:12 +01:00
Bartosz Dziewoński 99cdc08f53 ve.ui.MWMediaInfoFieldWidget: Fix positioning of icons
OOjs UI's styles now include 'top: 0' for icons, which messes us up here.

Bug: T178415
Change-Id: Ia3234848f69fd67d0b3e35c817de1d9847d46143
2017-10-17 17:55:53 +00:00
Ed Sanders 013d26f0b0 MWParameterPage: Use MultilineTextInputWidget instead of config
Change-Id: Icccd6460452774ae0ff21ce9df36dfe428d935d2
2017-10-12 18:13:06 +01:00
Ed Sanders 581847acb3 Show visual diffs in wikitext mode
Bug: T170371
Change-Id: I8fd9ed4f804444ec486c4df72125cdeb04da0d5f
2017-10-11 20:31:39 +01:00
jenkins-bot 28d4ed974f Merge "Remove reference to editfont-default" 2017-10-03 18:48:21 +00:00
Ed Sanders cd097bed3d Allow MediaWiki extensions to use self closing tags
Parsoid now supports this by setting body to null.

Change-Id: I24d856f0cffeacb00cb2b757e34315bc02b595d0
2017-10-02 10:52:48 -07:00
Ed Sanders ddc056a40a MWExtensionWindow: Always send a string to setValueAndWhitespace
Bug: T177180
Change-Id: I3a32e1b22e82bc0c182d26a952e7592aafd4b5e4
2017-10-02 16:26:16 +01:00
Ed Sanders 852e1ababe MWAlienExtensionNode: Listen to attribute changes
Also:
* Disconnect change event on this.input, which doesn't
  get destroyed on teardown
* Add padding between attributes and this.input
* Assume the alien extensions can have a rendering when
  their body is empty.

Bug: T177181
Bug: T177183
Change-Id: I2e59f8195b255f33f91901213c92ea14793635b4
2017-10-02 16:22:41 +01:00
jenkins-bot ff7c57489a Merge "Set padded=false for link inspector" 2017-09-29 16:42:29 +00:00
Ed Sanders 582a3e62fb Remove upstreamed link inspector page icons
Change-Id: I997b299d9a61ec9307025a7f4d106f185283eb40
Depends-On: I297648d14b4a2540a40f3a0b7d22a7905ef7c035
2017-09-29 16:27:50 +00:00
Ed Sanders ef46e45b43 Set padded=false for link inspector
Logically depends on I615b485a272.

Bug: T177080
Change-Id: Ica54238d891fa41eefb0b9216eb4f2190818a502
2017-09-29 16:14:29 +01:00
Volker E 4067b05832 Unify monospace font family stack
Bug: T176636
Change-Id: I9ad1a92cef7875371e232c8e4babc842ba711e8c
2017-09-28 00:24:53 +02:00
James D. Forrester 2c70792c4f Replace constructive with progressive UI flag
Change-Id: Iae36e978978ed6642f44606a934c540cf5f8537f
2017-09-26 15:14:32 -04:00
Ed Sanders 38d716f895 Follow-up Iebd1def1: Revert MWSignatureTool case
The tool checks the page name before the target is initialized.

Change-Id: I02ec528a11cc01b026fb95617388d47323ad96ee
2017-09-26 19:59:56 +01:00
Ed Sanders 1b8f8d8908 Replace wg(Relevant)PageName with target#pageName
The default value of target#pageName is wgRelevantPageName
but other targets my override this, or change it dynamically
(e.g. ContentTranslation).

Also remove duplicate setter of pageName in mw.ArticleTarget,
already set in mw.Target.

Change-Id: Iebd1def1d4142978a673afec584a0b663644d176
2017-09-26 13:22:00 +01:00
jenkins-bot f17b099984 Merge "Use findFirstSelectableitem instead of getFirstSelectableItem" 2017-09-21 18:13:09 +00:00
jenkins-bot e1ae0a91ec Merge "Remove nbsp from Visualeditor-mwlanguagevariantcontextitem-rule-code-label" 2017-09-20 16:20:40 +00:00
C. Scott Ananian 853ec0bc9c Inspectors for editing LanguageConverter markup
Basic inspectors for editing.  Changing from block to inline, or
adding "hidden" or "describe" flags not supported.

The UI layout for two-way and one-way rules could certainly be improved.

Bug: T49411
Change-Id: I5ce29e4bf47abf509afde0a57f64b5d1189f5185
2017-09-15 09:24:33 -07:00
C. Scott Ananian 26df4dca33 Doc update: use the full class name so JSDuck hyperlinks it correctly
Change-Id: I2c6f6a6c5b497767d7f7731c86cc145ed60b1deb
2017-09-14 11:07:07 -04:00
jenkins-bot 1809344c8a Merge "URL decode file names in gallery, as in PHP parser" 2017-09-13 18:00:56 +00:00
Ed Sanders a6ac6d0cec Fix typos in gallery attribute names
The MW attributes are 'style' and 'class'. The plural
forms are used internally only to avoid JS keywords.

Change-Id: I1b7d14872aab4b6b3882d00165924fd1639e1744
2017-09-13 14:06:44 +01:00
Ed Sanders 280696ad3f URL decode file names in gallery, as in PHP parser
Bug: T175816
Change-Id: I3ec9c1f6db57798cdc1b5a787dd0bd9b4d3beef1
2017-09-13 14:03:20 +01:00
jenkins-bot 508fdf1543 Merge "Don't require a selection to run any of the save actions" 2017-09-11 15:10:23 +00:00
jenkins-bot 822db7eacf Merge "Add feedback link for visual diff inside save dialog" 2017-09-11 12:01:39 +00:00
Ed Sanders 13ef05b489 Don't require a selection to run any of the save actions
Change-Id: I3a8f7e1e9e3714f226ac240a429a62d011112285
2017-09-10 14:53:14 +01:00
David Lynch 569f917edc MWExtensionWindow: clean up originalMwData on teardown
Not doing this makes adding a new extension node with the exact same content
as a previously-viewed one have the Done button disabled.

Bug: T172586
Change-Id: I39105144e17135044ef644b5464b0fbfdfc019d5
2017-09-07 10:40:36 -05:00
Bartosz Dziewoński 92cea19890 Use .length instead of .size() for jQuery objects
.size() is deprecated.

Change-Id: Ib28b7fede117de474efea705adf5dc2cdf8cb101
2017-09-06 14:52:40 +02:00
Prateek Saxena 1d6b87243e Use findFirstSelectableitem instead of getFirstSelectableItem
Depends-on: Ic12be404eba490e5ce748f0d754a807e12f6ba76
Bug: T76630
Change-Id: I7daccf8620ec43a56183fd455048a1f2c5f71f26
2017-09-06 15:42:42 +10:00
Thalia a3902ebff8 Add feedback link for visual diff inside save dialog
Bug: T170665
Change-Id: I0b09b1089c834a013ad5fee4ecdf75b483b56323
2017-09-05 13:35:37 +01:00
Prateek Saxena 2b923c0346 MWTemplateDialog: BookletLayout: Use findClosestPage instead of getClosestPage
Bug: T76630
Depends-on: I068dad8c79c4bda6ea37ab6a1eb6ba72ab6f7dc0
Change-Id: Ib4e380aa6cd0cacbadd42bdf447ddee6443f22ef
2017-09-05 12:13:41 +10:00
jenkins-bot af756c4c20 Merge "EducationPopup: Add cursor:pointer" 2017-08-30 17:59:26 +00:00
Ed Sanders 24747966b6 EducationPopup: Add cursor:pointer
We still expect the user to click on the tool, and
the actions still works (albeit delayed), so we
should use cursor:pointer.

Change-Id: I6d2b0140f5fd918809f05acc6e405ef430c518fd
2017-08-30 17:48:27 +00:00
jenkins-bot a24be49c01 Merge "ve.ui.MWEducationPopupTool: Position blue dots with CSS only" 2017-08-30 17:42:38 +00:00
jenkins-bot 1a40fd2b71 Merge "ve.ui.MWLanguageVariantNodeContextItem: Fix condition for empty table" 2017-08-30 15:48:07 +00:00
jenkins-bot 61ae9df214 Merge "MWParameterPage: Vertically align actions with label" 2017-08-30 15:42:53 +00:00
Egbe Eugene 2fc6423070 Remove nbsp from Visualeditor-mwlanguagevariantcontextitem-rule-code-label
Since "nbsp" is hard to translate, it is removed from the current
text of visualeditor-mwlanguagevariantcontextitem-rule-code-label,
which was "Language code" - now changed to "Language code".
Instead the table headings (where this message is used) are defined
as non-breaking in CSS.

Bug: T173181
Change-Id: I9794fa010ad908fe772fa6858c25acc6beb973d5
2017-08-29 21:58:33 +02:00
Bartosz Dziewoński bff16fb352 ve.ui.MWLanguageVariantNodeContextItem: Fix condition for empty table
For magical HTML reasons, a `<tbody>` node is automatically inserted
inside the `<table>` node. Therefore the table always had exactly one
direct child, this check always failed and table was never shown.
Instead, count the rows.

Change-Id: Ia8a5387c3f605689ab1053c923952ec955b83253
2017-08-29 21:57:48 +02:00
David Lynch 5d4ff082e6 MWLinkAnnotationInspector: check input validity when switching modes
Focusing a TextInputWidget normally unsets validity. However, because we're
kind of pretending this is the same input, just in a different mode, it
doesn't make sense to the user that the focus behavior occurs. So, make it
recheck validity after we switch.

Bug: T172159
Change-Id: I1d9d6670d72483c7510fd5ed3c539b43af8432bf
2017-08-29 11:28:29 -05:00
Bartosz Dziewoński 0a378318bf ve.ui.MWEducationPopupTool: Position blue dots with CSS only
We can place them in bottom center of the toolbar buttons with
just CSS, no need to manually calculate the position (which
doesn't give the correct results if the toolbar is not visible).

Also add z-index for correct rendering inside TargetWidget,
not overlapped by the toolbar border (e.g. in the media dialog).

Bug: T174120
Change-Id: I556ddfcf252669107cf21810fbed7c9a3751e906
2017-08-29 18:21:44 +02:00
Ed Sanders c8e856bfb2 MWParameterPage: Vertically align actions with label
Also make label consistent height, with or without an
indicator using line-height, and move closer to input.

Change-Id: I1b6e6e2f3caa4c949583cafa9448aae6ebc1e0a1
2017-08-29 14:45:21 +01:00
Ed Sanders 550408f863 Increase width of param actions container
Bug: T174202
Change-Id: I61a175593b087219b22c5be91d00054b1c15e1dc
2017-08-29 14:28:26 +01:00
Ed Sanders 63607c4cff Remove reference to editfont-default
Bug: T170223
Depends-On: I1ace59c980740fc785ccbd500e19cc8b71d46a5b
Change-Id: I2ac04df04b6652b47490dff5202683c041178a2c
2017-08-25 18:44:53 +01:00
jenkins-bot b73deb1690 Merge "Create wrapper paragraph when converting block image to inline" 2017-08-24 22:16:16 +00:00
jenkins-bot f315c650f6 Merge "Don't focus media dialog until ready process" 2017-08-24 17:18:54 +00:00
Brad Jorsch 2abb9b1b2d Remove execute mode from non-executable
Change-Id: I46549acd49ca883e9047b8117cb968a9ddbb06cc
2017-08-24 10:57:25 -04:00
Ed Sanders eb2ee52de0 Create wrapper paragraph when converting block image to inline
This prevents the image jumping into another paragraph,
e.g. in a different table cell.

Move the logic for removing the old image out of MWMediaDialog
and into MWImageModel#insertImageNode.

Bug: T121449
Change-Id: Ibd7c92f3f90c382ceffd3e0defb12ba36a3786d2
2017-08-24 15:56:22 +01:00
Ed Sanders b11b144ad6 Don't focus media dialog until ready process
Bug: T174027
Change-Id: I070b5538e12c8a165a714ac6c3fd172f0ed179d4
2017-08-24 15:38:11 +01:00
Ed Sanders 51207e7aa5 Allow for mw.body being null in <selfclosing/> extensions
Bug: T173016
Change-Id: I8daa65e5dc0368b366710f044b621287e83e26f7
2017-08-23 16:13:16 +00:00
Volker E 19eb726677 Align border and border-radius values
Aligning `border` code syntax codebase-wide and
`border-radius` values to WikimediaUI theme.

Change-Id: I1a16dccf17bd112ba5071ebfe02d57237feb39e0
2017-08-16 14:05:55 -07:00
Volker E aaffa6aa46 Replace remaining greys/reds with WikimediaUI color palette colors
Replacing remaining greys and reds apart Monobook/Apex specific
stylesheets with WikimediaUI palette colors.

Bug: T173459
Change-Id: I9b5b1c379bf76e8da57eeff28c7dd000f148a8fc
2017-08-16 13:43:02 -07:00
David Chan c87abccdf9 MWLinkAction: Don't annotate close tags
Change-Id: I273838eba4cb259cf053ce88378da10b0e241155
2017-08-13 11:33:43 -04:00
jenkins-bot 8975449eaf Merge "Context item for LanguageConverter markup" 2017-08-11 14:29:09 +00:00
C. Scott Ananian c89a3059f8 Context item for LanguageConverter markup
Add a context item giving more information on language converter markup.

Bug: T49411
Change-Id: I3c91db84793a9a965dcb760253b24edee5d7bd23
2017-08-10 11:02:41 -04:00
David Chan c03d69b761 Expose ve.ui.MWInternalLinkContextItem generateBody logic
Change-Id: I94912ac2c471cc5d227fa8b9cb29c302ca29814d
2017-08-09 17:58:49 +00:00
Ed Sanders a90f8f5ea1 Copy over missing steps from MWLinkAnnotationInspector to Wikitext version
Bug: T171892
Bug: T171895
Change-Id: Id14eed79b9a2395b3b722828e62b05d3d8d44327
2017-07-31 18:44:12 +01:00
Bartosz Dziewoński 49d5bae106 ve.ui.MWEducationPopupTool: Don't show if not inside a BarToolGroup
The popup gets hideously deformed in other cases. Getting it to work
would probably be difficult. Let's just not show it.

Bug: T170919
Change-Id: If9005e9cdea52fefab981f4c7f05f71fce99f3e8
2017-07-19 22:13:34 +02:00
Ed Sanders 835a775a49 build: Upgrade grunt-eslint from 19.0.0 to 20.0.0
Mostly indent and regex fixes.

Change-Id: Iaf9d02363c78cb71deec5c4cab53a05b67f60600
2017-07-18 12:55:33 +01:00
jenkins-bot 1333373c3e Merge "Drop local 'template' icon, use 'puzzle' from upstream" 2017-07-17 15:09:28 +00:00
Bartosz Dziewoński 0e00b2c109 Fix wikitext preview in IE and Edge
In Internet Explorer and Edge, NodeList objects do not have the
'forEach' method. However, Array's 'forEach' can be applied to them,
as we do elsewhere in the code.

https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach

Bug: T170466
Change-Id: Icb19995e140607d45c47fb6ae8d60ac80b664d02
2017-07-14 15:30:27 +02:00
Ed Sanders 0917d27e61 Fix wikitext table insertion
Since Ic8b11d8052 #insertContent puts multiline strings on separate
lines, so to get this to behave correctly, pass in linear data instead.

Bug: T170160
Change-Id: Ie121fce1af46c6834945f4de30bcd9924ee96fd1
2017-07-10 16:16:11 +01:00
James D. Forrester 528942c2e1 Drop local 'template' icon, use 'puzzle' from upstream
Now that our template icon has been upstreamed thereto.

Bug: T111041
Change-Id: If101018de284dcc1be086d92427de0d88adb0e02
2017-07-06 09:52:56 -07:00
Bartosz Dziewoński 4c3c8b3d1e ve.ui.MWWikitextSwitchConfirmDialog: Remove broken "evil hack"
The promise #getTeardownProcess is trying to resolve/reject no longer
exists, causing exceptions. The code has been unnecessary for a while,
as we do all the work in #getActionProcess. (In the case that we do
switch, the teardown code isn't even called, since we navigate away.)

Cancelling the switch to wikitext works correctly after removing this
code.

Bug: T169588
Change-Id: I1b9b12edf12a0b91f06c13aa53024efb80868387
2017-07-04 21:49:15 +02:00
jenkins-bot 16f5bc609e Merge "TextInputWidgets: update for deprecated multiline behavior" 2017-07-03 21:21:20 +00:00
David Lynch cfe1d6c0c9 TextInputWidgets: update for deprecated multiline behavior
Remove config option `multiline` and change to MultilineTextInputWidget as
appropriate.

Bug: T169272
Change-Id: I45565f01de76a88d64d7b0691d1e7279354f375d
2017-07-03 22:09:58 +01:00
Ed Sanders dd54c9c95d Return truthy object when image info not found
A missing image should return some data to say the
image is missing, not just reject the promise.

Bug: T169337
Change-Id: Ib41a64a783c1baca88f428417c98e7fb913d14a1
2017-07-03 18:01:33 +00:00
Ed Sanders 915e818356 Clear all gallery state on teardown
Change-Id: I90662d02bd2d9768bdcf27e532ed8b8792f764c3
2017-07-03 17:48:06 +00:00
jenkins-bot 05bc265198 Merge "Keep TOC in correct place in document" 2017-06-28 12:31:33 +00:00
jenkins-bot be808346c9 Merge "Fix TOC meta item detection" 2017-06-28 12:31:32 +00:00
Ed Sanders 15af26876a GalleryDialog: Re-order and make margins even
Move image inside filename fieldset, and make
margins between fieldsets and button 1em.

Change-Id: I7f6789043f873f9da4e960c94e22a7ee096a352f
2017-06-23 12:16:35 -07:00
Ed Sanders 9eb637e933 GalleryDialog: Downstream fix for DraggableElement padding
Bug: T168745
Change-Id: I95e6f5cd2126878c4f973285fceece1d5a03c4eb
2017-06-23 11:58:37 -07:00
Ed Sanders fd1adfb3b5 Keep TOC in correct place in document
Change-Id: I6ad8cd8cbd7ef902204408673eb096b7405abd24
2017-06-22 15:16:15 -07:00
Ed Sanders 1a0fd81f64 Fix TOC meta item detection
Change-Id: Icce35100bbc0bfb5584a676eec0e1774308d0f68
2017-06-22 15:16:14 -07:00
David Lynch 9ded195f7e MWTransclusionDialog: fix conditions for "show options" button disabling
As I understand it, the button should be enabled whenever there's more than
one option in the sidebar, and disabled otherwise. The previously chosen
conditions weren't perfectly proxying this, and the button would be disabled
whenever editing an already-existing transclusion.

Bug: T167710
Change-Id: Id303b680c072642ae7b66066e28ecc9f1dc90fd7
2017-06-22 17:58:52 +01:00
Ed Sanders 6f72ef82d9 Show simple category list in preview
Bug: T153534
Change-Id: Ie86abdad76a38855d5ad1a394c0bfb3c8dd5a8c6
2017-06-20 23:50:52 +00:00
Ed Sanders 9dd638a5ab Move preview document filtering into MWSaveDialog
Also:
* Make mw-content-DIR nest inside mw-body-content
* Use ve.filterMetaElements

Change-Id: Ic70c7dff0f74b81f92b8bd48e8092549947990ba
Depends-On: I478fe1f39164b9fd7e71987b818b8f668d1a7020
2017-06-20 23:50:44 +00:00
jenkins-bot 14dd536d32 Merge "ve.ui.MWEducationPopupTool: Remove unnecessary manual popup positioning" 2017-06-16 18:32:51 +00:00
Bartosz Dziewoński 433e7b5069 ve.ui.MWEducationPopupTool: Remove unnecessary manual popup positioning
OOjs UI Popups position themselves automatically relative to their
$floatableContainer these days.

Also added explicit `$floatableContainer: this.$element` in the config
(although not strictly needed, since the parent node is used by
default, this makes the code more robust in case we move the popup
somewhere else in the DOM).

Bug: T167751
Change-Id: Id4267fce6499a4c217f7dc1d18871c02dd078aee
2017-06-14 23:19:09 +02:00
Bartosz Dziewoński 39b82f7b00 Revert 032fb292, a97eacd0
Reverting a new weird hack for an issue and bringing back the
old, tried and true hack that was removed in the mistaken belief
that if a bug is marked as fixed, it is really fixed.

* Revert "MWTransclusionDialog: size footer correctly"
  This reverts commit 032fb2924e.
* Revert "Remove dialog height hack tagged against resolved bug"
  This reverts commit a97eacd05b.

Bug: T93290
Bug: T167483
Change-Id: If1cc07837892bb0248c74025d5403f9698e77705
2017-06-14 20:38:38 +02:00
David Lynch 032fb2924e MWTransclusionDialog: size footer correctly
Changing label means a refresh is needed.

Bug: T167483
Change-Id: Ie4b35696bdf21d2a74e786875615d8753a57972d
2017-06-13 11:48:38 -05:00
jenkins-bot 7e892bbc97 Merge "MWParameterPage: Fix missed remove -> trash icon name rename" 2017-06-12 18:55:05 +00:00
James D. Forrester a7d48228dc MWParameterPage: Fix missed remove -> trash icon name rename
Bug: T167598
Change-Id: I1701bd426ea66a40937bcc69183c697a8e39710d
2017-06-12 11:39:50 -07:00
Ed Sanders 4a163020a8 Add filename to gallery dialog page
Also add fieldset headings consistent with media dialog.

Bug: T167049
Change-Id: I8112b70d8e3ba19079fdab0806ad343b233c9c18
2017-06-06 15:48:24 +01:00
jenkins-bot c5bdd39a63 Merge "Update for deprecation of OOjs UI openWindow/closeWindow promise" 2017-06-02 00:32:39 +00:00
Bartosz Dziewoński 4f55d8066e Update for deprecation of OOjs UI openWindow/closeWindow promise
Bug: T166729
Change-Id: I95b85a8c0d488993c11da74e1d856fef6cf0ebb4
2017-06-02 00:21:58 +02:00
jenkins-bot f01577ffa8 Merge "ve.ui.MWTemplateDialog: Use normal #getReadyProcess instead of custom stuff" 2017-06-01 18:08:21 +00:00
jenkins-bot 1a80348e8b Merge "Guard against mwdata.body being null" 2017-06-01 14:52:57 +00:00
Bartosz Dziewoński 834539748c ve.ui.MWTemplateDialog: Use normal #getReadyProcess instead of custom stuff
This fixes the focussing problems from T166150.

As a separate consequence, when loading a template/transclusion
takes a while (it can take several seconds for e.g. a template with
100 parameters), we will now display nothing while the user waits.
Previously we displayed an empty frozen dialog (note that this only
worked the first time for some reason).

Bug: T166150
Change-Id: I414a72ee248517867eef63a75f2d327aa5d5b908
2017-06-01 16:31:05 +02:00
Ed Sanders a5e44034fb Guard against mwdata.body being null
Bug: T166754
Change-Id: I3b887a3a6ee81ca3fd0b242fadc8b833b9031b50
2017-06-01 14:01:23 +01:00
jenkins-bot c9d9361c5b Merge "Update VE core submodule to master (8be817396)" 2017-06-01 01:16:43 +00:00
Ed Sanders c7221988a1 Update VE core submodule to master (8be817396)
New changes:
26085a853 Make author list a ListPopupTool
c4ea53eef Update OOjs to v2.1.0
8c94697f3 Update OOjs UI to v0.22.0
cdebc4817 Follow-up 8c94697f: Actually commit the icon changes I had locally
8be817396 Update OOjs UI to v0.22.1

Local changes for author list popup

Change-Id: I36bcaf122528a4a12882aaff3b33ef936082a391
2017-05-31 17:48:45 -07:00
James D. Forrester 756079d477 Replace uses of the removed 'remove' icon with the 'trash' one
Bug: T166730
Change-Id: I528dcdb390a4488ffac89fc823ff35bc1eda4f24
2017-05-31 16:30:17 -07:00
Ed Sanders a97eacd05b Remove dialog height hack tagged against resolved bug
Bug: T93290
Change-Id: Idbb20a0adf854ba68e10043608764891f3d8514d
2017-05-23 17:48:02 +01:00
David Lynch dfbbe378c3 MWCategoryInputWidget: missing 'new' for cached redirected optionwidgets
Bug: T164820
Change-Id: I8b2ae9112af74910cb6ba5097dcec8be86cc1376
2017-05-19 11:57:17 +02:00
Volker E f695877de7 Rename deprecated Card to current TabPanel
Renaming CardLayout to TabPanelLayout and all connected code instances.
Follow-up to Icfe1652cc038dc131b6b855ce9b45040b8ee5178

Bug: T164903
Change-Id: I9ce4e31e390522d469e126fb3a4b05787cef7fef
2017-05-10 11:46:49 -07:00
David Lynch 2f40972807 MWWikitextDataTransferHandlerFactory: Don't reimplement getText
I forgot about getText in 41ca528705, apparently.

Bug: T163237
Change-Id: Ibb646fc03a0293845c4449cbbe6c822ba63751f8
2017-05-10 10:58:42 -05:00
jenkins-bot 862c3ca22e Merge "MWWikitextDataTransferHandlerFactory: skip getWikitextFragment if possible" 2017-05-10 15:51:16 +00:00
David Lynch 41ca528705 MWWikitextDataTransferHandlerFactory: skip getWikitextFragment if possible
This lets us avoid a fraction of a second lag when someone pastes a plain URL
into source mode.

Bug: T163237
Change-Id: I0e673856dec5f273fb92731b27494762299d2d6c
2017-05-09 10:19:15 -05:00
Ed Sanders debcd678b5 Generate visual diff only after switching to visual diff tab
Bug: T164724
Change-Id: I48e49d4b68cc769b3e9d061983de4c78b5ad5c34
2017-05-09 10:09:39 +00:00
Ed Sanders 485a159037 Allow welcome dialog to be variable height
Bug: T164056
Change-Id: I277a709545151dbd51f92c21d6317a45b1088db2
2017-05-04 13:08:33 +01:00
Ed Sanders 54fc920622 Captcha improvements
* Fix focus and resize/scroll into view after the
  captcha has loaded (so after the image has loaded
  for FancyCaptch).
* Add margin between input and captcha
* Enable enter-to-submit on captch input field.
* Unify code for simple/math/questy and correctly
  render math as HTML (by looking at the mime type)

Change-Id: I10433cefbfea8569674c120dde5b489570e20966
2017-05-02 17:49:12 +01:00
Ed Sanders ede81b493e MWSignatureNode/Tool: Avoid global variables
Change-Id: I0596b33e797830f3718f4edbe34075fdaced0831
2017-04-29 12:37:28 +01:00
jenkins-bot 604dc2d86a Merge "MWMediaTransferHandler: Allow uploading of dropped Blobs" 2017-04-27 19:32:42 +00:00
Ed Sanders 3999fb1eb6 VisualDiff: Check save dialog is still visible when re-rendering diff
Change-Id: I1d740b767d150699863f18ee6dd9eca8a35b2bf1
2017-04-27 18:36:07 +01:00
Ed Sanders 3a9dcf7ec5 MWMediaTransferHandler: Allow uploading of dropped Blobs
Previous the media upload panel didn't support this. This makes Chrome
behave in the same way as Firefox when pasting images into a document.

Bug: T39932
Change-Id: I12f190a48ae9b62d4ad2f33b2a4ee546fdf7b354
2017-04-26 22:33:18 +00:00
jenkins-bot c8f919a880 Merge "MWCategoryWidget: batch requests for category data" 2017-04-25 18:32:52 +00:00
jenkins-bot 83b331e04e Merge "MWTemplatePage: Show a different message if the template doesn't exist" 2017-04-24 20:43:54 +00:00
jenkins-bot 233415cf50 Merge "MWTransclusionModel: Update for change in TemplateData" 2017-04-24 20:43:52 +00:00
James D. Forrester c787df90c5 MWTemplatePage: Show a different message if the template doesn't exist
Bug: T162694
Change-Id: Icad5abb240efd10fadbfdb287acb98afe2361719
2017-04-24 20:30:35 +00:00
James D. Forrester 8fd621ad74 MWTransclusionModel: Update for change in TemplateData
Depends-On: I7905502d0c419a04e4487095214634f1513b461c
Change-Id: I97a1bfc9f9ead082a673a91b9d2053630a90309c
2017-04-24 19:13:59 +00:00
Ed Sanders df3a4fb171 MWSaveDialog: Check diffElement still exists after setTimeout
Bug: T162642
Change-Id: Iec01a8ebbda39d83fd1c2f4dbbef17793d9af1e4
2017-04-24 18:03:35 +00:00
David Lynch f7d0df2449 MWCategoryWidget: batch requests for category data
API query cuts off after 50 results.

Bug: T163406
Change-Id: I6e83843dd1a22334d9ddec7103ddf318fb181112
2017-04-20 16:47:16 -05:00
Ed Sanders c02c529537 Load notices when switching, just don't show them
Previously we completely disabled the loading of notices
when switching, instead of just not showing them (so they
don't clash with the "switched" popup).

Bug: T162812
Change-Id: I3f8e787630e196cee1dbb1aa449b3558b74fcd04
2017-04-20 21:20:10 +01:00
jenkins-bot 06777e20a3 Merge "MWCategoryItemWidget: remove DraggableElement's padding" 2017-04-20 15:23:29 +00:00
David Lynch 1c47d71e7d MWCategoryItemWidget: remove DraggableElement's padding
OOjs UI v0.21.0 changed DraggableElement's padding. Override it here, so it doesn't look broken any more.

Bug: T163404
Change-Id: Ic0bc4f9e3e060cf89e6bc7cb22068d1fe1441d75
2017-04-20 02:05:42 -05:00
Bartosz Dziewoński 4b7d188735 ve.ui.MWCategoryPopupWidget: Fix popup positioning
Figuring out why it broke doesn't seem like a very interesting task,
so let's just throw the whole logic out and use OOjs UI PopupWidget's
new built-in ability to position itself relative to anything.

Bug: T163269
Change-Id: Ie464e4668001f4bc6151b40cef469937aa8c6e48
2017-04-19 22:48:16 +02:00
James D. Forrester 0ca821b321 Follow-up 57a06a6e: .getAttribute might be 'guaranteed', but not from null
Whoops.

Bug: T162939
Change-Id: I5a9315e3cfc8a9e8edfb2ef597daeae09bbf5c5e
2017-04-13 14:38:20 -07:00
David Lynch efc469f2f4 TemplatePlaceholderPage: abort pending template search after adding template
With precise timing, the lookup menu could appear after the add template
button had been pressed and the user had moved on to the next page.

Bug: T162707
Change-Id: I36941dc7288c6031a0fb189c0946aa6d8f8697e8
2017-04-12 11:34:42 -05:00
James D. Forrester 57a06a6e75 dm.metaitems: Turn grouped metas into variadic ones
We're getting rid of meta item grouping, so we need to prepare.

Merged:
* ve.dm.MWIndexMetaItem
  from ve.dm.MWIndexDisableMetaItem and ve.dm.MWIndexForceMetaItem
* ve.dm.MWNewSectionEditMetaItem
  from ve.dm.MWNewSectionEditDisableMetaItem and ve.dm.MWNewSectionEditForceMetaItem
* ve.dm.MWTOCMetaItem
  from ve.dm.MWTOCDisableMetaItem and ve.dm.MWTOCForceMetaItem

These three now inherit from ve.dm.MWFlaggedMetaItem to avoid code duplication.

Change-Id: Ic8a9cdb1226dccac2c27e7f4b965c1590a7387c0
2017-04-11 11:13:18 -07:00