Commit graph

7129 commits

Author SHA1 Message Date
Ed Sanders 10ce48a57e Remove unnecessary IE10 blacklist
IE10 support was dropped from MediaWiki core in 1.31.

Change-Id: I1c8c790428df5afe019e10a65ba5e891f5895dfb
2018-08-30 19:01:59 +01:00
Ed Sanders 76d0b95af3 Re-order MWCommandHelpDialog and promote/demote insert tools
Change-Id: I3ac4e556e06e2ab899d8bc07ca79d847146952e6
Depends-On: Ic12bc1c3ac96a1feb79e277e65aaf2d29af4f03f
2018-08-29 10:51:00 +00:00
jenkins-bot 919f74f10b Merge "Don't wait for surface to blur before hiding pageToolbar" 2018-08-29 01:58:14 +00:00
Ed Sanders eea7b93895 Don't wait for surface to blur before hiding pageToolbar
Bug: T202986
Change-Id: Ia25dd7aab7c72f6888fab1fcec0185fe0b4111b5
2018-08-28 12:08:09 +00:00
jenkins-bot bf9d3c1b06 Merge "Template dialog: Lazy resize multiline text inputs on first focus" 2018-08-27 20:43:38 +00:00
Ed Sanders 1703cc6361 Move link styling into overridable method for CX
Change-Id: I5c349d15ecc0df29827d41c9cc408bb826924447
2018-08-27 12:26:05 +01:00
jenkins-bot c09c9a408a Merge "Update VE core submodule to master (e69a4a07c)" 2018-08-25 22:13:19 +00:00
Ed Sanders 7bf56a3bd4 Update VE core submodule to master (e69a4a07c)
New changes:
3b62827b8 Remove negative margin from mobile context action buttons
694705894 Implement a simple notification system to fill in for mw.notify
461283560 Validate history start when applying/unapplying change

Bug: T202514
Change-Id: I203dc5101bc31988df2d3986da4300a318e5e889
2018-08-25 18:08:48 +01:00
Ed Sanders e67f870922 Fixup Ie40baad: Avoid triggering surfaceReady when adding dummy surface
Change-Id: I01f77633a11c6c5b8d484836940ea10b975c7a9e
2018-08-25 18:06:37 +01:00
jenkins-bot 99485b7cbb Merge "Cleanup: Get rid of surfaceReady callback" 2018-08-25 13:48:37 +00:00
Ed Sanders 07e05c7954 Cleanup: Get rid of surfaceReady callback
Just call the method after surface init.

Also move all the post-dm building code into
an #addSurface override.

Change-Id: Ie40baadfa6cd826a92f8fb7d928f4d995286f69f
2018-08-25 14:04:00 +01:00
petarpetkovic 30f099382a Replace jQuery.grep with Array.prototype.filter
Change-Id: I912fb68060d88b618cb2a2502417c1bccc5fecec
2018-08-25 00:11:30 +02:00
Ed Sanders 23ec1973d8 Match width of template lookupMenu to input
Bug: T196117
Change-Id: I58909b2f0138b512df03a8990d3c19cb0b184cad
2018-08-24 14:22:00 +01:00
Ed Sanders 0f81aae133 Template dialog: Lazy resize multiline text inputs on first focus
Bug: T134814
Bug: T200834
Change-Id: I3ec84ad01db1ed896c41ac8ef38cce8eddb0b8c2
2018-08-23 17:34:25 +01:00
Ed Sanders 8f49bb391a WelcomeDialog: Check at least one editor is available
Bug: T201928
Change-Id: Ibac6cf921fdc3daba2d671d9bd668fa7bcb9e7a2
2018-08-23 14:21:40 +01:00
David Lynch 26f6429702 TemplateStyles support
MWTransclusionNode will preserve TemplateData <style> in its generated content.

Disable TemplateStyles stylesheets in the original page content, and reenable
them when the surface deactivates.

Remaining TODO: if multiple copies of a template with deduplicated styles are
on the page, and the one containing the actual <style> is removed, all will
lose their styling.

Bug: T197563
Change-Id: Ibd8939eef7d8eb532719f4ee0ce200600449ef81
Depends-On: Ia9f2afcdba5456238e3ef444c202c9b0c78838bf
2018-08-22 17:03:27 +00:00
Bartosz Dziewoński 1481f70b9e ve.ui.MWSettingsPage: Fix missing icon (renamed in OOUI)
Bug: T202101
Change-Id: I3ed199269e1f4452739628ae8d51a04fb911cc04
2018-08-21 00:26:01 +02:00
jenkins-bot 9498b6a72b Merge "Export to page using action=submit" 2018-08-19 12:02:48 +00:00
Ed Sanders cb10316a7b Export to page using action=submit
Change-Id: I0d719905203d24a545d9b7dcea5bb9d032f10a76
2018-08-19 11:25:17 +00:00
jenkins-bot e6d89cd1ec Merge "Show signatures in NWE visual diff" 2018-08-17 13:29:41 +00:00
jenkins-bot 4d78073001 Merge "Replace 'settings' by renamed 'pageSettings' icon" 2018-08-17 00:28:05 +00:00
Volker E 07f58084cd Replace 'settings' by renamed 'pageSettings' icon
Bug: T190581
Change-Id: Ie0307ebc16d516463302773ef4226f2ba2dbd16c
2018-08-16 17:00:38 -07:00
Ed Sanders 20662e6dde Fix icons broken by OOUI update
Change-Id: I44edf30dc578787935c0052e8675bfde7fdd746d
2018-08-16 22:41:31 +01:00
Thalia 4a1d52ccb3 Show signatures in NWE visual diff
Parse document with pre-save transform for the diff.

Bug: T184166
Change-Id: Iffc9ed8ba88dcb55bef73f1708118663b0c38068
2018-08-16 21:45:28 +01:00
James D. Forrester 4755d7f1be build: Upgrade eslint-config-wikimedia to 0.7.2 and simplify config
Change-Id: Ib78c51a177b9f4b4764587232c7d32ffcfdd8aca
2018-08-14 11:02:20 -07:00
jenkins-bot 2270987788 Merge "ve.init.mw.MobileArticleTarget: Tweak toolbar items' height" 2018-08-14 17:03:48 +00:00
jenkins-bot ad675d06d7 Merge "Add Converter test cases for captions in images and gallery images" 2018-08-14 17:03:45 +00:00
jenkins-bot 2b43a24eea Merge "ve.init.mw.ArticleTarget: Skip prompt when switching to VE from NWE section editing if unchanged" 2018-08-14 16:09:49 +00:00
Bartosz Dziewoński 2512baa68e Add Converter test cases for captions in images and gallery images
Many of the details of the behavior don't really matter, but
I suppose it doesn't hurt to document them.

We really want to test two things:
* When converting from DOM to model data, a <mwImageCaption>
  or <mwGalleryImageCaption> is always generated, even if
  DOM has no caption.
* Model data that doesn't have <mwImageCaption> or
  <mwGalleryImageCaption> is nevertheless still valid and
  converting it to DOM doesn't fail.

Follow-up to Ie82fb339f6bd8ae1b289235bf5402490722d9a7c.

Change-Id: I0a10351e9c1589afbee76d8a85f869987de3de22
2018-08-14 11:02:09 +02:00
Bartosz Dziewoński 39208b7d40 Update VE core submodule to master (2859146e5)
New changes:
fa5d35054 Only re-use session token if docname matches
58d7cd280 Localisation updates from https://translatewiki.net.
d0716d8e7 Update files generated with new l10n language 'my'
2cc7a4423 Create unit tests for sequences
873fdd01e Upstream horizontalRule sequence and fix command

Local changes:
* Register unit test file for sequences
* Remove duplicate horizontal rule sequence

Change-Id: Ibc65cf5c086428bb0d13c8e2f2de5819e1e23d43
2018-08-14 09:20:07 +02:00
Bartosz Dziewoński 835b68db2a ve.init.mw.MobileArticleTarget: Tweak toolbar items' height
This padding needs to come out to an exact integer pixel value (14px),
otherwise things are off by less than a pixel and look ugly: F24664180

1em = 16px
0.875em = (14/16)em = 14px

Bug: T190596
Change-Id: Ieb292ed14e0b9205d15254667e97613fbf339260
2018-08-14 07:12:51 +02:00
Bartosz Dziewoński a387778ac3 ve.init.mw.ArticleTarget: Skip prompt when switching to VE from NWE section editing if unchanged
Bug: T136267
Change-Id: I30eae20baca2e16fa5f710485eab213edd5c4a08
2018-08-10 18:07:59 +00:00
jenkins-bot c0c94668c9 Merge "DesktopArticleTarget.init: always bind to #ca-edit" 2018-08-09 22:18:55 +00:00
David Lynch e99749aa80 DesktopArticleTarget.init: always bind to #ca-edit
Refactoring in 92c4e23 didn't account for the case where there are multiple
tabs and source mode isn't NWE, which caused the "edit source" tab to just be
a page- navigation that always discarded changes. onEditTabClick handles this
case fine, so just always bind the handler.

