Commit graph

11242 commits

Author SHA1 Message Date
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
Ed Sanders 6ddd2ba96c Add commentAnnotation to CollabTarget toolbar
Change-Id: I7450b401fa68a1d91522579e9e9e70c0d052bcc3
2018-05-18 19:36:41 +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
Ed Sanders fcd9a480a1 Use getAuthorNames
Depends-On: Ib5f3c7cd6343b582ae9f4b5efcfa24f66243af52
Depends-On: I2a49315d01aa075373f9b5f0d8802a7e7dd4dca3
Change-Id: Ib02945a46326659b652cdc01976396ef698a8080
2018-05-18 12:30:10 +00: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
jenkins-bot a8ca28da84 Merge "CollabTarget: remember current name, briefly" 2018-05-16 16:40:09 +00:00
David Lynch aab3c106df CollabTarget: remember current name, briefly
Change-Id: I2804f21c00b9224217d340948ca3c437f1b8b1a4
2018-05-16 18:16:44 +02:00
jenkins-bot df4d8673ca Merge "MobileArticleTarget: Show both edit modes in edit switcher, for consistency" 2018-05-16 15:50:24 +00: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 4f53736399 Merge "CollabTarget: set name to logged in MW user" 2018-05-16 15:18:51 +00:00
David Lynch c3d03ae101 CollabTarget: set name to logged in MW user
Change-Id: Ic39ce1790d3a267123810bdb87cc0a844df0d42c
2018-05-16 12:48:34 +02: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