Commit graph

7975 commits

Author SHA1 Message Date
jdlrobson 2a40996cb7 Add mw-body-content to surface element
VisualEditor recreates the mw-body-content element. The element
with mw-parser-output already exists as a child. All skins now
consistently follow this pattern.

To limit the impact to the editor, we use ArticleTarget and add the class
to the surface, which corresponds to the mw-body-content element of a skin.
This avoids unrelated regressions in experiences such as DiscussionTools.

Bug: T283014
Change-Id: I4833d1ca9fda4fc0bd433760e47fe7010f00db05
2021-05-17 19:06:54 +00:00
jenkins-bot a01b56bcf1 Merge "Invert template search result highlighting" 2021-05-17 12:30:49 +00:00
Adam Wight 9cac71676e Invert template search result highlighting
Bug: T275048
Change-Id: I50fc7407b4357e2cea9d5421d0de46a81d39c69d
2021-05-17 14:12:02 +02:00
Andrew Kostka b2aa35a90a Show a warning before resetting the transclusion dialog
Bug: T272355
Change-Id: Id97190a149ed7642eda82300eeee623e0debf528
2021-05-17 13:27:37 +02:00
Adam Wight f444610fbc Support isEmpty on transclusion dialog elements
Returns true if there is no meaningful user input yet.

Will be used in the next patch.

Bug: T272355
Change-Id: I4f88ce31662bbc46755f78d574c46b907581d438
2021-05-17 13:26:11 +02:00
Andrew Kostka b2c9b225bd Add back button to the transclusion dialog
Bug: T272354
Change-Id: I08c4a7db6239b485439bf547e3e8b4d6f7aeede8
2021-05-17 13:18:14 +02:00
Andrew Kostka e0bbf0b979 Show a delete button only in the transclusion context menu
Bug: T274263
Change-Id: Ifd81994c212cd03c1318c5fd762251ce828d9195
2021-05-17 12:26:37 +02:00
jenkins-bot 71a4ad4f8e Merge "Template dialog bigger size uses "larger" preset" 2021-05-14 11:27:44 +00:00
Adam Wight 9607cb3ed0 Template dialog bigger size uses "larger" preset
Rather than invent our own size, we'll reuse the "larger" format and
tweak the dialog height to 90%.

Bug: T273971
Change-Id: Ibef85c1912267b14d83396b089b81934751a8328
2021-05-12 11:31:40 +02:00
WMDE-Fisch 42b557ff80 Use add template when adding a new transclusion part
We have two cases now that we want to cover here:
- Either we're inserting a new template and start a "fresh"
  transclusion, then we want to use "search" in the headlines
- Or we're adding a new template to an exsisting
  transclusion, then we want to use "add" in the headlines

Bug: T277028
Change-Id: I9fa294cf732598d58f848c75b353d2e1742eb4e8
2021-05-11 13:13:44 +02:00
Svantje Lilienthal 2665734b10 Renaming temporary config variable and splitting it from cirrus search lookup
This allows using the config variable independendly from the cirrus search extension.
This way it can be used for all subtickets of T271802.

Bug: T277028
Change-Id: I1b3bdda5fa6fbfe5c531c3b51c2c8e2a28ed1faf
2021-05-10 14:47:31 +02:00
Adam Wight f89301bedf Optional verbose template search
Renames "Add a template" to "Template Search" in most cases and
provides inline help for the workflow.

Bug: T277028
Change-Id: I3fee87cb89b5044e785596e71ef3f1a18f2694ce
2021-05-10 12:45:12 +00:00
Andrew Kostka c1d36072ea Add collapsible descriptions to the transclusion dialog
Bug: T273426
Change-Id: I793a66f5c5877451b70058e9388dd86b3fcaadd7
2021-05-10 11:18:17 +00:00
jenkins-bot 68f8f26fd7 Merge "ArticleTargetLoader/Saver: Move vars inline" 2021-05-06 16:14:13 +00:00
Ed Sanders 2cf163fa23 Move vars inline in preinit code
Change-Id: Ice86931a48b4563a881af16d2fe8e344d49bc73f
2021-05-05 18:06:37 +01:00
Ed Sanders db90e1e610 ArticleTargetLoader/Saver: Move vars inline
Change-Id: I4afe5d0c68cb6284fe5178674e8942afb2b9d5bd
2021-05-05 16:56:49 +01:00
jenkins-bot 396876fe43 Merge "Check if actionTools.notices is set before using" 2021-05-05 15:16:44 +00:00
Kosta Harlan 298cb41ed3 Check if actionTools.notices is set before using
Ib957eac2d checked to see if actionTools.notices existed before
destroying it, but assumed it always existed if editNotices was
set. This patch adds a check before attempting to show editNotices.

