Commit graph

11110 commits

Author SHA1 Message Date
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
jenkins-bot fe625aa5ea Merge "ve.ui.MWPopupTool: Allow labels of buttons in help menu to wrap" 2018-03-27 11:55:16 +00:00
jenkins-bot 6deaeffa95 Merge "Revert "Make edit notices popup wider (320 -> 450)"" 2018-03-27 11:30:12 +00:00
Bartosz Dziewoński 4fd4a5259b ve.ui.MWPopupTool: Allow labels of buttons in help menu to wrap
Bug: T190796
Change-Id: I7889119a60133100825d7db4a02e6d0a7c797eba
2018-03-27 12:31:24 +02:00
Bartosz Dziewoński a0dacccd83 Revert "Make edit notices popup wider (320 -> 450)"
This reverts commit d5a61eb95d.

Bug: T184379
Change-Id: I0198c6d1faf1474ea0faab7e05ec95cfb43c9206
2018-03-27 10:13:45 +00:00
Volker E e837512cc6 Replace deprecated 'comment' with 'speechBubble' icon
Bug: T183600
Change-Id: Iebebba61a099193051cffc11f41e366bdb1c19e1
2018-03-26 21:14:35 -07:00
James D. Forrester fe525e3bcc *Dialog: Don't set to small size, which is the default
Change-Id: I3b7a19acd0ee5112d104257bdc1e9ff0e9b4ff24
2018-03-26 15:02:11 -07:00
jenkins-bot dc3e192179 Merge "Make edit notices popup wider (320 -> 450)" 2018-03-26 21:31:07 +00:00
jenkins-bot 58f9cf7050 Merge "Autosave section title when adding new section in source mode" 2018-03-26 21:19:26 +00:00
jenkins-bot 5f8d287e12 Merge "Autosave recovery prompt" 2018-03-26 20:55:18 +00:00
jenkins-bot 44720da389 Merge "*Dialog: Drop verbose option, ignored since v0.20.0" 2018-03-26 16:18:49 +00:00
jenkins-bot 5325424988 Merge "Match audio & video elements in gallery DOM" 2018-03-26 16:18:46 +00:00
jenkins-bot ce425c1d56 Merge "[BREAKING CHANGE] Use upstream tryTeardown instead of close in MobileArticleTarget" 2018-03-26 16:12:35 +00:00
jenkins-bot 132d3fbaac Merge "Move some deactivation code from DesktopArticle to ArticleTarget" 2018-03-26 16:10:49 +00:00
James D. Forrester 9e01553f0b *Dialog: Drop verbose option, ignored since v0.20.0
Change-Id: If0bc7946b67aaae97886e8dbd956e9338b0e0b40
2018-03-26 08:55:03 -07:00
Ed Sanders 95fc150a4f Remove unused static overrides from dialog
Change-Id: I31f0310baa5c438b17f16749368102d8cede22db
2018-03-26 15:49:04 +01:00
Ed Sanders 28d8d2923e [BREAKING CHANGE] Use upstream tryTeardown instead of close in MobileArticleTarget
Change-Id: I33bcc98bc75ab049568de47faceb3f3390df5901
2018-03-26 15:32:55 +01:00
Ed Sanders 307e6c2922 Move some deactivation code from DesktopArticle to ArticleTarget
Also rename tryDeactive to tryTeardown.

Change-Id: Ie89d59a62826bcfe3d30ad04f89d3c4211cc34f4
2018-03-26 15:32:55 +01:00
Ed Sanders f89856f0ba Match audio & video elements in gallery DOM
Bug: T190631
Change-Id: Ic09927728b449dda43cf115fa9612ebd7a2bf23f
2018-03-25 22:04:57 +01:00
jenkins-bot 966e46ac80 Merge "Fix the image sizes in ve.ui.MWInternalLinkContextItem" 2018-03-23 05:36:51 +00:00
Ed Sanders f7b0118de0 Fix layout of media info fields
Bug: T190468
Change-Id: Ic81781318a9003064e7d8f283901d70a5bae6ebc
2018-03-22 22:15:52 +00:00
jenkins-bot 511dfc41ca Merge "Make save commands only executable when article is saveable" 2018-03-22 17:03:37 +00:00
Ed Sanders 8a974f25e6 Fix the image sizes in ve.ui.MWInternalLinkContextItem
Remove the image size styles from the class
.ve-ui-mwInternalLinkContextItem-hasImage too