Bug: T199655
Change-Id: I3dca87a7a3b0ea88ef0008be89cd1f6007167916
2018-08-09 23:36:08 +02:00
jenkins-bot 083d436a4b Merge "Replace Bugzilla numbers with Phab numbers" 2018-08-09 16:03:32 +00:00
Ed Sanders 4ee09f75af Replace Bugzilla numbers with Phab numbers
Change-Id: I0e91d63b3872520b8f66002615967b2cfe235bf5
2018-08-09 15:11:27 +01:00
jenkins-bot 60982f3369 Merge "Include wpUltimateParam when switching from VE to source editor" 2018-08-08 20:23:16 +00:00
David Lynch 51beff9327 Include wpUltimateParam when switching from VE to source editor
Bug: T199554
Change-Id: I032f822a11840ca16687322bfa051418bc7e9c06
2018-08-08 21:50:59 +02:00
Ed Sanders efaf98d414 Wikitext surface getCaretPosition: Handle null ranges
Bug: T199484
Change-Id: Ica84a87c7cda7135c062f38d3f5b671d6dc3d049
2018-08-08 18:52:39 +00:00
jenkins-bot 9a3d759c00 Merge "Always generate empty wrapper paragraph inside image captions (slugs begone!)" 2018-08-05 18:23:05 +00:00
David Lynch 5dc09c5cd7 Add horizontal rule sequence (----)
Bug: T199925
Change-Id: I9f76e1e10ff8511252c3b9e5fbe7a9b94dade427
Depends-On: I7a41fa64f2b14ce58aca91feddc791b8648995d0
Depends-On: Ifb7bd4f75aeba38f3ae63fe6ba81cf7fe086461a
2018-08-01 19:28:14 +00:00
Bartosz Dziewoński 86f2057c81 Always generate empty wrapper paragraph inside image captions (slugs begone!)
While all of the following are valid in the model:

1. <mwBlockImage></mwBlockImage>
   Image with no caption. Must use the media dialog to insert one.
2. <mwBlockImage><mwImageCaption></mwImageCaption></mwBlockImage>
   Image with empty caption. There is a slug to insert a paragraph.
3. <mwBlockImage><mwImageCaption><paragraph></paragraph></mwImageCaption></mwBlockImage>
   Image with caption with empty paragraph. Nice and intuitive!

(Same for <mwGalleryImage> / <mwGalleryImageCaption>.)

The third option is the most convenient for the user. We should always
generate that when converting documents from HTML and from the editing
tools (MWGalleryDialog, MWMediaDialog/MWImageModel).

Previously, the editing tools generated option 2 if no caption text
was entered, and the converter generated option 2 if there was no
caption node or if it was empty. Curiously, option 1 was never used.

Wikitext for manual testing:

```
[[File:Foo.png|thumb]]
[[File:Foo.png|thumb|]]
[[File:Foo.png|thumb|Caption]]

<gallery mode="packed">
File:Foo.png
File:Foo.png|
File:Foo.png|Caption
</gallery>
```

Bug: T200387
Change-Id: Ie82fb339f6bd8ae1b289235bf5402490722d9a7c
2018-08-01 05:40:57 +02:00
petarpetkovic 50d556e8d2 Make link annotations more flexible
* When ve.ui.MWLinkAnnotationInspector is being initialized,
internal and external annotation inspectors are hardcoded to
new ve.ui.MWInternalLinkAnnotationWidget and
new ve.ui.MWExternalLinkAnnotationWidget. Make this creation
more flexible by creating these inspectors through a method,
which inheriting classes can override.
* In ve.ui.MWLinkAnnotationInspector.getAnnotationFromFragment,
factor out the creation of link annotations, so overriding
classes have the ability to provide different internal and
external annotations.
* In newFromTitle, static method of MWInternalLinkAnnotation,
creation of `element` isn't flexible for reusability with
slight changes to attributes passed to the constructor. By
factoring out the creation of attributes, inheriting classes
can reuse the existing structure and alter the attributes if
needed.

Bug: T195064
Change-Id: I2037464a7be77783837e9810691c8e372c8197c6
2018-07-26 15:12:19 +02:00
Bartosz Dziewoński 668ce071fa ve.ui.MWTemplateDialog: Prevent focus changes in the setup process
This is similar to the hack in ve.ui.MWMetaDialog, except uglier :(
We already explicitly focus the right field in the ready process.

I am not really sure why the focus change causes the issue, but
preventing it definitely fixes it. It would make sense if we changed
the value of the field after focussing it (as setValue() restores the
validity flag cleared by onFocus()), but we don't seem to do it.

Bug: T199838
Change-Id: Ia602551ee0b0885cefbd4cb2fc00d569ff42da67
2018-07-19 01:43:31 +02:00
Santhosh Thottingal 2eb493bfcf
ve.dm.MWInlineImageNode: Fix undefined data-mw in toDomElements output
Bug: T198941
Change-Id: I52c670dcc1a4dfe03c954b053d344c22e7b48a8d
2018-07-18 16:46:07 +05:30
jenkins-bot db8c585f11 Merge "Apply edit surface jQuery.makeCollapsible overrides to visual diffs too" 2018-07-18 06:36:55 +00:00
Bartosz Dziewoński fc91623b94 ve.ui.MWMediaDialog: Fix confusion between #getSetupProcess and #getReadyProcess
Follow-up to 13675e4a81.

Bug: T185944
Bug: T199841
Change-Id: I2bf08bc0a3684dbfdb9574ea6df0352e8d9d8fd7
2018-07-18 06:30:46 +02:00
jenkins-bot ffaab335ce Merge "Move some styles from mw.ArticleTarget to mw.Target" 2018-07-16 23:16:56 +00:00
Bartosz Dziewoński 13675e4a81 Fix confusion between #getSetupProcess and #getReadyProcess
The #getReadyProcess method should be used pretty much only to focus
a field inside the dialog after it is opened. It runs after the window
opening animation finishes, so if you add stuff to the window here,
that will be visibly delayed.

The #getSetupProcess method should be used pretty much for everything
else that depends on the opening `data`. It runs before the window
opening animation, so if you add stuff to the window here, it will be
visible while animating it.

Bug: T185944
Change-Id: I71ea5b6e1e1947c1cf8fd749100e854953a8ef3c
2018-07-11 23:47:55 +02:00
David Lynch 9d8d4255cc init.mw.ArticleTarget: make sure renderCategories preserves order
The linkCache fetch can push the categories out of order unless everything is
already in cache. As such, remember the initial order and enforce it after the
promises have resolved.

Bug: T197759
Change-Id: I9ea8d5e642f62c96475d0713f2c79258abb33b19
2018-07-10 12:30:30 -05:00
Ed Sanders f80b029444 Fix doc in GalleryDialog and add todo
Change-Id: I4e1ad8ec3d7a1c85a600bf1dafc449054c115203
2018-07-09 22:03:52 +01:00
jenkins-bot 1d17c089d5 Merge "init.mw.ArticleTarget: sort categories correctly in renderCategories" 2018-07-09 17:50:09 +00:00
David Lynch 71e42d50fe init.mw.ArticleTarget: sort categories correctly in renderCategories
I.e. don't sort them, because they're provided in source order and that's all
we need.

Bug: T197759
Change-Id: I3b9508ff49233ccfbeba1d111a6df9f29f0fc318
2018-07-09 09:25:41 -05:00
James D. Forrester 3c6ca93b92 build: Enable and make pass no-prototype-builtins
Including a spectacular whoops in MWGalleryDialog.

Change-Id: Id9863f6dc3701cb0df6684380fa5ecac4526d37d
2018-07-06 10:58:18 -07:00
jenkins-bot 097fb6a18f Merge "MWImageNode: Make 'mw' attribute optional again" 2018-07-05 20:17:33 +00:00
James D. Forrester ba3e5a3690 MWWelcomeDialog: Shrink the background image by 1/3 so the CTAs show
Bug: T191095
Change-Id: Id1fd76a37d02a9572cc29909409cd53e28ce0bb9
2018-07-05 20:04:57 +02:00
Bartosz Dziewoński b4456cc482 MWWelcomeDialog: Refactor splash image to allow resizing it
We relied on some white space baked into the background-image
to "reserve the space" for the text. If we tried to make the image
smnaller, the text would start overlapping it.

Remove 100px of vertical white space from the image files, adjust
the styles so that text is displayed below the image rather than
overlapping it.

Bug: T191095
Change-Id: I2f19128a2044b3505cdea93c3f587fe62553071d
2018-07-05 20:04:57 +02:00
Bartosz Dziewoński 55108aaf1b Apply edit surface jQuery.makeCollapsible overrides to visual diffs too
Bug: T194725
Change-Id: I8667dae42e652ef08910c861d22606f482d8f9cd
2018-07-05 16:09:13 +00:00
Bartosz Dziewoński 6db1fd41ef Move some styles from mw.ArticleTarget to mw.Target
They look like they should also apply to Flow, ContentTranslation, etc.

And apparently CollabTarget was already loading them separately.

Change-Id: I5c502f8e060968ecee67567747f29eb630cda718
2018-07-05 18:01:10 +02:00
jenkins-bot 67e4799d39 Merge "DesktopArticleTarget.init: Fix URI comparison if it contains a port number" 2018-07-03 23:16:33 +00:00
jenkins-bot 13e4f0bbd0 Merge "DesktopArticleTarget: consolidate edit tab behavior" 2018-07-03 22:27:42 +00:00
Bartosz Dziewoński 9ef039dd4b DesktopArticleTarget.init: Fix URI comparison if it contains a port number
If the wiki runs on a host that contains a port number, section edit
links would always reload the page, and the "Add section" tab would
not work.

As it happens, my local testing wiki runs on localhost:3080.

It is an unfortunate naming mishap:
* mw.Uri#host is equivalent to location.hostname
* mw.Uri#getHostPort is equivalent to location.host

In this case, we have to compare the port too, otherwise a setup (my
setup ;) ) where one starts up another wiki on localhost:3081 to test
cross-wiki features would fail.

Change-Id: Ib7de4ba3c3a84888f24186af03bd9dcced131051
2018-07-04 00:11:48 +02:00
Bartosz Dziewoński a247fd4e90 MWImageNode: Make 'mw' attribute optional again
It contains some rare options that we don't currently make editable,
and we don't set it when creating new image nodes.

We could change our code to always set it, and consider it required,
but that would theoretically be a break in backwards-compatibility.

Bug: T198660
Change-Id: I6e77cce257f733f0f8f6e896b967177ff01658c6
2018-07-03 21:03:46 +02:00
jenkins-bot e2132eeff5 Merge "ve.ui.MWTemplatePlaceholderPage: Avoid Firefox rendering issue" 2018-07-03 18:57:11 +00:00
Bartosz Dziewoński 5827b17ad0 ve.ui.MWTemplatePlaceholderPage: Avoid Firefox rendering issue
There is something about ActionFieldLayouts with `align: 'left'` (the
default) and no label that causes Firefox to render them differently
than we expect. I am not sure if the bug is in OOUI or Firefox, but it
is easily avoided by just using `align: 'top'` instead (it looks the
same, since there is no label, and it avoids the issue).

