Commit graph

1519 commits

Author SHA1 Message Date
jenkins-bot f0a819455e Merge "Load icons where we can via RLIM" 2016-09-13 21:21:22 +00:00
jenkins-bot 645c947359 Merge "Move image-paste blocking to transfer handler match function" 2016-09-12 15:55:19 +00:00
James D. Forrester da422b18d5 Load icons where we can via RLIM
This gets us the variants (which we need for OOUI 0.17.9); note that I've
cheated and used 0.17.9's colour for the MediaWiki theme's progressive flag
rather than 0.17.8's value of 347bff.

Change-Id: Ic436970e9298ea31f48c6cfdd04b80847aaebbee
2016-09-09 18:10:56 -07:00
Ed Sanders 5e22ef30fe Add show preview to save dialog when in NWE
Bug: T142642
Change-Id: I679eaddfe9037dcf258d3ff7d1eaa44214f0e730
2016-09-07 21:35:49 +00:00
Ed Sanders 7a80fa57bc Fix parent constructor call
Got broken in switch to using 'super'.

Change-Id: Icea95b49ad48849af857bfa3b301d3bcf6039036
2016-09-06 19:16:24 -07:00
jenkins-bot b656f3d5f1 Merge "Use super property to call parent methods" 2016-09-01 17:04:39 +00:00
Ed Sanders 56c56e81fe Move image-paste blocking to transfer handler match function
By not matching, we allow other types of paste to happen, e.g. HTML/plain text.

Bug: T142622
Change-Id: I3a2224ab23b5073eb7b031134ecc3170ccc782c0
2016-08-26 00:54:39 +00:00
jenkins-bot f071b0380d Merge "Vary the 'save' labels to 'publish' for public wikis" 2016-08-25 21:36:41 +00:00
jenkins-bot d27863587a Merge "Show a different label for buttons on create vs. modify" 2016-08-25 16:40:21 +00:00
James D. Forrester deef47414a Vary the 'save' labels to 'publish' for public wikis
Bug: T131132
Change-Id: I4a497265661d5ce0f6144988b514509dfa1bddfd
Depends-On: I56634ed223778a0650cf36ac7256151b13c494f1
2016-08-25 09:37:52 -07:00
James D. Forrester b7c7d06968 Show a different label for buttons on create vs. modify
To align with the linked patch in MediaWiki core. Taking advantage of
the opportunity to use core's messages for these, and remove some dead
wood old messages that were never used like "restore" items in mobile.

Bug: T139033
Depends-On: Ie81b5edd275963a965cd44d0fd325cae9ee2f1a6
Change-Id: Ie00e94cc77cb750a7e8d1104366bb3dad65af8a4
2016-08-24 16:01:11 -07:00
Ed Sanders 62bdaac13b Use super property to call parent methods
Change-Id: I76982b844cf2871d7583463def4393e5bdc33aa2
2016-08-23 11:56:47 -07:00
Ed Sanders 1d6746e89d Fix insertion annotation for wikitext link inspector
Change-Id: Ib769e371743438b530f150fcb8104292288c35f9
2016-08-22 10:59:55 -07:00
Ed Sanders c452e134cc Wikitext surface alpha feature
Edit wikitext with the VE interace.

Bug: T104479
Bug: T142138
Change-Id: Ic95b47e0dd378578555c4a2342ca9c87064ed1d5
2016-08-12 18:37:29 +00:00
jenkins-bot 1fe827197d Merge "Add titles to category input menu's items" 2016-08-08 21:56:43 +00:00
Alex Monk 071291d624 Add titles to category input menu's items
To match where they point to.

Bug: T139189
Change-Id: I46454cc9cd90920dc5e445200598a4706a8639c9
2016-08-08 21:09:36 +01:00
jenkins-bot cf4c2d41b3 Merge "Rewrite TOCWidget based on Linker::generateTOC" 2016-08-05 22:18:22 +00:00
jenkins-bot 89a529edc1 Merge "Fetch default options for gallery dialog" 2016-08-05 21:20:00 +00:00
Ed Sanders bb7b38575f Rewrite TOCWidget based on Linker::generateTOC
Use the new node cache to find headings.

Change-Id: I5eb75c5db5ca466fd6f16a57c693c2a4458cff7c
2016-08-05 14:11:15 -07:00
Thalia d156af59aa Fetch default options for gallery dialog
Fetch default options for mode, image heights and image widths
rather than hard-coding them.