The error occurs because Ibc7fa48df unregisters the 'notices' tool
(along with many others) for AddLinkArticleTarget.js in
GrowthExperiments. I92a3162ef in GrowthExperiments will empty out
any notices to work around this problem.

Bug: T281960
Change-Id: Idacd365efa82ecd5c0074ead035eda0cb9444b1f
2021-05-05 08:27:55 +00:00
Adam Wight d5b5300fc1 Container as a local field
We're about to replace this jQuery element by a OOUI container, and
can take an initial step by reducing its lexical scope.

Change-Id: I4123c8d22c01040fc2f61180304254498b21f5fd
2021-05-04 16:25:45 +02:00
Adam Wight cd60daf072 Internally rename container for parameter docs
The name "description" conflicts with the TemplateData field name,
which is only one of several documentation fields.

Change-Id: I0942701204fe8499e8890740585b9a02c1d14c63
2021-05-04 16:24:07 +02:00
Adam Wight abdbb7d7ff Internally rename container for adding an undocumented paramter
The internal name "more" conflicts with new collapsible buttons.

TODO: looks like TemplatePage has an analogous field?

Change-Id: I10b24758316a6cc3fbd236c77daffa014fcdafc6
2021-05-04 16:23:53 +02:00
jenkins-bot b20ad7c730 Merge "Optional feature makes the transclusion dialog bigger" 2021-05-04 10:49:44 +00:00
jenkins-bot 172684b543 Merge "Make convert to wikitext on paste feature configurable (temporarily)" 2021-05-03 22:19:53 +00:00
Ed Sanders fab7ad9d92 Make convert to wikitext on paste feature configurable (temporarily)
Bug: T280745
Change-Id: Icc716563e5536b4ef33a48ba10a72f3a39bdec35
2021-05-03 21:16:54 +00:00
Adam Wight ded8c40915 Optional feature makes the transclusion dialog bigger
When $wgVisualEditorTransclusionDialogInlineDescriptions is set to
true, the template dialog will use a larger format.

Bug: T273971
Change-Id: Iad3c3f4d65125c83e35414ce15f793f6a1b192ef
2021-05-03 16:53:27 +02:00
jenkins-bot a4d1863a80 Merge "Use standard search API when searching for templates" 2021-05-03 08:12:35 +00:00
Thiemo Kreuz 6e08a27fc7 Use standard search API when searching for templates
Bug: T274903
Change-Id: I7de8f6cc55ab678ed741ae5ebbaad608b9a9b0db
2021-04-30 12:52:45 +00:00
Thiemo Kreuz 346216c050 Update more test code to use ES6 syntax
This patch is mostly about the arrow syntax.

Some places can not be updated because the arrow syntax also
changes the meaning of `this.…`, but some code relies on that.

Change-Id: Ida3ab0e0950a428fbd1a85f281013778ee879df4
2021-04-30 10:08:45 +00:00
Thiemo Kreuz 2611f907a9 Update all tests in the ve-mw module to use ES6 syntax
Change-Id: I75f8864c66c9b2a78c683d425d54a94515b74f24
2021-04-30 08:07:54 +00:00
jenkins-bot 1f853bb33d Merge "Fix ve.init.mw.MobileArticleTarget.save return value" 2021-04-22 16:33:01 +00:00
Gergő Tisza b902b09784 Fix ve.init.mw.MobileArticleTarget.save return value
Like its parent method, ve.init.mw.MobileArticleTarget.save
should return a promise.