Bug: T97631
Follow up: I84edeec38ecfb90f5d53
Change-Id: I39937bf4ba12f7047545b187c54a1c5fae157e4a
2018-03-22 17:03:19 +00:00
Ed Sanders 3a56d42901 Make save commands only executable when article is saveable
Change-Id: Ia22fbae45201254867bf6e8920aff944ba9276b9
2018-03-22 10:44:30 -05:00
Ed Sanders bfb59e9c8a Follow-Up I84edeec38: Use font-size: 1em instead of unset for invisible templates
Leaving it unset falls back to 'inherit' which is too large.

Change-Id: I0dd90b247b51070bbe10aad4941a9dc4a7ac60c1
2018-03-22 13:29:49 +00:00
David Lynch 75af29b57d DiffPage: Remember chosen diff mode
Use a new preference: visualeditor-diffmode-historical.

Bug: T189896
Change-Id: I0575cc0a86dc0683758d24c0f597834e38cf1095
2018-03-22 01:41:14 -05:00
jenkins-bot bfd4a5870f Merge "Use single-line editor for image captions" 2018-03-22 01:32:09 +00:00
Ed Sanders a58b529104 Autosave recovery prompt
Prompts the user before recovering if the document
has been edited since last load.

Bug: T190077
Change-Id: Ibc0e1d1342510fbca57ad599c1816918c84e5487
2018-03-21 16:23:35 -07:00
jenkins-bot 663b9f9a35 Merge "Remove special font-size treatment following-up UI unified in 14px base" 2018-03-21 21:07:16 +00:00
jenkins-bot e03f3e2c73 Merge "Update icons for new 20px grid" 2018-03-21 20:59:23 +00:00
jenkins-bot 5aa1bb8537 Merge "MWTransclusionNode: describe parameter changes for Visual Diffs" 2018-03-21 20:03:21 +00:00
James D. Forrester ece430258b Update VE core submodule to master (dc98cb7ec)
New changes:
617708fe1 Update rel attribute checks to be aware of multiple rel values
c22428f81 ve.ce.LinearSelection: Don't throw exceptions only to catch on the next line
406db2ce3 Localisation updates from https://translatewiki.net.
33f94faf7 tests: Update ve.dm.Converter#getModelFromDom cases for new metadata behavior
d85bf0d68 Use documentFragments when DOM splicing
110519f1c Update documentation now describeChange can return jQuery
ff7fa5fa0 Change http://www.mediawiki.org to https://www.mediawiki.org
09faa4a3d Fix error with tabs per this:
a329edf67 Localisation updates from https://translatewiki.net.
da864cc5e demos: Separate out and fix mobile-dist
380cc90c5 VisualDiffs: Unit test for timeout behaviour
601173c02 Clarify the "Log" button label on the debug bar
c52a2e07e demos: Fix auto-save by only storing doc state if not recovered
1b8d2c457 Auto-save: Save and restore last known selection
9e279e77e Fix deprecated icon name 'alignCentre' > 'alignCenter'

Local changes:
tests: Update ve.dm.Converter#getModelFromDom cases for new metadata behavior

Bug: T189687
Bug: T189939
Depends-On: I2059d8ce9140b733ee92436de395d735ab06b9df
Change-Id: I3c210112c84e2d2bd8226de3dad195bf17afb4c2
2018-03-20 16:38:54 -07:00
jenkins-bot cf9ddabe23 Merge "Disable visual diffs on source mode section edits" 2018-03-20 23:02:33 +00:00
Ed Sanders 8bfb270168 Use single-line editor for image captions
Depends-On: I2be081c766fab41b152d03b43e7e936e3f636166
Change-Id: Ifcdc34826ad81e96c22fd68ceb637107cde24d4a
2018-03-20 22:51:27 +00:00
jenkins-bot 2c96d24c76 Merge "Avoid jQuery.parseHTML" 2018-03-20 21:44:37 +00:00
jenkins-bot 0ed47a025e Merge "Only use pre-computed measurements for position loading bar" 2018-03-20 21:44:36 +00:00
Volker E d44bb0bc1b Remove special font-size treatment following-up UI unified in 14px base
Removing `0.8em` VE special base `font-size` for UI as we're unifying
OOUI interfaces to `14px` equals to `0.875em` at user agent default size.