Bug: T198274
Change-Id: Ic6077e576b504e7a0cd761c8bac24d4079ae6702
2018-07-03 20:13:28 +02:00
jenkins-bot 43d5e767e8 Merge "De-duplicate and fix updating of file link in media dialog" 2018-07-03 17:27:37 +00:00
Ed Sanders 6bf9210abe De-duplicate and fix updating of file link in media dialog
Bug: T198565
Change-Id: I7d06d3316b317fb85edb9461080f5f2e5cd439fe
2018-07-03 17:59:43 +01:00
jenkins-bot 4a7e160d4f Merge "Fix window target when opening feedbackUrl" 2018-07-03 16:55:56 +00:00
Ed Sanders 452545fa2e Fix window target when opening feedbackUrl
'_new' should be '_blank', but '_blank' is also the
default, so just remove the argument.

Change-Id: I8f922b835b2bc14e5641e0ab29bf002b32301490
2018-07-03 17:36:35 +01:00
Ed Sanders f1b506bb6a Fix toolbar group names
Bug: T198583
Change-Id: I7b2e15dc65655bf048a02d9902a8f6e1c491edef
2018-07-03 14:23:21 +01:00
David Lynch 92c4e231f2 DesktopArticleTarget: consolidate edit tab behavior
What happens when an edit tab is clicked is spread across handlers in
DesktopArticleTarget and DesktopArticleTarget.init. Consolidating the logic
into the handler in DesktopArticleTarget.init makes it easier to understand.

It could be moved further into DesktopArticleTarget, but the init handler has
to exist to activate the target in the first place.

This patches a hole where clicking "edit source" while in visual mode would
sometimes not switch to source mode, because it didn't think it was changing
the current section.

Also, fix a typo in the documentation.

Bug: T198272
Change-Id: I12d958b6af1b9fa9aca68b498eb2a1a2d76b5a82
2018-07-02 16:17:15 -05:00
jenkins-bot 4c88fc7ef4 Merge "Pass page parameter for multipage file (PDF, DjVu) thumbnails" 2018-06-29 20:08:55 +00:00
jenkins-bot 611ef4ef1c Merge "Pass video thumbtime to thumbnail metadata request" 2018-06-29 20:07:42 +00:00
Ed Sanders 715d67b564 Pass page parameter for multipage file (PDF, DjVu) thumbnails
Bug: T182392
Change-Id: Ib3bc7b13f24493da27078631a41e9c08bcc6c0f4
2018-06-29 19:26:42 +00:00
Ed Sanders 5cdbc17899 Pass video thumbtime to thumbnail metadata request
Bug: T198150
Change-Id: Ic8895c359a92fcc60ac486e3daf86db02599d3ff
2018-06-28 15:52:50 +01:00
jenkins-bot 17041d3f07 Merge "Don't call Resizable constructor conditionally" 2018-06-27 21:49:31 +00:00
David Lynch 56a3aa9f01 Update link contexts with label info from core
Bug: T124305
Depends-On: Iad48fb559f3dae16cc0013791b79ec71308a1f9f
Change-Id: I341a15199bddb45e2cd8391b9b00c86e1c3a193e
2018-06-26 21:16:53 +00:00
Ed Sanders bb1d7271cd Pass content language in Accept-Language header to RESTBase
Bug: T198186
Change-Id: I2176f68f76fa462de0c1c2c47365de62fda4abe0
2018-06-26 16:42:35 +01:00
jenkins-bot 13fb253532 Merge "mw.DesktopArticleTarget: remove action=edit when tearing down as single-tab" 2018-06-25 17:59:14 +00:00
David Lynch 09a315ca69 mw.DesktopArticleTarget: remove action=edit when tearing down as single-tab
aeb4f2f2b7 added a #wpTextbox1 to the wikitext surface, which confused our
existing teardown check. This confusion only became apparent in single-tab
mode, when using the wikitext editor.

Bug: T197615
Change-Id: I98e64e7135aaf6f8fda441a91e6cbc4bac6cea39
2018-06-25 11:55:51 -05:00
jenkins-bot dfc78ad5df Merge "ve.ui.MWTemplateDialog: Prevent scrolling to top after removing a parameter" 2018-06-25 16:53:09 +00:00
jenkins-bot 1a0ea50bd6 Merge "If VE was opened on action=edit URL, redirect to view URL when closing" 2018-06-25 16:50:25 +00:00
Ed Sanders ac88166da1 Give up on realistic styling of mw-collapsible
Using display:inline causes the <p> to be destroyed
when empty.

Bug: T197987
Change-Id: Icfcb2ddc91e6793221608fac9f2995c6afeb4313
2018-06-23 14:17:21 +01:00
jenkins-bot 5d9f90ea46 Merge "Follow-up I213bd946f: Correct URL of Parsoid HTML profile" 2018-06-22 17:49:17 +00:00
C. Scott Ananian 83918e735a Follow-up I213bd946f: Correct URL of Parsoid HTML profile
The URL for the HTML profile used by Parsoid changed after 1.2.x, but
it was never updated in VE.

Change-Id: Id4ab8567dc907b71e790a04ab10044c1e081c8ce
2018-06-22 10:27:00 -07:00
Bartosz Dziewoński 37e349913e If VE was opened on action=edit URL, redirect to view URL when closing
We already do it after save, but not if the editor is closed without
saving.

This behavior is a bit awkward for non-existent pages (redlinks),
since MediaWiki normally doesn't display them in view mode (all links
point to action=edit). But this seems less weird than not allowing the
editor to be closed.

Bug: T122388
Bug: T168338
Change-Id: Id9ee41356f011dfbfa6e8744b8d9076f8eacaf39
2018-06-22 01:10:11 +02:00
jenkins-bot fbb83cc391 Merge "Update VE to request Parsoid HTML v1.7.0" 2018-06-21 22:31:25 +00:00
C. Scott Ananian a13b8ae178 Update VE to request Parsoid HTML v1.7.0
The seasons change, and so do Parsoid HTML specifications...

Change-Id: I213bd946f6f1547f76a4ea352c7cb083ebadd602
2018-06-21 16:41:02 -04:00
Bartosz Dziewoński b51707d96f ve.ui.MWTemplateDialog: Prevent scrolling to top after removing a parameter
Bug: T180151
Change-Id: I063c53fa572e998f5b34fc895d02fe1a74026c6e
2018-06-21 20:45:06 +02:00
Ed Sanders efcea82c9c Follow-up I348b8522: Fix context variable
Bug: T197762
Change-Id: Ife163e1666ec43ecbb21099a9342960615c573d8
2018-06-20 19:50:39 +01:00
jenkins-bot 0b3b229c16 Merge "Add MW-specific DiffElement tests" 2018-06-20 18:47:54 +00:00
Ed Sanders 534b3d66cb Update VE core submodule to master (a1fd90540)
New changes:
71baf1c02 Create an 'htmlMsg' function for HTML messages with HTML or DOM arguments
9a7af223e Use ve.htmlMsg to highlight values in attribute changes
a1fd90540 DiffElement: Refactor describeChanges tests

Local changes:
Implement getHtmlMessage in mw.Platform and use for DiffElement

Bug: T195243
Depends-On: Ib4ad16858e4241d33d018830dbcfded63ff703af
Change-Id: Ib5fa39e4f2f529948354b03a141542e23d169fe0
2018-06-20 12:53:43 +02:00
jenkins-bot bbc55bcdba Merge "Replace deepEqual with strictEqual for non-objects" 2018-06-20 08:35:20 +00:00
Ed Sanders b6d03da278 Add MW-specific DiffElement tests
Change-Id: If3dfa660b49bceef2da8dc7ec113225aaa7f59f5
Depends-On: Ib4ad16858e4241d33d018830dbcfded63ff703af
2018-06-19 16:04:08 +01:00
Ed Sanders 6e03492011 Replace deepEqual with strictEqual for non-objects
Change-Id: I0a89092f2c57a4c2348c4231fdfea1c2c520fc10
2018-06-19 16:00:28 +01:00
David Lynch 814e26f1e9 DesktopArticleTarget: view click handler should only run for active target
Not checking this results in handlers blocking click actions for "read" after
the teardown of the target.

Bug: T197445
Change-Id: I3a962c66c82a0e48ca54bf2f0b822a9a005da54c
2018-06-18 20:45:52 -05:00
jenkins-bot 96c1836248 Merge "ve.init.mw.DesktopArticleTarget: Only change document title on activate" 2018-06-15 21:56:13 +00:00
Bartosz Dziewoński e484522161 ve.init.mw.DesktopArticleTarget: Only change document title on activate
Previously, we changed it on every load, which also occurs when
switching editor modes. That caused it to not be restored when editor
was closed.

Bug: T197490
Change-Id: Icb20c38309fd440553d5245d865b05145542313f
2018-06-15 22:10:25 +02:00
jenkins-bot 4f98d3bfb6 Merge "Check for normalized and converted titles in ve.init.mw.ApiResponseCache" 2018-06-15 19:44:42 +00:00
petarpetkovic 86615fcedc Check for normalized and converted titles in ve.init.mw.ApiResponseCache
Besides redirects, API can return from-to title pairs for normalized and
converted titles, as well.

Currently, doing an API query on eswiki for page info (prop='info' in params)
with titles='User:Title' returns normalized title 'Usuario:Title'.

processResult() method in ve.init.mw.ApiResponseCache.prototype.processQueue
sets page.title ('Usuario:Title') in cached results, and the promise for
actual queried title ('User:Title') gets rejected in rejectSubqueue() method.