Change-Id: Ic3b390e613aa71aea4e7375a1f6e421cbd4f854c
2021-04-22 14:58:59 +00:00
WMDE-Fisch e3197a82ff Increase space between fields when using inline descriptions
Bug: T273425
Change-Id: I3bf31622dbf794e1de1fa69b4fac68114c5689f7
2021-04-20 18:27:03 +02:00
WMDE-Fisch 2920c68adf Use verbose label for the example
Bug: T273425
Change-Id: Ia56aa35f98f31859e48781848b7481ebd5e2bd1c
2021-04-20 10:34:52 +00:00
Andrew Kostka 3c2db5fba9 Relocate parameter descriptions in the transclusion dialog
Bug: T273425
Change-Id: I2044b65ba88ae00e394fb84cb8e96a218995918a
2021-04-15 13:08:53 +02:00
Andrew Kostka 43c1ec5f42 Add filtering for the suggested values combo box
Bug: T271898
Change-Id: Ifb0deb117fbe40bd43c62d8be235a239a2b37f25
2021-04-14 14:11:50 +02:00
jenkins-bot 7ce573802a Merge "Add command to insert non-breaking space" 2021-04-13 19:05:43 +00:00
jenkins-bot 1e4de0e464 Merge "Add a combo box for suggested values in the transclusion dialog" 2021-04-09 10:40:33 +00:00
Andrew Kostka de2f5b3055 Add a combo box for suggested values in the transclusion dialog
Bug: T271898
Change-Id: Ic637eea2cac45f79234b62c787e1b76d68b61570
2021-04-08 16:10:22 +02:00
Bartosz Dziewoński fb32aa4978 Revert incorrect changes to ve.ui.MWBackCommand that made it stop working
This would would be correct if it was in a method of ve.ui.MWBackTool,
but this is actually a different class ve.ui.MWBackCommand (they are
both in the same file), which doesn't have a 'toolbar' property.

This partially reverts commit 4984c5ffbb
"Avoid using mw.ArticleTarget methods on global ve.init.target in tools".

Bug: T279613
Change-Id: Ia5e80e34cc5021295639cf18b3c324d2821aecf5
2021-04-08 15:37:46 +02:00
Bartosz Dziewoński 1abb5a5786 Add command to insert non-breaking space
Triggered by Ctrl+Shift+Space on PC.

On Mac, there is no trigger, we rely on the built-in OS shortcut.

Bug: T53045
Change-Id: I9630804c833d755910589022b0ca78208337d804
2021-04-08 00:09:35 +02:00
jenkins-bot 8fb68f49a1 Merge "Avoid using mw.ArticleTarget methods on global ve.init.target in tools" 2021-04-03 12:59:18 +00:00
Bartosz Dziewoński e04f78d48a Replace use of deprecated CSS class 'mw-ajax-loader'
Bug: T278894
Change-Id: I100bbe06da198f5175366c25b74daf3af986aae3
2021-03-31 20:46:58 +02:00
Bartosz Dziewoński 4984c5ffbb Avoid using mw.ArticleTarget methods on global ve.init.target in tools
Bug: T278399
Change-Id: I49475db2aa014ef4807ff55755c1b773e6aa0e6a
2021-03-30 15:27:54 +00:00
jenkins-bot 1864aa3928 Merge "Fix displaying error message when preview fails" 2021-03-20 17:36:20 +00:00
Bartosz Dziewoński 4cb6842f86 Fix displaying error message when preview fails
Follow-up to 5f1c68945d,
I didn't realize that showPreview() expected strings.

Bug: T277696
Change-Id: I78af5786d211f724728ed81e28170d2d6be6125b
2021-03-18 13:45:07 +01:00
jenkins-bot 14a95ef9fc Merge "MWEditSummaryWidget: Don’t query for title" 2021-03-15 11:36:29 +00:00
jenkins-bot c29e5a8c6a Merge "MWEditSummaryWidget: Handle suppressed comments" 2021-03-15 11:36:26 +00:00
Lucas Werkmeister b6a4e76d42 MWEditSummaryWidget: Don’t query for title
As far as I can tell, the code only uses the comment, nothing else.
Omitting the title probably won’t make the underlying database query any
cheaper, but it should at least save some network traffic.

Change-Id: Ideb66ce3a24fb4f42fe8fc22ba0e93d05724d8b6
2021-03-13 13:48:21 +01:00
Lucas Werkmeister 9d7ddcf066 MWEditSummaryWidget: Handle suppressed comments
Bug: T277368
Change-Id: I76887672a0e8b3a2047d1b1b47724f1ee513db23
2021-03-13 13:48:20 +01:00
Bartosz Dziewoński 989792ac7f ve.dm.MWTemplateModel: Never remove empty required parameters
Follow-up to d127dc48b7.

Bug: T276989
Change-Id: I042b2ce180e3af4ae6899cb7d8c7ed8246f25cb6
2021-03-12 22:50:42 +01:00