Bug: T97631
Depends-on: I693d168d2ccf2babbcfe8952af3e1c262aa97773
Change-Id: I84edeec38ecfb90f5d53199f3b26fc3f83ab0611
2018-03-20 20:03:19 +00:00
Bartosz Dziewoński d80099dad1 Update icons for new 20px grid
Set viewBox to "2 2 20 20" to trim 2px off each side of our
existing 24px icons, therefore aligning them to the new 20px
grid. All of them had been drawn with large margins, so none
of the graphic is lost.

Bug: T177432
Bug: T190151
Change-Id: I23a6daa5dc2d4a9afc50f275da5df370d2319277
2018-03-20 20:03:11 +00:00
jenkins-bot 9d004c4d35 Merge "Use OOUI 'markup' icon instead of local 'alienextension'" 2018-03-20 19:50:55 +00:00
Ed Sanders 0f56af016d Use ellipsis on toolbar save/publish button
Bug: T189803
Depends-On: Ic29717a660de5e80ee2a37f583b2a61c11fa87c4
Change-Id: Idaf80ea7e6ae9ffa165a8638af886bf6ab21a7f0
2018-03-20 19:46:36 +00:00
jenkins-bot cea546b502 Merge "MediaContext: Link filename to file page" 2018-03-20 18:41:09 +00:00
jenkins-bot bb34d650c0 Merge "Improve media context item to show Image/Video/Audio instead of 'Media'" 2018-03-20 18:38:53 +00:00
Ed Sanders 10792e179f MediaContext: Link filename to file page
Change-Id: Ice3fdd40cd1f7b8ba2841ac326babc7f24a2635e
2018-03-20 17:45:50 +00:00
Ed Sanders c245dd9ca0 Improve media context item to show Image/Video/Audio instead of 'Media'
Change-Id: Ie3b7ec62483e725d3ce073095a2a958c1db930d5
2018-03-20 17:45:48 +00:00
Ed Sanders 78ba8bbe3c Use OOUI 'markup' icon instead of local 'alienextension'
Change-Id: Id15596ab0013cb2078480bdb4dde25ef8e7ae50b
2018-03-20 17:27:54 +00:00
jenkins-bot c20a610750 Merge "Factor out isSaveable method from updateToolbarSaveButtonState" 2018-03-20 17:26:39 +00:00
jenkins-bot ff21c17c37 Merge "Remove unnecessary attachToolbarSaveButton override" 2018-03-20 17:25:11 +00:00
Bartosz Dziewoński c99b4a0ad5 ve.ui.Icons: Add missing global "invert" variant
Bug: T190166
Change-Id: I28cc22d49881a25973b31e5e112130fb21cf4a37
2018-03-20 16:36:18 +01:00
David Lynch a228991181 MWTransclusionNode: describe parameter changes for Visual Diffs
Currently limited to single-template transclusions.

Bug: T188389
Depends-On: Id03d6a9866b56c00e11a030ed60b3c6fb7ead3d1
Change-Id: I332b5f5aa789fdc00510e9f03ea96e4058a28961
2018-03-20 10:35:03 -05:00
jenkins-bot 39a8c9e14b Merge "Restrict width of diff feedback button mobile" 2018-03-20 02:09:11 +00:00
jenkins-bot e23dd5fb6d Merge "Make gallery dialog work with native gallery implementation" 2018-03-19 23:39:00 +00:00
jenkins-bot 5b82bb180d Merge "Fix title preview when not overridden" 2018-03-19 23:24:21 +00:00
Thalia 12cc56400b Make gallery dialog work with native gallery implementation
Updates the model and re-renders the gallery.