Change-Id: I33fd4640b6eac8018e35c6fe21234f4c469dd97d
2018-06-15 21:27:31 +02:00
jenkins-bot a6ae8424f7 Merge "Use WindowAction to open the wikitext paste dialog" 2018-06-15 15:46:44 +00:00
jenkins-bot e8c6b90a72 Merge "MWLanguageVariantInspector: Use 'title' config option instead of 'iconTitle'" 2018-06-14 22:51:41 +00:00
Bartosz Dziewoński 4ee35de02a MWLanguageVariantInspector: Use 'title' config option instead of 'iconTitle'
This way the tooltip is shown on the entire button, rather than only
on the icon. One should only use 'iconTitle' to display a different
tooltip on the icon than on the rest of the widget.

I think this was caused by bad documentation in OOUI, which I'm fixing
in I967d9b78014b3754720e80da9c4785124fffc2ba.

Change-Id: I8cc99bcfca56b80a8c8aff609ba48eb3f9c5ed7f
2018-06-14 22:45:18 +00:00
Ed Sanders b340f526e3 Use WindowAction to open the wikitext paste dialog
This adds in missing functionality, such as deactivating
the surface selection while the dialog is open.

Change-Id: I0d8652a989504a35e5c235224b0ef924b6dcbeed
2018-06-13 13:28:15 +01:00
Ed Sanders 6cad6f603d Don't call Resizable constructor conditionally
Change-Id: I3b5caf81b691aebcd50d3339a42bbaf4fe880fac
Depends-On: I19e63c89fa54f8f4bf1ad6795b8b281c4ad4576a
2018-06-12 17:18:12 +01:00
jenkins-bot 6876f6d489 Merge "Move module pre-loading from DAT.init to ArticleTarget" 2018-06-11 17:55:21 +00:00
jenkins-bot 59e59a5fdf Merge "VisualDiff: Don't compare images with different src's" 2018-06-11 17:44:48 +00:00
jenkins-bot 4e17f2f131 Merge "Follow-up Ifdc951f: Don't use getLocalApi when VE not available" 2018-06-10 22:39:29 +00:00
jenkins-bot 7890f70d76 Merge "Minor code style fix (move semi colon)" 2018-06-10 22:38:18 +00:00
jenkins-bot 17d013f520 Merge "Never store ve.debounce in prototype" 2018-06-10 22:36:23 +00:00
Ed Sanders 6459de6978 Move module pre-loading from DAT.init to ArticleTarget
This makes this feature available on Mobile as well.

Change-Id: I26a2af63b3665f5563f8562f1a8e94287cad439f
2018-06-10 16:07:44 +01:00
Ed Sanders 6cc83781a3 Never store ve.debounce in prototype
This essentially creates a static debouncer, so if you have
multiple instances calling that method at the same time, only
one of them will fire.

Change-Id: I4c257b557e87f5638b459811655a14b8625de2e3
2018-06-10 16:00:37 +01:00
Ed Sanders 000559c790 Minor code style fix (move semi colon)
Change-Id: I00f635203c4fc58454aefa8840f0b204e1480c53
2018-06-10 15:59:26 +01:00
Ed Sanders e88cd81f94 Follow-up Ifdc951f: Don't use getLocalApi when VE not available
These popups on used on the 2010 wikitext editor as well, so
we can't use ve.init.target.

Change-Id: I7d4e97566dde10146893089427f95c0b598ef4bc
2018-06-10 14:14:23 +01:00
Bartosz Dziewoński 6840ac4dd1 ve.ui.MWSaveDialog: Remove unnecessary margin after last checkbox
Patch proposed on T196375 by Jack_who_built_the_house.

Bug: T196375
Change-Id: I30548650eab3d14e7c0de29c954ededcfa44648a
2018-06-08 09:57:01 +00:00
jenkins-bot c04e934361 Merge "Simplify conversion of images" 2018-06-07 20:51:51 +00:00
jenkins-bot 1dc8d5db51 Merge "Add preview mode converter tests" 2018-06-06 21:28:19 +00:00
jenkins-bot 5e45047fe0 Merge "Fix parsing of external links, now Parsoid adds 'external' classes" 2018-06-06 21:28:10 +00:00
jenkins-bot ef0f1db361 Merge "eslint: Move qunit env flag to test config" 2018-06-05 21:11:49 +00:00
Ed Sanders 7dbc4c7140 eslint: Move qunit env flag to test config
Change-Id: I290c436b25e306a3657324304ded08011ffcea7a
2018-06-05 21:12:56 +01:00
jenkins-bot cb62540fac Merge "eslint: Enable qunit/no-assert-equal,no-early-return,no-negated-ok" 2018-06-05 20:11:46 +00:00
Ed Sanders b668286e9b eslint: Enable qunit/no-assert-equal,no-early-return,no-negated-ok
Change-Id: I6a202a496ba9359c63febf623ef8b4dd3caa47dd
2018-06-05 20:41:39 +01:00
Ed Sanders dee50b778c MWTransclusionNode: Remove old createInvisibleIcon override
Bug: T196479
Change-Id: I99aab2e0eee3274305a6877263414ce21049fa5b
2018-06-05 18:50:14 +01:00
Ed Sanders b79c98f1e3 Simplify conversion of images
Assume that images provided by Parsoid will adhere to the DOMspec.

Change-Id: I52eb4f27e6b1e1cd092133c3e27e42021ae83783
2018-06-05 13:05:40 +01:00
Ed Sanders 98ec3947a9 Add preview mode converter tests
Change-Id: I58a2c9a9e8fd0bf8254819b960c5a5ad8190f643
Depends-On: I3f1a4772cbf67091b5fd52bab610390ebd9b16ef
2018-06-04 19:00:34 +00:00
Ed Sanders bb6cd33821 VisualDiff: Don't compare images with different src's
Bug: T196343
Change-Id: I99ddce806e044ca427bf01b41d164c89dd2e15fd
2018-06-04 18:49:18 +01:00
Ed Sanders a7049dacea Update language variant node to use new invisible icon API
Bug: T195887
Depends-On: I4eab7b9edf04454ef1a62535656b179480c3054b
Change-Id: I655757b13514e8ff89c312dcc2e1147d188a2718
2018-06-04 17:34:22 +00:00
jenkins-bot 6594055882 Merge "Paste conversion dialog shouldn't be escapable" 2018-06-04 16:44:39 +00:00
David Lynch d3fd979d3b Paste conversion dialog shouldn't be escapable
It doesn't have a "cancel and do nothing" route to fall back on, so pressing
escape does the non-progressive action, which is to paste-as-wikitext rather
than paste-as-plaintext. Neither of these is really an intuitive outcome.

Change-Id: I786b6fc87e3cdf3bb50898a070a15a353a242848
2018-06-04 11:16:19 -05:00
Santhosh Thottingal b049a82e8d
ApiResponseCache: Add a check for data.query before accessing redirects
Follow-up: If4f8c9b6719c123b31d852eb71f06a79cc0f7917
Change-Id: I5f1814f341ce401fcb3926487a2cea276698bca0
2018-06-04 13:50:27 +05:30
Ed Sanders cb36c6ded3 Fix parsing of external links, now Parsoid adds 'external' classes
Bug: T196025
Bug: T188656
Change-Id: I89b8ba378108bde6c8db0144ed306cbc8471111b
2018-06-01 08:47:46 +00:00
Timo Tijhof 21f526bffe mw.trackSubscriber: Remove action.init.timing value
In Schema:Edit, all action timing durations (ready, loaded, saveAttempt etc.)
are defined as "time since the editor was initialised", which is internally
stored as the timestamp for the "init" action.

The 'init' action itself does not have a timing duratation, but the Edit schema
has a special case for it, definining it as "time since the page was loaded".

In actually, it isn't actually implemented as "time since the page loaded",
and I suspect that as such, this value is probably not used by EventLogging
consumers of the Edit schema. Or, it might be used, but doesn't represent
what the consumers think it does.

Presently, it uses the init time now() - mediaWikiLoadStart, which basically
means the time between the random point at which MediaWiki core JavaScript
finished executing which is quite variable in practice due to the race between
<script async> and browssing parsing/rendering of HTML. That is by design,
and is also why mediaWikiLoadStart is undocumented and internal, and actually
in the process of being removed.

After many iterations on this patch to try and approximate an alternative to
this undocumented variable, I came up with an alternative approach with DLynch
at the Hackathon, which is to simply not record this one timing value, but
preserve the behaviour of all the other timing values exactly as-is.

That is, keep the behaviour of storing `now()` as "init" when the editor
activates, and keep the behaviour of substracting "init" from all other action
times, but only don't report "init" itself to EventLogging (given its value
would be 0, which isn't useful).

Bug: T160315
Change-Id: I778234efe40dde8ff30333339335be1c3910a4e0
2018-05-31 18:27:12 +00:00
jenkins-bot 725adb2ae3 Merge "Disconnect surface model history listener when tearing down" 2018-05-31 00:23:37 +00:00
jenkins-bot 47fab2753b Merge "DesktopArticleTarget: Section-scroll as part of restoring the page" 2018-05-30 22:03:49 +00:00
Ed Sanders a7f5a76bca build: Introduce eslint-plugin-qunit
Change-Id: I0a169916eaf260500ca6a172e6fb2b0c61f8d422
2018-05-30 21:04:02 +01:00
jenkins-bot 083d2aa588 Merge "ApiResponseCache: Support redirects data processing" 2018-05-30 16:53:07 +00:00
Ed Sanders 4f456b143e Disconnect surface model history listener when tearing down
Bug: T195775
Change-Id: I6f6fe654dc190d7d891d3ac346bf3f4b2f426947
2018-05-28 18:30:07 +00:00
Ed Sanders 9386d54be9 Fix template param diff when value is empty string
Bug: T195764
Change-Id: I0bd5fe71996a2ffeaa201e549f8515439c07996d
2018-05-28 14:56:53 +01:00
David Lynch d3824dee76 DesktopArticleTarget: Section-scroll as part of restoring the page
We were scrolling to the edited section when we saved the page, and otherwise
reverting scroll position to the top if we just abandoned the edit. This
unifies these cases, so any section-edit which leaves the editor will scroll
to the section being edited. (If section==new and the edit is abandoned, it'll
scroll to the last section on the page.)