Bug: T139632
Change-Id: I1adc7987fdeb1258ee87ce46acbab469ea18116e
2016-08-05 14:08:20 -07:00
Thalia 7d4864729b Make image list keyboard accessible in gallery dialog
Bug: T140874
Change-Id: I0f00f1ddb397fb8f543a04d62b94fc5db32180f6
2016-08-04 16:34:12 -07:00
David Lynch 53ad07ed72 MWLinkAnnotationInspector: change where auto switch to external occurs
OnInternalLinkChange happened post-validation, and received an already title-
normalized version of the href. Thus `file://` would become `:File://`. As
such, hook up to the raw internal link input change event, and judge what the
user actually entered.

Bug: T138956
Change-Id: I0f9f3de3b7bf6e5430e55fa69626522b0c74296a
2016-07-28 11:00:36 -05:00
jenkins-bot 11695a8528 Merge "MWLinkAnnotationInspector: switch to external tab on any schema" 2016-07-28 03:35:18 +00:00
David Lynch a95e6cab08 MWLinkAnnotationInspector: switch to external tab on any schema
Currently the switch only happens if it's a valid schema. Instead, switch if
any schema at all is detected, so we can tell the user it's invalid. If they
really meant to link to an internal wiki-page that just happens to start with
a "schema://", they can switch back to the internal tab to force it.

Bug: T138956
Change-Id: Icfd74157fd8439920668a417661265ddd52c9a21
2016-07-27 17:10:52 -05:00
Ed Sanders 6064eb3dc4 Fix preview to use a valid document slice
An inline content node must exist inside a content branch node (paragraph).

Bug: T141306
Change-Id: I6bf2f99938940c1a5e34db16fbe582b15991a7c6
2016-07-26 16:06:07 +01:00
jenkins-bot 522b3498ce Merge "MWGalleryDialog: Add new 'slideshow' mode" 2016-07-21 00:54:08 +00:00
David Lynch ef7652fdfc Move internal-link detection into the InternalLinkAnnotationWidget
If internal link detection is in the LinkAnnotationInspector, it falls down
when a valid URL which isn't also a valid page title (e.g. percent-encoded
titles) is pasted into the input. This is fixed by moving the detection to the
input's change handler before any validation can occur.

Bug: T119431
Change-Id: I1eb2040dd918fdcc22c28594b5cbad835cf384a8
2016-07-15 13:51:35 -05:00
jenkins-bot b71160cbd5 Merge "MWGalleryDialog: Don't set blank values for width, height" 2016-07-12 22:32:38 +00:00
Thalia 84919b253b MWGalleryDialog: Don't set blank values for width, height
If width or height attributes are left empty in the form,
they are now undefined in mwData.

Bug: T140094
Change-Id: I76dadbd07a89ce762e42ce714f364ce74a9cc1f0
2016-07-12 22:14:59 +01:00
James D. Forrester 96ba688a87 MWGalleryDialog: Add new 'slideshow' mode
Change-Id: I73052def5e8c082f27606b2ff094834fd5d11908
2016-07-12 08:08:15 -07:00
Ed Sanders 12e1de2a76 Use transition timing from OOUI theme config
Depends-On: I00eaa2b815d7c76b6315a3993a9a7921ae503c00
Change-Id: I37098e085c4ee49050d448bed8821d3c0f6ec449
2016-07-12 13:28:33 +01:00
Thalia 3e911ba266 Make gallery dialog caption field multiline
Also change remove button label from "Remove" to "Remove image".

Bug: T139421
Bug: T137982
Change-Id: I1b11eb44c672bad0d53d139d66e796a0657457f5
2016-07-06 17:24:12 +01:00
jenkins-bot f1bb251814 Merge "Ensure widgets are always torn down when categories page is closed" 2016-07-04 07:11:08 +00:00
Ed Sanders 34135c7643 Ensure widgets are always torn down when categories page is closed
Previously a return statement meant they weren't.

Bug: T139196
Change-Id: Ic7bc14a929430ac6e9d2546fc9e1a1a02635ca77
2016-07-02 17:38:53 +01:00
jenkins-bot 4a7f208e53 Merge "Hack to not show menu immediately upon meta dialog opening for redirect change" 2016-06-30 21:35:21 +00:00
Alex Monk 134a35ad1a Hack to not show menu immediately upon meta dialog opening for redirect change
Bug: T137309
Change-Id: Iba22b909e8208d2a314de8313db9d910410c9a1d
2016-06-30 20:49:23 +01:00
jenkins-bot 750078ab63 Merge "MWTemplateDialog: When opening the dialog, add in any unset suggested and required parameters" 2016-06-29 22:42:25 +00:00
jenkins-bot 4837373545 Merge "build: Bump devDependencies to latest and make pass" 2016-06-10 09:36:10 +00:00
James D. Forrester 832118e051 MWTemplateDialog: When opening the dialog, add in any unset suggested and required parameters
Bug: T97482
Change-Id: Iaf280355f442240aba4e1f74d3ee402fc5d329b0
2016-06-08 14:19:09 +00:00
James D. Forrester 5ecf40f51e build: Bump devDependencies to latest and make pass
babel-polyfill              6.8.0  →  6.9.1
 grunt-jscs                  2.8.0  →  3.0.0
 grunt-jsonlint              1.0.7  →  1.0.8
 grunt-stylelint             0.3.0  →  0.4.0
 stylelint-config-wikimedia  0.2.0  →  0.2.2