Bug: T150621
Bug: T149602
Bug: T149596
Change-Id: I1e93c3af02eeeff1fcdaa5549cccc61ea755ee04
2018-03-19 23:55:17 +01:00
Ed Sanders 5e1c024d33 Parse title in show preview using hack
Really Parsoid should do this for us.

Bug: T189540
Change-Id: Ie3b5d458e7e6611565e5852f351d715a48be521a
2018-03-19 21:58:33 +00:00
Ed Sanders 81f3c2df38 Fix title preview when not overridden
Change-Id: I555b057d8f20704c0676646afd03c78ad3353f23
2018-03-19 21:56:54 +00:00
jenkins-bot 48028e84b9 Merge "Allow ve.ui.MWCategoryInputWidget to use different API" 2018-03-19 21:29:58 +00:00
jenkins-bot 98c9a395ac Merge "Show page title in preview" 2018-03-19 17:09:53 +00:00
petarpetkovic fe8b510232 Allow ve.ui.MWCategoryInputWidget to use different API
* Provide config option to specify which API
ve.ui.MWCategoryInputWidget will use.
* To be used in Iec79e687eff8c63434054282650c97cc882f348d

Change-Id: Ib8869d4facf8b3210b309200d944fad4508d7eee
2018-03-19 16:50:27 +01:00
Ed Sanders b80075a5e4 Avoid jQuery.parseHTML
Change-Id: Iaf5cbe27b8883d6e4c468a3b4dae11438d264894
2018-03-16 15:43:03 +00:00
Ed Sanders a1dffa2dd7 Only use pre-computed measurements for position loading bar
Change-Id: I5fc17a432de8030a6154c4e961ac10c73f391a79
2018-03-16 15:39:21 +00:00
Bartosz Dziewoński 13d77ba557 Remember 'checkboxesMessages' when storing document state
Bug: T188796
Change-Id: I4785fe2fb7df774735c1bd48c222540a0286dd44
2018-03-16 01:14:29 +01:00
jenkins-bot 1d227935d9 Merge "Autosave: only try to remove autosave on teardown if the surface exists" 2018-03-14 19:17:30 +00:00
jenkins-bot 79f27a5447 Merge "Clear VE autosave whenever WikiEditor is loaded" 2018-03-14 18:25:48 +00:00
jenkins-bot 3c861d7ed1 Merge "Clear auto-save when switching to fallback wikitext editor" 2018-03-14 17:55:44 +00:00
David Lynch 9762b096c8 Autosave: only try to remove autosave on teardown if the surface exists
It's possible for some load failure states to cause this teardown at a point
without a surface. I observed it in MobileFrontend, when restbase can't be
contacted.

Change-Id: I13489640759c73dad5730d0bbadbfb2a38cb8e53
2018-03-14 11:53:10 -05:00
Ed Sanders d0eafd6b8d Restrict width of diff feedback button mobile
Change-Id: Ia4ceb73efb76d7714102619fce9cd87cf34216f9
2018-03-14 14:32:37 +00:00
jenkins-bot e4a8c0b61b Merge "Attach deactivate code to namespace tab ('Main'/'Article')" 2018-03-14 09:19:16 +00:00
Ed Sanders c6653b6a2d Show page title in preview
Bug: T189540
Change-Id: Idc203f7fcafcf944108938168b492e90091e3255
2018-03-13 10:15:16 +00:00
jenkins-bot 540cb864ca Merge "ve.ui.MWGalleryDialog: Dedupe code for saving properties of each image" 2018-03-12 12:28:10 +00:00
Ed Sanders e0419f8388 Autosave section title when adding new section in source mode
Change-Id: Idcbe2f12e3eb0bb85e2c986885bd8084b16dbe5b
2018-03-12 12:25:12 +00:00
Ed Sanders 4fc2b32b17 Disable visual diffs on source mode section edits
Bug: T183938
Change-Id: I0d03c47e9b4c30760b7d3bd7bf90d91e79eb8569
2018-03-10 22:54:54 +00:00
Ed Sanders e78379a395 Attach deactivate code to namespace tab ('Main'/'Article')
Bug: T189380
Change-Id: I9f05722b9a1c740f9f982d9c5690d48046f19fdd
2018-03-10 19:07:11 +00:00
Ed Sanders c3c3c60f1f Clear VE autosave whenever WikiEditor is loaded
Bug: T189381
Change-Id: I21a76dc32327d6c6e72a793d9b579cb7b6a5e32e
2018-03-10 18:34:17 +00:00
Ed Sanders ec6d9b235a Clear auto-save when switching to fallback wikitext editor
Bug: T189381
Change-Id: Id89fa2a673ad8aef3826c0ef862770bf522bbdcf
2018-03-10 18:04:44 +00:00
jenkins-bot 2ae3f5f1c2 Merge "ve.ce.MWBlockImageNode: Allow normal CE rendering to handle the caption" 2018-03-10 17:28:34 +00:00
Bartosz Dziewoński 3c676013f8 ve.ui.MWGalleryDialog: Dedupe code for saving properties of each image
Currently this only handles the caption, but there will be more.