Bug: T194631
Change-Id: Ic2aca68b3127c435545644912b96212bcfa6648d
2018-05-25 16:30:22 -05:00
Santhosh Thottingal 27d0634abf
ApiResponseCache: Support redirects data processing
If the mediawiki Api pass redirects as true, the response will have
redirect data. ApiResponseCache ignores it now. This commit adds
support for processing that and set in the cache.

Change-Id: If4f8c9b6719c123b31d852eb71f06a79cc0f7917
2018-05-25 12:06:09 +05:30
jenkins-bot c52be40555 Merge "MobileArticleTarget: Include placeholder for references" 2018-05-24 17:30:48 +00:00
jenkins-bot 6c90442326 Merge "ce.MWWikitextSurface: ask on paste about wikitext conversion" 2018-05-24 17:21:07 +00:00
David Lynch 4d5fc16a9a MobileArticleTarget: Include placeholder for references
Cite's a08febb0afa2d changed the rules for adding the Cite button to the
toolbar – it now requires a placeholder slot in the toolbar, rather than
finding the link tool and adding itself after that. As ve.init.mw.Target
was updated for this it kept working on desktop, but MobileArticleTarget
completely overrides the toolbar, and was missed.

Bug: T195191
Change-Id: I55c9de9e736bb83f5f05028f2fc07af0ad996050
2018-05-24 17:18:50 +00:00
jenkins-bot 504f712ebc Merge "Only apply toolbar negative margins on vector" 2018-05-23 17:05:22 +00:00
David Lynch 4d263afaa2 ce.MWWikitextSurface: ask on paste about wikitext conversion
Throw a dialog box up to ask whether to convert something with formatting to
wikitext, or downconvert it to plain text.

This logically depends on Ie9aaaa59e9dfa138d394051fe491573253df1805.

Bug: T190079
Change-Id: I6afbbe303d1506426109e75c95f6be546ec48536
Depends-On: Ie9aaaa59e9dfa138d394051fe491573253df1805
2018-05-23 08:08:22 -05:00
Ed Sanders ccb766e933 MWSaveDialog: Fix typo in no-categories branch
Bug: T195323
Change-Id: I7d22b6cad363a240660563554e4578621f7966d0
2018-05-23 11:18:54 +01:00
Ed Sanders bb0d3471df Only apply toolbar negative margins on vector
This fixes toolbar placement in minerva-desktop.

Change-Id: Ifbd869cb70da9bb4db7c72ad89f696a080d18847
2018-05-22 21:25:33 +01:00
jenkins-bot ffaa4f2170 Merge "DesktopArticleTarget: on escape close toolbar dialogs first" 2018-05-20 16:55:02 +00:00
jenkins-bot 99bff72a6a Merge "$.isEmptyObject -> ve.isEmptyObject" 2018-05-20 11:09:50 +00:00
Ed Sanders f5d1f6c595 Make options actually optional as documented
Change-Id: I42bb8e594a9ea8002938e68109d11488aef8883c
2018-05-20 12:53:19 +02:00
Ed Sanders eb70a1c371 $.isEmptyObject -> ve.isEmptyObject
Change-Id: I309337fcffce7b1759bfca32215461171e869c5c
2018-05-20 12:00:09 +02:00
jenkins-bot 45c39da455 Merge "MWSaveDialog: Display of limit behavior unified with old editor" 2018-05-19 20:10:52 +00:00
David Lynch c76c41f3dc DesktopArticleTarget: on escape close toolbar dialogs first
Pressing escape will close toolbar dialogs (find/symbols/etc) if they're open
instead of trying to teardown the editing surface.

Bug: T190068
Change-Id: I27080649392f17344c901269029368fa0b3c2963
2018-05-19 19:29:34 +02:00
David Lynch 110fdf1fcb MWSaveDialog: Display of limit behavior unified with old editor
T190570 (I54d75ab6061de0de79b7a8112eb859a4c8a5e22a) changed old editor's
display of the limit to only show when there's <= 99 remaining. Bring same
behavior into this dialog.

Bug: T194458
Change-Id: I7f6fd7ee95348c39b107131a7e297d158a07c00e
2018-05-19 19:09:57 +02:00
Ed Sanders ccfd46bbd7 Use same padding across skins for external links
Change-Id: Ide98ae75eb39bf87d83d64c5ec075a0b58665099
Depends-On: I7eaf0756d4d58c0f902238b48176334689f3c704
2018-05-19 11:34:43 +02:00
Ed Sanders 7c2b61ce38 Follow-up I2a49315d0: Fix right padding of active external links
Change-Id: If8fa88b824d67b76f8545f1f58ef84365a501fa7
2018-05-19 11:33:17 +02:00
jenkins-bot 9b8a859350 Merge "MWInternalLinkAnnotation: test fragment behavior" 2018-05-18 19:22:40 +00:00
David Lynch 300d5ec486 MWInternalLinkAnnotation: test fragment behavior
Bug: T194463
Change-Id: I08d587c4e4cd12b1362915a22b37d9a0224de198
2018-05-18 20:55:35 +02:00
jenkins-bot 6cc9e81238 Merge "dm.MWInternalLinkAnnotation: account for ? in fragment" 2018-05-18 18:48:16 +00:00
jenkins-bot 3999f76346 Merge "Use ve.ce.nodeFactory.createFromModel" 2018-05-18 18:27:31 +00:00
jenkins-bot e0e8f84322 Merge "Use CE rendering for invisible templates" 2018-05-18 18:27:29 +00:00
David Lynch 909aecbd26 dm.MWInternalLinkAnnotation: account for ? in fragment
It was failing to properly ignore the fragment if it contained a ?. This
resulted in such fragment-selflinks being considered a link to a wikipage with
a title of their full URL. As such, only consider the pre-# section for ?s.

Bug: T194463
Change-Id: I205f86d2b4abcf91dd6a84e3013e899e953a6842
2018-05-18 19:58:21 +02:00
jenkins-bot a47b78e18c Merge "Update VE core submodule to master (1d341ca7d)" 2018-05-18 15:37:04 +00:00
James D. Forrester 9e52ece21f Update VE core submodule to master (1d341ca7d)
New changes:
3a6d868bf Separate (Comment/Link)InspectorTools into separate files
cb5d36e32 Localisation updates from https://translatewiki.net.
c75491b16 build: Extend 'svgmin' options and amend
ddef270d9 Genericise activeLink behaviour to any annotation
d13d44e12 Create simple comment annotation type for rebaser.
7e49a1f33 Add getters for author properties
1d341ca7d Follow-up I16942623d: Only filter inactive models if they are 'canBeActive'

Local changes:
Change .ve-ce-linkAnnotation-active > .ve-ce-linkAnnotation.ve-ce-annotation-active

Bug: T185596
Change-Id: I2a49315d01aa075373f9b5f0d8802a7e7dd4dca3
2018-05-18 17:07:28 +02:00
jenkins-bot 60ef3af0b1 Merge "Fix position of inspectors/context inside dialogs" 2018-05-18 14:55:01 +00:00
jenkins-bot b899759edc Merge "MobileArticleTarget: fix deprecated toolbar calls" 2018-05-18 14:54:59 +00:00
Bartosz Dziewoński dfe65db5bb Fix position of inspectors/context inside dialogs
Override #addSurface instead of #getSurfaceConfig, so that the
$overlayContainer option only applies to the "main" surface of the
Target rather than all of the surfaces (including those in
TargetWidgets).

Bug: T194433
Change-Id: I61c609e2d52814b4547fb5292a0bfb237c4c218f
2018-05-18 14:26:00 +00:00
David Lynch 150fb16008 MobileArticleTarget: fix deprecated toolbar calls
Change-Id: If7d4b52c29e9648f17eda2d62f8fcdad744f82ae
2018-05-18 15:59:15 +02:00
jenkins-bot c80c2d1723 Merge "Fix ve.ce.MWTransclusionNode#filterRendering to work with non-element nodes" 2018-05-18 12:05:33 +00:00
Ed Sanders ed604c857d Fix ve.ce.MWTransclusionNode#filterRendering to work with non-element nodes
Bug: T194839
Change-Id: I90065720725e8b59bfe4a4a9215b3835179cb2d1
2018-05-17 19:19:40 +01:00
jenkins-bot a975aacbe7 Merge "CategoriesPage: Remove unnecessary input widget width" 2018-05-16 22:06:14 +00:00
Ed Sanders 70cd11e32d CategoriesPage: Remove unnecessary input widget width
Change-Id: I7fa38b866d0489de612b0ed08cf0b9eb3b9b71af
2018-05-16 18:04:08 +01:00
Ed Sanders 9b8e501333 MobileArticleTarget: Show both edit modes in edit switcher, for consistency
Change-Id: I48193db0d8282e31265e95884878eb81cbaeeedd
2018-05-16 15:20:25 +00:00
jenkins-bot c5a6e54dde Merge "Simplify valign code with a loop" 2018-05-16 09:49:06 +00:00
jenkins-bot d70ddfb85a Merge "Use better align change descriptions" 2018-05-16 09:49:05 +00:00
jenkins-bot cf0fd3e673 Merge "Fix typo in API call for version number help" 2018-05-16 09:37:26 +00:00
Ed Sanders 63c698823c Fix typo in API call for version number help
Change-Id: Idcea9d74e27e33930d98d2b896ee08012e46e8f3
2018-05-16 10:23:39 +01:00
jenkins-bot 4ca3f1661d Merge "ArticleTarget: Change rendering of category preview" 2018-05-15 13:28:57 +00:00
Ed Sanders 3c1ef8cff8 Simplify valign code with a loop
Change-Id: I90cc74d19b46ea2f5a603b1fd39393debefc8e7c
2018-05-15 11:57:41 +00:00
Ed Sanders 7254fbe2cf Use better align change descriptions
Adds support for align=none.