Change-Id: I4db467c7f2bc291a94e7bab86d18e48a44f6054c
2016-06-07 17:17:02 +01:00
Thalia 6fdbe9fd7e Make dialog for editing galleries
Make new graphical interface for editing existing
galleries and adding new galleries.

NB The dialog does not yet support rich text in the
image captions, nor does it provide separate fields for
e.g. link, alt text, etc. These are dependent on parsing
the text within the tag, which is yet to be implemented
by Parsoid. For now, these attributes should be
specified in wikitext in the image-specific caption
field.

Bug: T45037
Change-Id: I2b4082e991268241a15b9bbd6d85c94cdc2185f2
2016-06-07 13:53:02 +01:00
Ed Sanders 35c0a0dc69 Use cloneWithData
Change-Id: I7ffe3c7ab20d5f785a6642c8293f271f4dc08ff8
2016-05-30 21:40:07 +01:00
Ed Sanders 7b8931193a Update stylelint config version and make a pass
Change-Id: I58007c3976019c8cfe96fd1fc0474d9e80f99f64
2016-05-24 13:41:13 +01:00
Bartosz Dziewoński a86cfc82d1 Remove Wikipedia logo from welcome dialog image
The editor can also be used on wikis that are not Wikipedia.

By the way, the logo was incorrectly flipped for the RTL version. Heh.

Bug: T135811
Change-Id: I5635da13e8335658079620a46ac265c4ed6bd167
2016-05-22 16:34:12 +02:00
James D. Forrester 8c7ed92288 Update VE core submodule to master (eeaf1e2)
New changes:
c54a48a build: Fix watch list (csslint -> stylelint)
58ba3d9 Add stylelint rules for @-rules
3f8c75a Stylelint: Add rule for unsupported browser features
3b96ff3 Fix minimum Opera version (15 -> 12)
9a1110b Stylelint: No ID selectors
9800bb8 build: Remove remaining references to csslint
b6ab14a stylelint: Re-enable features by names
6cc1f3c Move stylelint to npm
1d15fa0 build: Bump stylelint version to v0.2.0
ccc1724 stylelint: Use the preset rather than extending

Change-Id: I22fa8098592338a5e912aba9ad21131b21d9c0ea
2016-05-18 07:06:53 +01:00
jenkins-bot d2c995594a Merge "Remove remaining references to csslint" 2016-05-17 12:41:48 +00:00
Ed Sanders 8d749518ec stylelint: Comment uses of 'unsupported' browser CSS features
Change-Id: Ia88575d3fe71c22551cc601f03d8f4dea6d7fe16
2016-05-17 12:28:07 +00:00
Ed Sanders df49e5deb9 Remove remaining references to csslint
Change-Id: I1b5177bf746985a199bcc1ec713f886164c74760
2016-05-17 13:27:47 +01:00
Ed Sanders 99d3320573 build: Replace csslint with stylelint
For now just use the rules file in lib/ve, but eventually
this will be a preset.

Change-Id: I7fd79d3e1dce37aef066d416cd969e5fff1e962f
Depends-On: I17e0d23ddfedf64985495ab35d113ea08c03b1df
2016-05-16 22:30:49 +01:00
Ed Sanders 236e3d1241 [BREAKING CHANGE] Evalute block/inline state when inserting a transclusion node
Make some of the methods we currently use to render the node
static so we can re-use them before inserting. We do the evaluation
without inserting the node so as not to dirty the document and
transcation history.

In the unlikely case the request fails, just fallback to inline.

This only handles insertions for now as type changes on edit will be
very rare.

This changes the signature of insertTransclusionNode, which is used
in Cite and Citoid extensions.

Bug: T51784
Change-Id: Ibc2fc66e6866084b0a4deeb082c8a1ca412febb2
2016-05-16 09:19:13 +01:00