Change-Id: Ia8a25de89375d0ba873f4891b053c7aceab15534
2018-03-10 17:16:16 +00:00
Bartosz Dziewoński 26e7728272 ve.ce.MWBlockImageNode: Allow normal CE rendering to handle the caption
Overriding ve.ce.BranchNode#onSplice seems pretty scary, some bug
could cause two captions to be inserted and it wouldn't even be
visible in the editor.

Instead, allow normal splice handling to happen when the caption is
added/removed, and only override the position where it is inserted
(to account for the image node this.$a).

The caption node is already removed from DM/CE if the image type is
changed to one that doesn't have captions, and even if that failed it
is also hidden in CSS, so we don't need to handle this.

Change-Id: I54f52b288118d692708311512dd674cc85d5d9e3
2018-03-10 17:16:16 +00:00
Ed Sanders 9678cdc7c8 Factor out isSaveable method from updateToolbarSaveButtonState
Change-Id: Ic1922ed26bae26a76e8149d48f3fb27fa9ba4330
2018-03-10 16:20:30 +00:00
Ed Sanders 8b208c80d5 Remove unnecessary attachToolbarSaveButton override
It's identical to the code inherited form ArticleTarget.

Change-Id: I7fe7a48b0614f2ac2665ece042bb95a6f77303ad
2018-03-10 16:20:30 +00:00
jenkins-bot 00eb598352 Merge "Update rel attribute checks to be aware of multiple rel values" 2018-03-09 21:44:53 +00:00
jenkins-bot 04e5f6f208 Merge "LinkCache: styleParsoidElements find mw:WikiLink with ~=" 2018-03-09 21:44:52 +00:00
David Lynch b6c6d10d1e ce.MWTransclusionNode: increase invisible selector specificity
5f6664e2 in VE core changed the specificity for some of the rules this
expected to override.

Bug: T189267
Change-Id: I510e151cc431c321d1d45fde9030d56f059d84ab
2018-03-08 19:27:52 -06:00
David Lynch 4e10d5b975 Update rel attribute checks to be aware of multiple rel values
Various checks didn't think a rel attribute could contain multiple values.
Mostly they don't, but to play it safe let's adjust the checks.

Change-Id: I29823b7c8c65ef6b2ff41ce9a801840000972e9c
Depends-On: I33a456351ab025d0c81cfb1a1577d5a2ae9df51a
2018-03-08 14:34:56 -06:00
jenkins-bot 8e79d85583 Merge "Blacklist Web of Trust junk from being added to pages" 2018-03-08 00:33:48 +00:00
David Lynch f8c5608caf LinkCache: styleParsoidElements find mw:WikiLink with ~=
`noopener` being added to the rel caused issues.

Bug: T189175
Change-Id: I33a456351ab025d0c81cfb1a1577d5a2ae9df51a
2018-03-08 00:14:16 +00:00