Also don't show changes from class names.

Change-Id: Ia00a51dd52af73183e98c8a87f4c60ee5380d81f
Depends-On: Ic668454c4b4b069dab46a608530c85a5bb7e7ad8
2018-05-15 11:57:33 +00:00
David Lynch 5d19272aa1 ArticleTarget: Change rendering of category preview
Just generate the standard wiki skin markup for categories. Adjust linkcache to always know
whether links are hidden categories. (It previously knew *sometimes*,
depending on whether a MWCategoryWidget had interacted with that category.)

Make the save dialog preview use the same method as the bottom-of-editor preview.

Bug: T194092
Change-Id: I37fea15eaef0a5847f27ce41dd92370a4bf353b6
2018-05-13 16:40:59 -05:00
Ed Sanders 900b74e9a9 Update VE core submodule to master (14bcc9256)
New changes:
14bcc9256 Give toolbars groups names

Local changes:
Give toolbars groups names

Also create an empty placeholder group for reference tools.
This allows targets to specify if they should show them.

Depends-On: Iccaf35cf941cb47ad55e8d98373461f5eaff5fed
Change-Id: I0bace5e5fe05f9c214d57a74c478b48a7dcaec3b
2018-05-13 18:09:33 +01:00
Ed Sanders d7d4eb3126 Use ve.ce.nodeFactory.createFromModel
Change-Id: I1a826c3c0985ef0d8ad0b669886e29aa021c90c1
Depends-On: I259face33154b795143c8820abdfb6b4a495f141
2018-05-11 17:05:09 +00:00
Ed Sanders c2e16186a0 Use CE rendering for invisible templates
Bug: T170107
Change-Id: I7bce9e7b77ce22953bb0141d81871b53a4f005db
2018-05-11 17:05:03 +00:00
Ed Sanders 60e129062a Add missing mw-content-(dir) class to MWPreviewElement
Also allow preview elements to existing with an mw-body-content
area withouth the font size being applied twice.

Depends-On: Ibbf989dcebf2d21fd2ac481f17062f366ff29e41
Change-Id: I284bcd5dd25cdbb883427ebacb41af1bbf50b60f
2018-05-11 16:59:12 +00:00
jenkins-bot e8c4bf2cd3 Merge "ve.ce.MWTableNode: Compatibility with new jQuery.makeCollapsible toggle styles" 2018-05-10 21:48:24 +00:00
Bartosz Dziewoński deabd6bd51 ve.ce.MWTableNode: Compatibility with new jQuery.makeCollapsible toggle styles
jQuery.makeCollapsible styles now display "fake" expand/collapse
toggles. This is nice, but some bits and pieces clashed with our
styles, this fixes it.

Also ensure that the styles are loaded if the page previously had no
collapsible elements on it.

Bug: T194323
Change-Id: If8f0869e6677811147f272337da7d96286792fe0
2018-05-10 21:41:31 +02:00
jenkins-bot d3f3015a60 Merge "Restore CSS for diffslider lines" 2018-05-10 16:09:06 +00:00
Ed Sanders ae9560aacd Restore CSS for diffslider lines
Bug: T193839
Change-Id: If32a6be33f6c8c9f4413a81f561009214fa39df6
2018-05-10 16:38:50 +01:00
Bartosz Dziewoński 73a77b60ed ve.init.mw.DiffPage.init: Detect extra diff header rows
Bug: T193925
Change-Id: I117871bef0f1ecf1ce0ba9762047c926a1e723eb
2018-05-08 22:05:46 +02:00
jenkins-bot 6ad3c408b2 Merge "Add comment to htmlBlacklist item" 2018-05-08 16:10:27 +00:00
jenkins-bot 821e7ec828 Merge "Remove some no longer required CSS from switch popup" 2018-05-08 16:10:26 +00:00
Ed Sanders b5371c791f Add comment to htmlBlacklist item
Bug: T150418
Change-Id: I0c48ff6f187cde4c378e5aa193e62d107bc7919c
2018-05-07 21:49:34 +01:00
Ed Sanders 86fdda21c6 Remove some no longer required CSS from switch popup
Change-Id: Ic965c147b195b4546f8f1e7d36395c96597a159e
2018-05-07 21:35:24 +01:00
Ed Sanders 5974c59b97 Follow-up Ifdc951fdc: Don't use target when it doesn't exist
Change-Id: Idf546f7b1d2c12f59b5024f3365665214e4e5f49
2018-05-07 21:22:09 +01:00
jenkins-bot 7bca14c182 Merge "Add an 'api' parameter to ApiResponseCache" 2018-05-07 15:53:18 +00:00
jenkins-bot 5722a3c59f Merge "Remove references to global singleton inside LinkCache" 2018-05-07 15:53:01 +00:00
jenkins-bot 93c1f0d9b4 Merge "Create an MWSurface and move langChange handling there" 2018-05-07 15:52:08 +00:00
jenkins-bot 95d831c2de Merge "Create getters for localised APIs (getContentApi/getLocalApi)" 2018-05-07 15:51:45 +00:00
jenkins-bot 9a79c10fc2 Merge "Remove unused overrides in internal link annotation inspector" 2018-05-07 15:41:33 +00:00
jenkins-bot 25d2eb2848 Merge "Use ve.resolveUrl in MediaContext/Dialog" 2018-05-07 15:28:52 +00:00
Ed Sanders b980150df4 Update link cache to use new descriptions API
Bug: T191333
Change-Id: If1e7f50208a44bda6c30ff1d6c60a085f9da74e7
2018-05-07 15:59:02 +01:00
Ed Sanders 4b00c765ff Add an 'api' parameter to ApiResponseCache
Change-Id: Ie68b70472447a4bb2c9be8ed505a91f24858059d
2018-05-07 11:53:23 +01:00
Ed Sanders 5eb89cdc51 Remove references to global singleton inside LinkCache
Use 'this' instead.

Change-Id: Ie3138f2c62ff4e4938e8ed21e79b3433d98e2737
2018-05-07 11:53:23 +01:00
Ed Sanders 8bddec44e3 Create an MWSurface and move langChange handling there
Change-Id: I8a75b5f431f454b66441fc301b90e5f28636612e
2018-05-07 11:53:23 +01:00
Ed Sanders 478b0bcbb9 Create getters for localised APIs (getContentApi/getLocalApi)
Pass through the current document when available, otherwise
assume the current surface's document.

Also add a getter for getPageName, so that can vary based
on the target document.

Bug: T193856
Change-Id: Ifdc951fdc6a43b924d102e3fcd7e59e52023757b
2018-05-05 14:32:55 +01:00
Ed Sanders b54f427078 Remove unused overrides in internal link annotation inspector
Removes an unused call to mw.util.getUrl.

Change-Id: I3988311b7160af628ea4ceeafcfdc3cc0a7a3774
2018-05-05 14:32:55 +01:00
Ed Sanders 3b4923fa74 Use ve.resolveUrl in MediaContext/Dialog
Change-Id: I53e28d6cec13ac77718ba3cae425c4c43c96e174
2018-05-05 14:04:15 +01:00
jenkins-bot 1f6cf4883d Merge "ve.init.mw.DesktopArticleTarget.init: Edit the latest revision when viewing a FlaggedRevs-stable one" 2018-05-05 01:03:04 +00:00
Bartosz Dziewoński 192a232410 ve.init.mw.DesktopArticleTarget.init: Edit the latest revision when viewing a FlaggedRevs-stable one
When the user is viewing the last stable revision of a page which has
newer unreviewed revisions, FlaggedRevs wants us to open the latest
(unreviewed) revision of the page for editing.

Use the JS config variable 'wgFlaggedRevsEditLatestRevision', provided
by FlaggedRevs since change I4c9804fe2c4924e28770807881379ddca4fd8b76.

Also add an extra comment about loading latest revisions in general.

Bug: T165283
Depends-On: I4c9804fe2c4924e28770807881379ddca4fd8b76
Change-Id: Ic47491e690153d0ad87ce64bfc9e7a28a06fc6e2
2018-05-04 22:04:02 +00:00
jenkins-bot 829089008f Merge "DesktopArticleTarget: track mwedit.ready even if skipping temp editor for new sections" 2018-05-04 21:59:27 +00:00
Ed Sanders ebcf1e1151 Check imageModel exists in #checkChanged
Bug: T193879
Change-Id: Ic6eda7a056e5207042b575609b9da1869e3a759e
2018-05-04 14:52:03 +01:00
David Lynch 3f91a27809 DesktopArticleTarget: track mwedit.ready even if skipping temp editor for new sections
Bug: T193206
Change-Id: I78555b84bde3d5bd14b032862e5a020121fc5c2e
2018-05-02 11:35:42 -05:00
Ed Sanders e49b5628d8 MWBlockImage: Make zoom link unclickable
As it sticks out beyond the focus shield we
need to disable it manually.

Change-Id: I92baf24e6bb9294e46821311805ca0bb77f892a6
2018-05-02 11:57:33 +01:00
jenkins-bot f9cac9f0ce Merge "ve.init.mw.DiffPage.init: Do not duplicate diff table header" 2018-04-30 21:26:55 +00:00
Ed Sanders 3dd3073bd2 Update VE core submodule to master (a8e0eef6d)
New changes:
a8e0eef6d Simplify usage of dummy target

Local changes:
Simplify usage of dummy target, ceating an MWDummyTarget, extending
DummyTarget instead of mw.ArticleTarget.

Depends-On: I01a6860387087db8149c73793e9bd4294d33aea8
Change-Id: I227486159fe416c219e2c37a1d054201084fe285
2018-04-30 13:05:02 -07:00
Bartosz Dziewoński 6d4a7f932e ve.init.mw.DiffPage.init: Do not duplicate diff table header
The duplicate header, especially the duplicate elements with identical
IDs, were difficult to handle for other scripts.

Now instead of hiding the entire wikitext diff, we only hide the
"content" rows but keep the header, and adjust our attributes on the
header back-and-forth when switching diff modes.

Bug: T192755
Change-Id: I3a6bb4730fefd81f533b786ec3b20241c4cb8d13
2018-04-30 19:23:16 +02:00
Ed Sanders 1bd430c9d1 Convert most uses of isForClipboard to doesModeNeedRendering
Depends-On: I0f1b90056e9d1a4fa0e188700604709297593924
Change-Id: I6fa1cde51ffc859b57ab557e3ddf8a76d92bf94f
2018-04-30 16:10:27 +00:00
jenkins-bot ffac6b14dd Merge "Check link 'host' in onEditSectionLinkClick" 2018-04-30 15:17:45 +00:00
jenkins-bot f4f78d3384 Merge "Follow-up Iea7ad832: Fix context in MWPopupTool" 2018-04-30 15:06:06 +00:00
Ed Sanders f8cebb8f51 Follow-up Ib7e769e: Fix typos in static method calls
Also move desktop-only methods to DesktopArticleTarget.

Bug: T193217
Change-Id: Icc2bb6602a62057da9f841793d8fe06d9814230e
2018-04-30 11:05:43 +01:00
Ed Sanders ad170023e6 Check link 'host' in onEditSectionLinkClick
Bug: T193323
Change-Id: Id67798e5689af9d528bf29bb1b42047adaedaabd
2018-04-30 10:57:45 +01:00
Ed Sanders 8fdc1f7085 Follow-up Iea7ad832: Fix context in MWPopupTool
Bug: T193043
Change-Id: I2b035a50543093988a291ea8c8958a3a7cc9e7ba
2018-04-29 21:45:10 +01:00
Ed Sanders cddf206f5b Set surface's $overlayContainer in DesktopArticleTarget
Logically depends on Ia96b1a89dd9582303b80be85b3971cf3341cad24.

Bug: T166217
Change-Id: Icc54f87bac46d39e8c49010ed052e1db66827f06
2018-04-27 21:55:12 +00:00
Ed Sanders 95258a9969 Visual diff: Describe redirect changes
Change-Id: Id31e8399556dab9b47bc1d21c62cb82af3a0e7bb
2018-04-27 21:07:41 +01:00
Bartosz Dziewoński e1635fdc52 Update custom styles for format menu after OOUI changes
Bug: T193098
Change-Id: I00d28f16b03a31ecda1dc57050945e98e8eb37e8
2018-04-26 01:48:28 +02:00
jenkins-bot fd082e577b Merge "ve.init.mw.DesktopArticleTarget: Setup toolbar before section title input" 2018-04-24 16:24:42 +00:00
Bartosz Dziewoński e3378e6d77 ve.init.mw.DesktopArticleTarget: Setup toolbar before section title input
When we set up the new section title input and possibly set its value
(preloading from URL query, or from autosave), the "Save" button on
the toolbar must already exist, because we try to enable it.

Bug: T192901
Change-Id: I3bba86a8c8a9b81014d425db256ff49f06bdaea6
2018-04-24 18:11:42 +02:00
David Lynch 44469f0f06 MWWikitextSurface onCopy: set text/x-wiki content if available
Equivalent to some existing copy-code in inspectors which handle raw wikitext.
Lets us shortcut content-sniffing with html/text content onPaste.

Change-Id: I27ded82a9675abdb3ee98ee29390e7079d11cf05
2018-04-23 16:04:49 -05:00
jenkins-bot c0364bc6a6 Merge "Teardown target before reloading article" 2018-04-23 21:00:43 +00:00
jenkins-bot ec8be1bfa1 Merge "Add a plain text paste transfer handler for source mode" 2018-04-23 21:00:41 +00:00
Ed Sanders 1f4baa7b58 Teardown target before reloading article
Ensures that auto-save data is cleared after
creating a new article, or restoring a revision.

Bug: T192770
Change-Id: I348b8522c1a935d7db1243ba8fcbd5b24e3383a2
2018-04-23 21:30:37 +01:00
gopavasanth 3e541774e8 Change http://www.mediawiki.org/ to https://www.mediawiki.org/
In other files, links to mediawiki site are https://www.mediawiki.org/

Bug: T189687
Change-Id: I0279a7ffdb9544a87a11ffdab7ff5d5d38ea6035
2018-04-23 15:08:43 +00:00
David Lynch 6f8e58fa8a Add a plain text paste transfer handler for source mode
This allows plain text pasting into source mode without interfering with the
possible-conversion that should happen when it's pasted into visual mode.

Bug: T190590
Bug: T192320
Depends-On: I47a5bf321fb64d4a631ec6fd728bee269d4cdae0
Change-Id: I71db368c683a6a846569d7627f4cc73e907a61d2
2018-04-22 12:52:56 -05:00
jenkins-bot 6e44244af5 Merge "Sortable table header: Account for null entries in table matrix" 2018-04-19 16:08:01 +00:00
jenkins-bot 9ecd73f771 Merge "NWE: Fix selection when applying async links" 2018-04-19 16:01:22 +00:00
Ed Sanders 24ae471fd1 Sortable table header: Account for null entries in table matrix
Bug: T192545
Change-Id: I05bb80a0afce72a8202209499947781efe684584
2018-04-19 14:27:22 +01:00
jenkins-bot 5ae421d715 Merge "Refactor ve.dm.MWTransclusionNode.static.describeChanges" 2018-04-18 07:26:10 +00:00
jenkins-bot bc12e25b35 Merge "MWExtensionNode: Diff mw.attrs" 2018-04-18 07:26:08 +00:00
jenkins-bot 69f0ff1016 Merge "Blacklist images with data URLs" 2018-04-17 19:48:20 +00:00
Ed Sanders 6625fc5c85 Blacklist images with data URLs
These aren't supported by VE-MW, so must just be
garbage from a browser plugin.

Bug: T192392
Change-Id: I24646244daf2847e4dee88273058658300880dfc
2018-04-17 20:10:51 +01:00
jenkins-bot 6902e81768 Merge "Use ellipsis on toolbar save/publish button" 2018-04-17 18:34:17 +00:00
jenkins-bot a8e6d1ddd5 Merge "Add label to Options dialog > Categories input fields" 2018-04-17 18:18:55 +00:00
jenkins-bot d325f793a9 Merge "Show revision info on historical diffs" 2018-04-17 17:36:21 +00:00
Ed Sanders 53e758a427 NWE: Fix selection when applying async links
Change-Id: I31dc6f2d9fcd563bdbd8245bda6336d317aa512a
2018-04-17 16:33:23 +00:00
Ed Sanders b38500f102 Only resolve wikitext promise when progress dialog has closed
Logically depends on I0cdb004011 to fix the bug.

Bug: T182402
Change-Id: I8ecd695c052a6c759b8261e81fb25c771bdf3d56
2018-04-17 16:33:14 +00:00
James D. Forrester 58c5643f1e Update VE core submodule to master (a64ba1cc6)
New changes:
aee32648a Allow access to a fragment's async state
a64ba1cc6 Add extra copy/paste tests for <span> clipboard keys

Local changes:
* Fix signature of runSurfacePasteTest

Change-Id: Idbc2f2c25eaf0606c51d9dff8ec23562f5244c08
2018-04-17 16:02:04 +00:00
hunter be5289689f Add label to Options dialog > Categories input fields
Add label to indicate the function of the input field underneath the
categories label in the options dialog. The <label> element is
preferred for screen readers and users with visual disabilities.

Bug: T146966
Change-Id: Ib300ca7a1fd55d320c1a1a8c8c7fd01ab8b0b9c5
2018-04-17 06:28:32 +00:00
jenkins-bot 3a9ec6bcce Merge "Fix layout of welcome dialog on smaller screens" 2018-04-12 22:55:39 +00:00
Ed Sanders 62d2211aed Mobile: Hide top-level toolbar labels on narrow screens
Change-Id: I8049b935204834201d2a185d04070bbf81520d1e
2018-04-12 23:32:33 +01:00
Ed Sanders 4f448a8c96 Hide stray checkmarks on mobile toolbar
Change-Id: Iae5ad6f736197f9d88d973a51b3b04bddc101826
2018-04-12 23:22:26 +01:00
Ed Sanders 2496fcefb0 Fix layout of welcome dialog on smaller screens
Bug: T191095
Change-Id: Ic329fe22a6758fe58ec56dc3b5a293b83d9b38fb
2018-04-12 23:15:15 +01:00
Ed Sanders bcf3783c1c Refactor ve.dm.MWTransclusionNode.static.describeChanges
Removes some duplication.

Change-Id: If68401617cde60cf151bf132f33e5d9dc42bbf72
2018-04-12 17:46:47 +01:00
Ed Sanders 4fdf5b08b4 MWExtensionNode: Diff mw.attrs
Bug: T191450
Change-Id: Ia6bfc4d2f04243970d6f65fd0ccfd650aee5da06
2018-04-12 17:46:47 +01:00
Ed Sanders 3682ab070d mw.Target: Remove .protectedClasses, only used in ArticleTarget
Also fix documentation

Change-Id: I3fa93dd95c3ef47f649d3f92a38e14750a411333
2018-04-12 15:38:23 +00:00
Ed Sanders 50a2ab7418 Show revision info on historical diffs
Bug: T187614
Change-Id: Ie28d4af6443a17e2e25b2520f0e0dbf5ba4076cc
2018-04-10 20:42:06 +02:00
Ed Sanders 637d869d99 Convert href-less links to spans
Bug: T191598
Change-Id: I0993869ed53842f9de60ff7e68f79a69da1d23c7
2018-04-09 18:04:08 +00:00
jenkins-bot b7abb924c2 Merge "Abstract API calls to 'parsefragment'" 2018-04-09 16:13:27 +00:00
jenkins-bot 2306717eb1 Merge "Use 'imageBroken' icon for missing images' contextItem" 2018-04-08 19:13:16 +00:00
James D. Forrester ac2b5e1ef8 Update VE core submodule to master (3ea11b8b1)
New changes:
f97bdb039 PlainTextStringTransferHandler: Allow as paste
5a0007e49 Expand ce.Surface tests for plain text pasting
bab28c8d3 Localisation updates from https://translatewiki.net.
82bc2c014 Fix language input design now that indicator-next is gone
c14c6ac56 Fix z-index of context elements in diff

Bug: T190590
Bug: T190916
Change-Id: Ibe8b1b62a8300f380b753f978bed6a6f8d520044
2018-04-06 10:52:54 -05:00
Ed Sanders 924f9ec730 Use 'imageBroken' icon for missing images' contextItem
Change-Id: I3ba8f34a8ff03c949c18df102e7334449abb6e27
2018-04-06 15:32:55 +01:00
Ed Sanders 16211cdc09 Abstract API calls to 'parsefragment'
Change-Id: Id0be3207219a6d93cebff2b6b5061cd24898d5cb
2018-04-06 13:49:16 +01:00
jenkins-bot f5c483af52 Merge "Gallery: Use 'poster' attribute for video thumnails" 2018-04-05 21:33:29 +00:00
Ed Sanders 43a8004abb Gallery: Use 'poster' attribute for video thumnails
Bug: T191098
Change-Id: I0f4e456ec7a52ee71dcfca581c73415fc8ee6178
2018-04-05 22:14:16 +01:00
David Lynch c4c5582121 MWTransclusionDialog: remove extra padding from framesets
Bug: T191234
Change-Id: I6cfec45607f2dd428347879c134dbe286397f8b6
2018-04-05 11:30:05 -05:00
Ed Sanders 8b42a5917c Add img.src's to gallery DM output
Bug: T191377
Bug: T191436
Change-Id: Ie6b3593876c92f8e6f08fb005d876304223491ed
2018-04-05 12:57:18 +01:00
jenkins-bot 7b1d248ec1 Merge "ve.ui.MWMediaDialog: Use dropdown for image type selector" 2018-04-05 11:02:22 +00:00
jenkins-bot f3ba1a780f Merge "ve.ui.MWParameterPage: Pass $overlay to PopupButtonWidget" 2018-04-04 21:36:39 +00:00
jenkins-bot f5b0d655cf Merge "FeedbackTool: Add the ability to vary feedback page for source mode" 2018-04-04 21:24:09 +00:00
jenkins-bot a903f5c1cc Merge "ve.ce.MWInlineImageNode: Fix rendering of non-linked images" 2018-04-04 21:20:59 +00:00
Bartosz Dziewoński 0cf02e0155 ve.ui.MWParameterPage: Pass $overlay to PopupButtonWidget
Also, pass $overlay to all PageLayout subclasses used in ve.ui.MWMetaDialog
and ve.ui.MWTemplateDialog/ve.ui.MWTransclusionDialog, for consistency.

Bug: T191395
Change-Id: Ib7ed2e2c04ff7930be1161bd2b981180ee59557a
2018-04-04 22:45:13 +02:00
Bartosz Dziewoński 24e828c627 ve.ce.MWInlineImageNode: Fix rendering of non-linked images
The bug is easiest to reproduce with `[[File:Example.jpg|link=]]`,
but it also affected video embeds.

jQuery appendTo() method returns the set of inserted elements.
Because `this.$element` is undefined at this point, the `<img>`
was not actually being inserted anywhere, and an empty set was
returned, causing MWInlineImageNode to have no CE rendering.

This was not an issue prior to c4f93b14, because `this.$element`
was being defined by the parent constructor (OO.ui.Element)

We don't actually want to insert it anywhere, this appendTo()
call was a remnant of wrapping code removed in a22aeafc.

Bug: T191406
Change-Id: If1dbf9fef0e0ac9debfdb3049ebcccac70948515
2018-04-04 21:22:58 +02:00
jenkins-bot 884d0137a0 Merge "Remove <section> unwrapping code from ve.ce.MWTransclusionNode" 2018-04-04 19:05:54 +00:00
James D. Forrester 31730cc5b3 FeedbackTool: Add the ability to vary feedback page for source mode
Wikis with a local link over-ride configured will need to do so here
for the new message `visualeditor-sourcefeedback-link`; wikis with a
remote link configured will need to update their configuration ahead
of this being deployed, setting $wgVisualEditorSourceFeedbackTitle.

Bug: T157953
Change-Id: Iea7ad8328b03f69e01d7c67ca1ddbb7ae7906288
2018-04-04 18:11:10 +00:00
jenkins-bot 737a0446be Merge "GalleryNode: Pass through all arguments in describeChanges override" 2018-04-04 17:41:08 +00:00
Ed Sanders 63f94f929f GalleryNode: Pass through all arguments in describeChanges override
Change-Id: I66bb6bc2a5e95607beee103e925b3fa641f432d5
2018-04-04 18:00:41 +01:00
jenkins-bot 242eb68b96 Merge "Improve diff description on gallery nodes" 2018-04-04 16:50:03 +00:00
Ed Sanders 1159471730 Improve diff description on gallery nodes
* Deep compare mw.attrs on gallery nodes, ignoring 'caption'
* Ignore computed attributes on gallery image node

Bug: T191441
Change-Id: If1d9ec15a45001f3c420d20481be43ae38ae201a
2018-04-04 17:38:48 +01:00
jenkins-bot 459f35924c Merge "DiffPage: Remember chosen diff mode" 2018-04-04 16:34:54 +00:00
jenkins-bot 9c82472546 Merge "MWExternalLinkAnnotation: add CSS to override plainlinks styling" 2018-04-04 15:53:51 +00:00
Ed Sanders b5be51db7e Use cog icon for options
Bug: T191099
Change-Id: I68638dcfa2531ce01843ae3517d9245deb716769
2018-04-04 13:22:00 +01:00
jenkins-bot cb0ae22be4 Merge "Define childNodeTypes for gallery image node" 2018-04-03 20:26:00 +00:00
jenkins-bot f04563faba Merge "Show redirect link in preview" 2018-04-03 19:01:02 +00:00
jenkins-bot 6ce963665f Merge "Move redirect building methods from DesktopArticleTarget to ArticleTarget" 2018-04-03 19:01:01 +00:00
Thalia 367509287f Define childNodeTypes for gallery image node
Change-Id: I9ad78d26dfa16a7bc6da8bc94d7ef4e38fdec409
2018-04-03 19:40:12 +01:00
Ed Sanders 36e0f8988d Show redirect link in preview
Bug: T191128
Change-Id: I08fc03dd869e6b074a24698f9037380b26e3dd2c
2018-04-02 17:34:51 +01:00
Ed Sanders 11eaab48c8 Move redirect building methods from DesktopArticleTarget to ArticleTarget
These are not specific to desktop.

Also make the static builders static, and move VE target specific
code to caller, such as the click handler.

Change-Id: Ib7e769e3d6d339b9e66e1bc924480b0b0d5db17d
2018-04-02 17:32:24 +01:00
jenkins-bot 45afe665c1 Merge "Visual diffs in source mode section edits" 2018-04-02 16:05:34 +00:00
jenkins-bot b29de616c9 Merge "Fix source copy when clipboardData not available" 2018-03-29 23:39:19 +00:00
Ed Sanders ec3c6b65c0 Remove <section> unwrapping code from ve.ce.MWTransclusionNode
Has been fixed upstream in Parsoid.

Bug: T181226
Change-Id: I7dfe228e6d1008c4e66377d501f2e4af72c1813d
2018-03-29 14:05:32 +01:00
Ed Sanders 58054d49da Fix source copy when clipboardData not available
Bug: T190881
Change-Id: I8569dec0c03caa30cb7fcbbbfeed126dc9db57e4
2018-03-29 13:58:00 +01:00
jenkins-bot ea9a0d56df Merge "Update VE core submodule to master (4922429f7)" 2018-03-28 16:32:26 +00:00
Bartosz Dziewoński f8522b7aac Update VE core submodule to master (4922429f7)
New changes:
4922429f7 Merge all theme overrides into single files

Local changes:
* Update extension.json module definitions for 4922429f7
* Merge all VE-MW theme overrides into single files

Change-Id: Ie8bb4a78c3c50dd4e930f25f6f72bc2f395bd10c
2018-03-28 09:17:12 -07:00
David Lynch 7f5b6fafb4 MWExternalLinkAnnotation: add CSS to override plainlinks styling
Was causing the active link highlight to look broken.

Bug: T190582
Change-Id: Ia59e762689211625027367511ffd922f445a13ae
2018-03-28 10:57:10 -05:00
jenkins-bot 476a590c3c Merge "Parse title in show preview using hack" 2018-03-27 20:29:35 +00:00
jenkins-bot 5b36d88eae Merge "Make edit notices popup wider (320 -> 380)" 2018-03-27 17:24:58 +00:00
Ed Sanders d3e5385944 Visual diffs in source mode section edits
Bug: T190845
Change-Id: I938352eec8b49f27784c12ddea72bbe69fdd6cb2
2018-03-27 17:53:54 +01:00
David Lynch d77ea2bf16 DesktopArticleTarget: use -published message instead of -saved
Bug: T183901
Change-Id: I09f6e44f9f743f079ca5504ec06706c764ce6e25
2018-03-27 10:49:03 -05:00
Esanders 3cd35b95e9 Make edit notices popup wider (320 -> 380)
Bug: T184379
Change-Id: Ic68f5e117bb0057bb5fa8b83834707abfbadb3b3
2018-03-27 14:16:25 +00:00
Bartosz Dziewoński b8bcba8cbe ve.ui.MWMediaDialog: Use dropdown for image type selector
The dialog is not wide enough to fit four buttons side-by-side.

Bug: T74187
Change-Id: I6a4e5692b5f1b2ca9bb78d4e6c6103036f371a52
2018-03-27 14:40:39 +02:00