Commit graph

967 commits

Author SHA1 Message Date
WMDE-Fisch f65eac3d66 Add placeholder for finding a template
Bug: T296465
Change-Id: I07c6e601111073b1269a3ab6c552f83e12196156
2021-11-26 16:30:19 +01:00
WMDE-Fisch 26cab3125d Only use aria description on multipart transclusions
Moving responsibility to the part widget to check if we're in a
single transclusion.

Bug: T295353
Change-Id: I61b7891c04eb729647e2600318a97987fd88cb90
2021-11-15 12:22:12 +01:00
Andrew Kostka 72641151e4 Implement floating help dialog for templates
Bug: T294839
Change-Id: Id224b61bd0cd57f5e970ab62db2d82dab1db9252
2021-11-09 15:28:23 +01:00
WMDE-Fisch 3e28977087 Remove local aria-multiselectable
Added to OOUI v0.42.1 see I717ff53e18e95c72ace1c46b6236cfecb5cd8217

Bug: T291284
Change-Id: I45965181f22f9c5845f6dd44ab75e95305a43dce
2021-11-05 09:10:21 +01:00
jenkins-bot f223046fc8 Merge "Introducing a mixin for ARIA descriptions on parameter selection" 2021-11-01 15:56:51 +00:00
WMDE-Fisch f9fda0594f Introducing a mixin for ARIA descriptions on parameter selection
Allows setting aria labels and descriptions on elements in a
convinient way. I did not use the the .mixin. convention here for
because there's already another mixin in that folder that's also
not having .mixin. as part of its name. And then there's also no
no need to open up that extra namespace here.

If we move this upstream at some point this can be changed though.

Bug: T291284
Change-Id: I1b3d40400d539f851f13719e16ced200968a7f92
2021-11-01 13:20:00 +01:00
WMDE-Fisch dab5b5daae Add ARIA descriptions to sidebar widgets
When changing the source in the described-by attributes the screen
reader will read the text of the new source when the status changes.

Just changing the text within the elements holding the descriptions
does not work.

Bug: T291284
Change-Id: I31cc3061cf6c1f699babe41e99e0711f0eb03646
2021-10-29 12:07:53 +02:00
jenkins-bot 4de710ca71 Merge "Add a11y label to sidebar parameter selection" 2021-10-22 11:51:44 +00:00
jenkins-bot 9a0d34aeae Merge "Add title to sidebar search" 2021-10-22 11:34:04 +00:00
WMDE-Fisch 6e7332193b Add title to sidebar search
Also to improve screen reader a11y.

Bug: T291284
Change-Id: Ib56d3ee542cb880edd7788ff524a72436e102627
2021-10-22 12:34:57 +02:00
WMDE-Fisch 79f1270593 Add a11y label to sidebar parameter selection
Bug: T291284
Change-Id: I581800d2c92c06c3585ac48be0242860f476022b
2021-10-22 12:31:24 +02:00
Isabelle Hurbain-Palatin 3a3437007a Handle annotation tags as nodes rather than metaitems.
Preserve the place of annotation meta tags; adds information for the
users about annotation and, if necessary, annotation range extension.
The messages and individual handling of annotations for the annotation
range can be defined by the extensions: see I0b58a418 for an example
of how that can look like.

The structure of this patch closely follows the one from I104e7abbd
(handling of <noinclude> et al.).

Bug: T261181
Change-Id: I39029e4a63d22b37107edec066006557bcff34bf
2021-10-21 10:39:04 +02:00
jenkins-bot abd115c054 Merge "First QUnit test for dialog classes" 2021-09-29 11:57:30 +00:00
Adam Wight d70941593d First QUnit test for dialog classes
Wrote a first test, that checks the parameter checkboxes showing up.

Bug: T291155
Change-Id: Ie79272442a0d0532607fe93e9ea538635812e671
2021-09-29 10:00:34 +02:00
Thiemo Kreuz 66d5f13dfb Remove obsolete …OutlineWikitextWidget test
The feature set is (almost) fully covered by other tests, notably
the tests for the …OutlinePartWidget base class and the other two
subclasses.

The only bit that's not covered any more is the
"visualeditor-dialog-transclusion-wikitext" message. But that's
super minor and not worth a separate QUnit test.

Bug: T291157
Change-Id: I574f9cff0baf3dff885094769c124a9e05a1d1c8
2021-09-28 08:37:47 +00:00
jenkins-bot 37c5e5978e Merge "Move data model tests to correct directory" 2021-09-24 11:52:36 +00:00
jenkins-bot 5bfcb73bc6 Merge "Order all messages in extension.json alphabetically" 2021-09-24 11:52:33 +00:00
Thiemo Kreuz 63d9969861 Rename outline "container" widget
I can't really tell what insight we get from the word "container".
Every widget is a "container" in some sense, isn't it?

This widget is just _the_ outline, I would argue.

Other suggestions?

Change-Id: I1fb27ee58c1a3dd790022504e978198dadf7ea02
2021-09-24 12:32:29 +02:00
Thiemo Kreuz 8125644ac2 Move data model tests to correct directory
Bug: T291062
Change-Id: I7425f047d07eceeae29b54106f7f7806fc929aa2
2021-09-22 14:09:33 +02:00
Thiemo Kreuz ca2823119d Order all messages in extension.json alphabetically
This was mostly alphabetical already. There are only a few outliers.
Some of them introduced by us recently.

Change-Id: I0ba10d5cce62a35023ec1c8311e49febcd4a21c7
2021-09-22 13:36:47 +02:00
Thiemo Kreuz 224cc9ab12 Consolidate messages about missing/bad templates
This is mostly re-arranging existing code. Actual changes made:
* Remove the message that claims a template can't exist. We can't
  really know this.
* Instead show the message about "modifiers" in cases where curly
  braces and other wikitext syntax is involved.

Bug: T290140
Change-Id: I713d7f54cad2510f9a02c113600980cba8c3e58b
2021-09-22 10:12:16 +02:00
Andrew Kostka 7165efd491 Improve messaging for when a template is not found
Bug: T290140
Change-Id: Ie43c7e2bd72ed92a8a336f6d87a54e6d51cc3f17
2021-09-17 13:39:11 +02:00
Thiemo Kreuz 3b59d7ce0d Add tests for ve.ui.MWParameterPage class
Change-Id: Ie09ef4745c006822cc66e845cb16f54d62fa3b7e
2021-09-11 17:39:17 +00:00
Thiemo Kreuz 3f97610e6e Add tests for .containsValuableData() methods
Bug: T272355
Bug: T290554
Change-Id: Icebf7139ed64cdad49522f7b082d1925a9a4a21b
2021-09-10 15:38:28 +00:00
jenkins-bot 843aa24efd Merge "Don't allow users to add parameters that contain forbidden chars" 2021-09-10 10:14:53 +00:00
jenkins-bot 022db20850 Merge "Add input validation to the add parameter page" 2021-09-10 10:14:50 +00:00
Thiemo Kreuz 94a419e9a6 Fix missing and flipped template dialog help messages
Bug: T288465
Change-Id: I4aaa8d889084b770fa0cafab69a0b65128f3d82a
2021-09-09 16:11:00 +02:00
Andrew Kostka 4c0666fd19 Don't allow users to add parameters that contain forbidden chars
Bug: T285869
Change-Id: I1011949c2724939f3cec1e1a2ae1c821c33eff84
2021-09-09 11:43:49 +02:00
Andrew Kostka 075ca72fe8 Add input validation to the add parameter page
Bug: T285869
Change-Id: Iebb982e95aa19bd61fcda915981d505cc243c4b2
2021-09-09 11:42:53 +02:00
WMDE-Fisch 1673f9f8bf Add notes and warning for missing parameter documentation
Bug: T276574
Change-Id: Iba0dd661ccdfd6cbb13aef7e8ace25995ecf0cf8
2021-09-01 17:29:25 +02:00
jenkins-bot bc1af53609 Merge "Text improvements for unkown parameter input" 2021-08-31 14:10:46 +00:00
WMDE-Fisch 14d3e8144c Text improvements for unkown parameter input
- Change description text according to ticket
- Make sure link to template page opens in new tab
- Add missing placeholder text

Bug: T272487
Change-Id: Ie8189e9cb9db5908e8fc5fc8bf7ff20df5595094
2021-08-31 14:57:24 +02:00
jenkins-bot 49eaab5139 Merge "Add tests for ve.ui.MWTransclusionOutlineParameterSelectWidget" 2021-08-31 12:04:02 +00:00
jenkins-bot ef486588ce Merge "Add tests for new ve.ui.MWAddParameterPage" 2021-08-31 10:55:16 +00:00
Thiemo Kreuz 5ffaa3e313 Add tests for ve.ui.MWTransclusionOutlineParameterSelectWidget
Note this covers both the outer SelectWidget as well as most of
the functionality of the item class. This is because the outer
widget manages everything. The items are mostly dumb containers
for a `.selected` bool flag.

Bug: T289560
Change-Id: I6bffda3b74a4bca26032e2602563d64f7bf9bf40
2021-08-30 19:48:42 +00:00
Thiemo Kreuz e9bd350f68 Add tests for new ve.ui.MWAddParameterPage
The class was added via Ic5dcd36 just a few days ago.

Bug: T289560
Change-Id: I3f729fb6c5d7c28a221d88294d5547809f10a17d
2021-08-30 13:02:52 +00:00
Thiemo Kreuz 0ba7480901 More complete top-level part selection support in new sidebar
This comes with a few significant changes:
* A whole bunch of places in the code that focus and highlight
  an element in the old sidebar consider the new sidebar now.
* Same when e.g. the toolbar at the bottom needs to know which
  part is selected. This is read from the new sidebar now.
* To make this possible I had to merge the small helper class
  we introduced in I7bc73cc back into the dialog.

It's helpful to understand how the event flow works:
* You click a template name. This does nothing (does not select
  the element). It only triggers an event.
* The event is catched by the outer container that manages
  all parts. From there all elements are unselected, and one
  selected. This call is internal and should not trigger
  another event.

Bug: T285323
Bug: T288827
Bug: T289043
Change-Id: I4a2d2b83cf2691423d4b0e6f4487228fa3c7b56d
2021-08-27 19:16:00 +02:00
jenkins-bot bdb3a783c9 Merge "Add basic QUnit tests for all transclusion outline classes" 2021-08-27 09:59:16 +00:00
jenkins-bot 34992ba3ac Merge "Basic cursor key support in new template dialog sidebar" 2021-08-26 13:46:40 +00:00
Thiemo Kreuz 0bd9e587b3 Basic cursor key support in new template dialog sidebar
Bug: T285323
Depends-On: I47effe05427cfabfcf534920edee79521eaa033f
Change-Id: I319896a20a71b18655ebb93663d47e656a1a67a6
2021-08-26 12:48:49 +00:00
jenkins-bot 6c33cc4a35 Merge "Add message on multipart content" 2021-08-26 07:34:15 +00:00
jenkins-bot 4741abe803 Merge "Added new input page for undocumented parameters" 2021-08-26 07:26:41 +00:00
WMDE-Fisch 67988452ab Add message on multipart content
Bug: T276574
Change-Id: Iff5c2fd4071dd03ca62c395cce4041dacb1c7ea6
2021-08-25 10:47:16 +02:00
Thiemo Kreuz e56b4e82f5 Add test for ve.ui.MWParameterCheckboxInputWidget
This is not a file we created recently, but one we care about.
This is also a nice start to get in the mood to write tests.

Bug: T289560
Change-Id: I6475b00508cfa9188ab0d78c2bfd31bab8aed6ed
2021-08-24 15:44:43 +00:00
Thiemo Kreuz f6953d4096 Add basic QUnit tests for all transclusion outline classes
This is just the smallest possible boilerplate to get the first
trivial test running. More test cases will be added in the
following patches.

Bug: T289560
Change-Id: I3a4e49a7b9761db00b211e933386bad71d4f0942
2021-08-24 11:31:14 +02:00
Svantje Lilienthal 5c9fbca085 Added new input page for undocumented parameters
Bug: T272487
Change-Id: Ic5dcd36c9f647f9b52b98e5a520a1df1960a5b48
2021-08-24 10:18:43 +02:00
Thiemo Kreuz 4f9426d61a Rename …ParameterCheckboxLayout now that it's an actual Widget
This is a direct follow-up for Idc5e048.

Bug: T285323
Change-Id: Ia03d594386a9a59a4819bf78c7d2edcd465dfd52
2021-08-20 09:56:40 +02:00
WMDE-Fisch 199d9536d1 Use the "wikitext" for content in transclusions
Bug: T272482
Change-Id: Ibe68b49c25b4f0d88483c22e0e4b8462d935a45b
2021-08-17 13:06:49 +02:00
jenkins-bot 0e6c56160e Merge "Show sidebar controls only when multi-part content is present" 2021-08-16 10:54:41 +00:00
jenkins-bot 991e34c166 Merge "ApiVisualEditorEdit: inject services" 2021-08-11 20:08:42 +00:00
Roman Stolar 0519e98725 Replace Content::preSaveTransform call to ContentTransformer::preSaveTransform
Bug: T287156
Change-Id: Ieaf645dab42c0e6def9fc36ecc619843710656f4
2021-08-11 18:44:35 +03:00
Andrew Kostka a2135d524d Show sidebar controls only when multi-part content is present
Bug: T272482
Change-Id: I092438bc9c7d5569f758786ca6952beffdf37507
2021-08-11 15:00:59 +02:00
Alexander Vorwerk 2fbd7f5c11 ApiVisualEditorEdit: inject services
This patch adds dependency injection for the ApiVisualEditorEdit api
module.

Change-Id: I4f75fc32ff422ca0e0f163add1346963eedcc635
2021-08-10 18:16:46 +00:00
Alexander Vorwerk 72693ca46b ApiVisualEditor: inject services
This patch add dependency injection for the ApiVisualEditor api
module.

Change-Id: I46a249fc1a8cf96102ee9fd64bf046d3a3d33361
2021-08-09 11:14:34 +00:00
jenkins-bot 4ab5fd5c6b Merge "Add a message next to undocumented parameters" 2021-07-16 12:05:29 +00:00
Svantje Lilienthal 066c663864 Add parameter search to sidebar of VE TemplateDialog
Bug: T272481
Change-Id: If044e5d134f1b24f939c4786949e6ca34fb79e1e
2021-07-16 09:48:29 +00:00
Andrew Kostka f02c48ea52 Add a message next to undocumented parameters
Bug: T274550
Change-Id: I1af71150239ebc9966cc22e7d28883fbac99fdf1
2021-07-15 14:47:21 +02:00
Thiemo Kreuz 170ca9d58a Reuse generic button widget for elements in the new sidebar
This introduces another generic "button-like" class that can
be reused in multiple places in the new sidebar. The main
change in this patch is the "add more information" button
which is now an instance of this new class as well.

This patch also simplifies over-complicated setup code in
related widgets.

Bug: T274544
Change-Id: I0cfe7675d02fdd5c5dc8d9198bb3f4aec9abf397
2021-07-13 17:23:27 +00:00
Thiemo Kreuz a1384f34f3 Add template outline widgets for all content types
The two new widgets are pretty trivial now, thanks to the base
class.

Note there is still no code to delete the widgets. That's also
why you will always see a placeholder widget at the top. This
will be fixed with the next patches.

This patch also renames most of the "…TemplateOutline…" classes
to "…TransclusionOutline…" The reason is that these widgets are
not for a single template, but part of the container widget for
a more complex transclusion (i.e. a sequence of multiple
templates and wikitext snippets).

Bug: T274544
Change-Id: If4219b0b8ad4d1969ab1ec5ec4db0728811bab35
2021-07-12 09:19:06 +02:00
Thiemo Kreuz cfe2dadc93 Abstract base class for top-level items in template editor
This base class will be used to style the 3 types of top-level
items in the sidebar the same way, without the need to
duplicate code or styles.

Bug: T274544
Change-Id: I1a62ff610728d7150dea1717316ef20f6882783a
2021-07-09 15:48:08 +02:00
Thiemo Kreuz fecded9f70 Fix parameter search being to relaxed on unknown params
When what you type is a partial match, you can't add it as an
unknown parameter, even if that would be the correct action. The
reason for this unexpected edge-case is a mistake in the code
where a variable called "exactMatch" is set when a *partial*
"nameMatch" was found.

Bug: T285940
Change-Id: I6d12e2d7251a19d7d5f8be544c3c32a3ac14fcf0
2021-07-01 20:09:51 +02:00
Thiemo Kreuz 3d02c1f364 Add new QUnit test for ve.dm.MWTemplateSpecModel
This patch also marks 2 methods as @private that are not and
should not be used outside of this class.

Bug: T285483
Change-Id: I8a8ffc4868a369b5c47068beb0e83f023872543d
2021-06-24 17:59:38 +02:00
Andrew Kostka 6a890c31bd Remove extraneous ve.ui.MWTemplateOutlineCheckboxListWidget.js
Bug: T274545
Change-Id: I327ee06aff19fd2d3841e4e4a2d09a24c47e4d89
2021-06-24 11:12:12 +02:00
WMDE-Fisch 407ff95597 Rename OutlineParameterCheckboxWidget to OutlineParameterCheckboxLayout
This not really just a checkbox widget anymore it inherits from
FieldLayout and became something more in that direction.

Let's use a mixture of these things to make it a bit clearer.

See also comment in Ie81b84be288553343017c4aaf8691c4e266995f5

Change-Id: Iff1746a8e5e94b56eb6c27465405aaf6b74c2310
2021-06-21 09:08:54 +02:00
Adam Wight 988cda65dd Template dialog checkbox list
Introduces new widgets forming the backbone of the experimental
template dialog sidebar.

FIXME: `text-overflow: ellipsis` is not working yet, the container
styles need adjustment.

Bug: T274543
Change-Id: Ie81b84be288553343017c4aaf8691c4e266995f5
2021-06-17 08:47:47 +00:00
Thiemo Kreuz d9596c7f20 Add tooltip to "dismissible message" close button
Bug: T284742
Change-Id: Ibf0cb23c44d440e7a986bc85120f4ea0f844d999
2021-06-17 07:57:10 +02:00
jenkins-bot 2a74f10909 Merge "Dismissible feedback message for the template search" 2021-06-16 11:02:50 +00:00
Andrew Kostka 13d1c4d2ac Dismissible feedback message for the template search
Bug: T284742
Change-Id: I5dc32521b899c3c9d35d1bf77d346384e4cc87e6
2021-06-16 10:03:04 +02:00
jenkins-bot 4c7f5ff805 Merge "Introduce a new class to encapsulate booklet inter-pane wiring" 2021-06-15 14:55:16 +00:00
WMDE-Fisch 950a689063 Move suggestedvalues-warning to match alphabetical order
Change-Id: Id79223b63cc88d5e61f43d1b07afe380b9faf85a
2021-06-11 13:20:31 +02:00
WMDE-Fisch 09d98669df Rename expand and collapse button msg key names
These are currently more confusing than helpfull. Also applied
alphabetical order.

Change-Id: I4d48f7bc28b403142a5818d1c7a062872afc660d
2021-06-11 13:16:44 +02:00
Adam Wight 44035a2384 Introduce a new class to encapsulate booklet inter-pane wiring
Begin to extract the wiring between a sidebar and the content pane of
the template dialog booklet layout.  Eventually, this helper class
will present a high-level interface like "addPart(id)" and will take
care of creating the outline item, content page, and connecting
events.

Start very simple, take over the "focus" method.

Bug: T284632
Change-Id: I7bc73cc4386b99d95941fc6ed88ab5bd998de014
2021-06-10 15:30:51 +02:00
Svantje Lilienthal 1a707e2aad Add message linking to project page for feedback
Bug: T284560
Change-Id: I8ac45db4844c8ccb65595e8bfe3fb68be9bb02ee
2021-06-10 11:28:42 +02:00
jenkins-bot 2b0da3e338 Merge "Update template dialog title when multiple transclusions present" 2021-06-08 08:14:11 +00:00
Bartosz Dziewoński a4cafb1691 Update VE core submodule to master (1f76dea7e)
New changes:
6cde8742e i18n: Rename keys for error messages in rebaser

Local changes:
* Rebaser i18n message renames

Change-Id: I0c2e3a956c81f625822bacd40835dc4fadb57211
2021-06-04 23:53:02 +02:00
Andrew Kostka 67e48a26ef Update template dialog title when multiple transclusions present
Bug: T276568
Change-Id: I530a6cd8aea4f9fcafe7a03fc5050883f1f4b37c
2021-06-04 16:48:05 +02:00
jenkins-bot bc0f405317 Merge "NWE: Always paste rich text as plain, and show context item to convert" 2021-06-03 18:15:59 +00:00
Adam Wight d4eee82701 Update template dialog titles: Insert/Edit
Toggle depending on whether the transclusion existed or is new.

Bug: T276568
Change-Id: Ib9b76cac7cd57245e8db2ef10879069a86a6269e
2021-06-02 12:36:38 +02:00
jenkins-bot 7fe5b6a433 Merge "Template dialog button title toggles between Insert/Edit" 2021-06-02 10:34:53 +00:00
Adam Wight c49478de60 Template dialog button title toggles between Insert/Edit
Depends on whether this is a new or existing template transclusion.

Split from Ib9b76cac7cd57245e8db2ef10879069a86a6269e

Bug: T276568
Change-Id: I4d22e32fef067b640e9a9389deffaace736c3405
2021-06-02 12:00:15 +02:00
jenkins-bot fa94c27a8d Merge "Change header titles in the template dialog" 2021-06-02 09:05:04 +00:00
WMDE-Fisch 58cf1b0344 Change header titles in the template dialog
Bug: T276568
Change-Id: I5da40032c5b83d04ae92e86372c445d7a28d0444
2021-06-02 08:48:07 +00:00
Thiemo Kreuz 621bca1df4 Show redirects as part of description in template search
These are the most minimal (and therefor most stable,
hopefully) hacks I could come up with so far.

Bug: T274903
Change-Id: I28ba414dd34aad756e29400eb656f0942291a923
2021-05-27 12:40:51 +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
Andrew Kostka b2c9b225bd Add back button to the transclusion dialog
Bug: T272354
Change-Id: I08c4a7db6239b485439bf547e3e8b4d6f7aeede8
2021-05-17 13:18:14 +02:00
Adam Wight 85f45fd49d Introduce feature flag for template dialog sidebar changes
Bug: T274263
Change-Id: If274efa94474c3de79c5917b76c1a290f93172e1
2021-05-17 12:25:46 +02:00
Ed Sanders ea9ea1d17f NWE: Always paste rich text as plain, and show context item to convert
Bug: T282789
Change-Id: I1bc32c9e16140190baef9bcb08d49b4b21896883
2021-05-13 15:56:19 +01: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 5d1e79630f Merge "Introduce VisualEditorApiVisualEditorPostSaveHook" 2021-05-06 17:57:38 +00:00
jenkins-bot a4d1863a80 Merge "Use standard search API when searching for templates" 2021-05-03 08:12:35 +00:00
Kosta Harlan f035ce51f1 Introduce VisualEditorApiVisualEditorPostSaveHook
What:

Add hook that runs after a save attempt is made in ApiVisualEditorEdit.
The hook receives the same data available in ApiVisualEditorEdit, and
implementations of the hook can modify the API response.

Also introduce templated
parameters (https://www.mediawiki.org/wiki/API:Templated_parameters) in
the API parameters; this allows plugins to pass arbitrary data along
with their request using e.g. plugins=linkrecommendation&data-linkrecommendation=foo

Add ServiceWiring files, a PHP namespace, and a HookRunner class to
support the above changes.

Why:

VE plugins may wish to send additional data when saving an edit and take
action based on that data on the server-side. See for example the
AddLink plugin in I7a052f8e which sends annotation data, and then uses
the new hook to perform a database operation.

Change-Id: I392691475fbdcec766acbd832600e82efcb5bfe8
2021-04-30 20:50:01 +02: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
Cindy Cicalese 442f5da371 Replace usage of deprecated User watchlist methods
This bumps the MediaWiki requirement to 1.37.

Bug: T281187
Change-Id: Iddcd1cbf67ad1f8e918c1da07347dd19e5f6f7d9
2021-04-29 09:32:22 -07: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
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 e04f78d48a Replace use of deprecated CSS class 'mw-ajax-loader'
Bug: T278894
Change-Id: I100bbe06da198f5175366c25b74daf3af986aae3
2021-03-31 20:46:58 +02:00
jenkins-bot e0e57eee45 Merge "Finalize event platform migration" 2021-02-25 09:27:09 +00:00
Adam Wight 28cb0b27de Finalize event platform migration
Bug: T275015
Change-Id: I8ad39924bce85da4dc09be23926ad33d1529a8db
2021-02-24 17:05:10 +01:00
vladshapik 3d29dd25e9 Avoid using User::IsIP
Remove using of User::isIP since this method will be hard-deprecated. Now it is soft-deprecated

Bug: T275602
Change-Id: Ia625be523706d1e24649f7aa15679491f9598b7f
2021-02-24 17:38:04 +02:00
Bartosz Dziewoński ef8e7945cc Stop showing the "Editing tabs" popup some time after SET switch
If someone has edited before the switch (2016-ish), never edited since
then, and try to edit again now, it's probably no longer helpful to
show them a popup dialog about a change that happened 5 years ago.

The immediate motivation for this, though, is T273189. We discovered a
bug with the preferences that, among other issues, caused this dialog
to not be shown in some cases where it should have been, and fixing
the bug now would cause it to be shown the on the next edit attempt.
If someone has edited before the switch (2016-ish), *and* edited since
then, and try to edit again now, it's definitely not helpful at all to
show them a popup dialog about a change that happened 5 years ago.

Bug: T273189
Change-Id: I4b5a3d8dbdf1c853eb39fcfc85a9fe87a4db0f21
2021-02-05 12:41:01 +00:00
Bartosz Dziewoński b1fa5839c4 Remove two unused configuration options
* VisualEditorNewAccountEnableProportion
* VisualEditorAutoAccountEnable

Seemingly never used on Wikimedia wikis, and untested since 2016.

Bug: T273177
Change-Id: Ic132ef2091399fd223626ae307830f278e72ec01
2021-02-05 12:40:28 +00:00
jenkins-bot b6033895f5 Merge "Add edit count bucket to VisualEditorTemplateDialogUse events" 2021-02-01 10:22:38 +00:00
Bartosz Dziewoński d65fe812f5 Show non-breaking spaces in the editor
MWEntityNode representing &nbsp; is now displayed with a light
grey background and has a tooltip explaining that this is a
non-breaking space and not a random grey blotch.

This is not done for TextNode (in core VisualEditor), as that doesn't
actually work: Parsoid converts all &nbsp; in input to regular spaces.

It's still not easily possible to insert a non-breaking space.

Bug: T96666
Change-Id: Icbdf7cc3e5d675b199d08777a3439dc5dedceac1
2021-01-28 19:09:29 +00:00
jenkins-bot 6a8350b92b Merge "ve.dm.MWTemplateModel: Don't add spurious empty parameters" 2021-01-27 16:31:10 +00:00
Ed Sanders d831370ed4 Update VE core submodule to master (ca6a97f42)
New changes:
4589f5f00 Clear node offset cache when leaving read-only mode
68b0f8372 Show attribute changes as diffs when appropriate

Local changes:
Pull through for Ic6ec7f5ebabc912235ff7e688425f415f2c3ff20

Bug: T272603
Change-Id: I574fc56799ed165e63e16881429c4ed740850234
2021-01-22 20:40:28 +01:00
Adam Wight 9a1072a960 Add edit count bucket to VisualEditorTemplateDialogUse events
Bug: T269986
Change-Id: I68cc15d58a23149a6edc71cac229f6b29d33fd92
2021-01-21 13:17:03 +01:00
Ed Sanders 4e33a6ff0a Follow-up e04e98458: Add missing "Moved down/up" messages
Change-Id: I3cea39f7915e1627f68c3280357517e607b90772
2021-01-19 22:55:03 +00:00
Ed Sanders e20decc77c MWSaveDialog: Remove wrap option from showMessage
This was used when we used to pass API errors to showMessage, but
is now unused by the two remaining users (missing edit summary, and
"press ctrl+enter to submit").

Change-Id: I8a6b4db78d4e451cf3ec85fcdfd8293328aaaa3c
2021-01-16 16:22:23 +00:00
James D. Forrester 075d976f25 Update VE core submodule to master (3fc99cc9c)
New changes:
d1928f49d Describe text style annotation changes, instead of showing remove-insert
3fc99cc9c Describe link addition/removals

Bug: T160588
Change-Id: I44ffe020e22f8602fc0d5abbac66bfcda0f873e8
2020-12-18 12:49:14 -08:00
WMDE-Fisch 2ce9934ab9 Add tracking of template usage
The names in the schema are roughly following what's
done in Schema:TemplateWizard. The information if
templates have TemplateData will be logged seperatly.

Bug: T259705
Change-Id: Iafa7256f675dbfd6a5a6de794061901780e3c55d
2020-12-16 12:56:45 +01:00
Ed Sanders 9c926903a0 CollabTarget: Add missing message
Change-Id: I162ea3de02b902d9076f9656b9fe872adf85cd86
2020-12-04 14:43:45 +00:00
Máté Szabó d127dc48b7 ve.dm.MWTemplateModel: Don't add spurious empty parameters
Make ve.dm.MWTemplateModel#serialize ignore empty parameters if they were not
present in the transclusion before the edit. This avoids dirty diffs where an
user edits a template transclusion via VisualEditor, and the editor adds all
available template parameters to the edit wikitext, even if they were not
changed during the edit.

This logic was ported from the old Wikia-WMF VisualEditor project.[1]

Additionally, add tests for ve.dm.MWTemplateModel serialization.

---
[1] https://github.com/Wikia/app/pull/6450/commits/858eaa9

Bug: T101075
Change-Id: I35f8812724658904d30034db4e4684193a661c1e
2020-11-16 19:54:44 +01:00
Bartosz Dziewoński 9f9966d1cd ApiVisualEditorEdit: Use action=parse 'subtitle' option
Bug: T259313
Depends-On: Id1fa03d05e6a984862861a1de37d84e48a692d79
Change-Id: I15df60de7c2376d04e07c27a8c1f4d057af53b20
2020-10-29 18:49:51 +00:00
Ed Sanders 6c36e403aa Convert ve.init.mw.DesktopArticleTarget.init-vector.css to LESS
Change-Id: I5e7c56ebf9e68706e8fc39b1bd4bf81be878ffe4
2020-10-14 13:11:48 +01:00
Ed Sanders 5c84f0cd88 Rewrite EducationPopup so it isn't a mixin
Reference images are moved to Cite and used by Citoid.

Bug: T170919
Bug: T171292
Depends-On: I02041246dda1b3d3ad1bcc0b014fa022e8259b62
Change-Id: Id97659ed1fa64a1223a8957fefaf2a149edd0e9c
2020-09-24 21:33:50 +01:00
Bartosz Dziewoński a98946ca81 Add missing test file (ve.DiffMatchPatch.test.js)
Change-Id: I3c09fe669ad8391300762af3ce026ede7114ce10
2020-09-08 13:54:37 +01:00
Ed Sanders 519bef6a9a extension.json: Sort config, Hooks, DefaultUserOptions & AutoloadClasses
Change-Id: I6a62ccb0843653da50c46693aed4945b21e90ee5
2020-09-07 19:14:14 +00:00
James D. Forrester 8a78603988 Drop support for wgCommentByteLimit, hard-coded null in MW nowadays
Change-Id: I767e0633415568134c46fccbafdaceb1ab76dea3
2020-08-26 20:25:38 +00:00
C. Scott Ananian 49a3387323 Remove Parsoid integration hack, added for 1.35 LTS
We'll update this before 1.36 is released, unless we get Parsoid
integrated "properly" before then.

Change-Id: I92d8555b1f5dc121c5f596b5cb6d59414280388f
2020-08-24 15:34:44 -04:00
Ed Sanders ac085df47e Create config option for making VE a BetaFeature, off by default
Currently we always register VE as a Beta Feature, and then
expect users to use $wgHiddenPrefs to hide it, hackily.

Also, set this new preference to false so that 3rd party
wikis don't show the BF by default.

Bug: T254349
Change-Id: I92fe3d44bb4d762ca7b1bc693b7d2e74367c84ec
2020-08-18 15:52:51 +00:00
Timo Tijhof 95d1ea520b ve.init.mw.DesktopArticleTarget.init: Update mediawiki.page.ready dependency
In MediaWiki core, Ic418c23a740 moves mediawiki.page.startup into
mediawiki.page.ready, leaving an alias behind. Once that change lands,
this change is safe to land as well to avoid the indirection and so
that the core alias can be removed swiftly (VE is the only user).

The dependency on mediawiki.page.startup was originally added in
I494b364b485e6 to make sure that accesskey tooltips are computed by
mediawiki.util, before VE initialises (this happened via mw.util.init,
which at the time was called from mediawiki.page.startup.js),
This has all changed a lot in the years since then and might not
actually be needed any more. If that's the case, feel free to remove
the dependency instead.

Depends-On: Ic418c23a7400abba22fd07b17f173d3c5f1d1d10
Change-Id: I250b38a836f28bfb440f19282a9677977f30c615
2020-08-14 23:37:47 +00:00
Ed Sanders 09f4af2a63 CollabTarget: Add close button on mobile
Move comment button into 'insert' menu to make room.

Change-Id: I00ace1477d08041e9af6d81ae2e6635151575f8b
2020-08-03 07:55:06 +00:00
Ed Sanders dd862a837d MobileArticleTarget: Move MWBackTool to a separate file
Change-Id: I1561f454bcc779f97c758ba7178b09d15f52fe42
2020-07-31 16:15:10 +00:00
Ed Sanders 61edb5c2f7 ExportWikitextDialog: Add explicit editfont dependency
Change-Id: I74e3dd7a78093dd52b5ae6b0474ff3c1e1712775
2020-07-31 16:14:38 +01:00
jenkins-bot 31d7b7efa2 Merge "Special:CollabPad: Replace getPageClasses as if the page were an article" 2020-07-31 13:40:10 +00:00
Ed Sanders 341e86decb Special:CollabPad: Replace getPageClasses as if the page were an article
This stops Vector2 treating the page as a special page where
fixed width doesn't apply.

Change-Id: I4dfed639cfc46be565e491d0df7375e3248e1602
2020-07-31 13:36:04 +01:00
jenkins-bot d377cbe9d1 Merge "Use mw.cookie instead of jquery.cookie" 2020-07-30 22:36:46 +00:00
David Lynch deb218aeec Use mw.cookie instead of jquery.cookie
jquery.cookie is no longer maintained, and we're coming up on maybe
running into issues with sameSite which jquery.cookie doesn't support.
Moving to mw.cookie will let us centralize that fix.

Also, removed some dependencies on jquery.cookie in code that doesn't
seem to ever use it.

Bug: T252597
Change-Id: I8634cfd42c2a5ab3c9d712417a7d1a55508274fd
2020-07-30 17:07:40 -05:00
Ed Sanders ec872093aa ExportWikitextDialog: Add help text
Change-Id: I5508c167aa8119eb86356858fc0eedf69cc093bf
2020-07-30 16:43:59 +01:00
Ed Sanders a9d7884d3b ExportWikitextDialog: Add ellipses to "Export" buttons
This indicates these are not the final actions in the process.

Change-Id: I88227a1025f56ea59ef76a59b81cde22e81a959a
2020-07-30 16:23:02 +01:00
Ed Sanders 3ebcf5695d ExportWikitextDialog: Add copy button to wikitext
Change-Id: I8ed63a0ac38a812b09e51738b25b6b384ba30c04
2020-07-30 16:17:32 +01:00
C. Scott Ananian 4b04f413fa Zero-configuration VisualEditor + PHP for MediaWiki LTS
This copies the Parsoid extension code into includes/VEParsoid
to allow a "one extension, zero-configuration" install of
VisualEditor for MW's LTS release. The Parsoid code has been
re-namespaced (`VEParsoid` instead of `MWParsoid`) to avoid
autoloader conflicts if you actually install Parsoid as an
extension (as we do in Wikimedia production). Similarly, we
arrange that the ServiceWiring and RestRoutes configurations
are skipped unless running in zeroconf mode, to avoid
conflicts with the Parsoid extension.

This import matches Parsoid commit b30f223.

Bug: T248343
Change-Id: Ic63ce40f59c4be8f4fdc5f9ac17798353fc86866
2020-07-13 18:39:08 +00:00
C. Scott Ananian 5e83b1da2c Enable VisualEditor by default
This provides a "zero configuration" installation option for VisualEditor
for the MW 1.35 LTS release.

Depends on a change to mediawiki-config to reset the default in production
to disabled, so that we don't change user experience on the projects.

Bug: T248343
Depends-On: Ic32a4dc4436c8304e9fde4e1ec18401a8403b167
Change-Id: I5e422bc3eaf8a59a098e13802f511c2519583c0a
2020-07-13 08:56:30 +00:00
Bartosz Dziewoński 39b6eb1256 Update VE core submodule to master (806716154)
New changes:
3375a5e83 GeneratedContentNode: Don't try to render if model is detached
c85a59d71 Clear surface.activeNode when table cell is torn down
71b9a08fe CompletionWidget: Use getCoveringRange
530d34e49 Fixes table edit buttons (<>) missing name and role

Local changes:
* Add localisation messages for table edit buttons

Bug: T256500
Bug: T256969
Bug: T257267
Change-Id: Ia75180e0b782b0dbe11e94689f8cee32418b4ae8
2020-07-08 21:03:34 +00:00
jenkins-bot 51b8ff5a72 Merge "Remove warning shown when editing a translatable page source" 2020-07-08 20:18:19 +00:00
Abijeet 24c8b2d2b6 Remove warning shown when editing a translatable page source
Translate itself will show an warning dialog when user tries to edit
a translatable page in visual mode. Editing in the source mode is
allowed.

Bug: T192052
Depends-On: I03ea64353b2d5b28d684f90936cab75ea4fd40d2
Change-Id: Ie4f3a6003c27773c6d0c5086c876fe424befe25a
2020-07-07 11:49:19 +05:30
jenkins-bot 93cc9bcdd6 Merge "Change default value of VisualEditorEnableVisualSectionEditing to 'mobile'" 2020-07-06 19:50:46 +00:00
Akinwale Alagbe 2a581819ec Fix: Adding accessibility labels to Visual Editor template elements
Bug: T245669
Change-Id: I3b792ffde571047d9900920188e92634b8f50298
2020-07-06 18:46:59 +00:00
Ed Sanders 4000d4fd78 Change default value of VisualEditorEnableVisualSectionEditing to 'mobile'
This is already the default WMF config.

Change-Id: If87e545dfb0d2eb97580c1f83d055d8066b4d9f0
2020-07-03 20:58:57 +01:00
DannyS712 b69cf0217f Hooks: Update to use DifferenceEngineViewHeader
Bug: T255769
Change-Id: Ibd80adff646ef51814736716816a5574794dfb1a
2020-06-24 00:44:19 +00:00
jenkins-bot fd8265c8ac Merge "Make VisualEditorDisableForAnons only hide the tabs, not disable the editor" 2020-06-10 19:17:58 +00:00
Ed Sanders 9c8195f823 Replace browser blacklist/whitelist with (un)supportedList
Bug: T254646
Change-Id: Iac0fc850520f2a83954d3fac21b38715e2f76a8c
2020-06-10 16:30:57 +01:00
Bartosz Dziewoński f81f34f59d Make VisualEditorDisableForAnons only hide the tabs, not disable the editor
Bug: T253941
Change-Id: Id08514b3827c4315d69651bc2313bf8317ba12fc
2020-06-08 20:05:58 +02:00
jenkins-bot 76207a90cf Merge "Bump version number" 2020-06-05 17:25:15 +00:00
Bartosz Dziewoński 1fc11e0146 Handle <noinclude> etc. as nodes rather than metaitems
The difference is that metaitems are not visible on the editing
surface, and their exact position is not preserved when the paragraph
containing them is edited.

This behavior is desirable for e.g. categories, but not for
<noinclude> and related tags, which are intentionally placed in
specific places in the text.

Note that we don't really have any editing interface for these nodes
yet. But you can see them (and they come with descriptions and links
to documentation pages), and delete or copy-paste them.

Bug: T250937
Change-Id: I104e7abbd650567df0e59813653c46a66d955d58
2020-06-01 18:47:14 +02:00
Ed Sanders df639d1717 Bump version number
Change-Id: I382aee3563cdcccd2f872c0f1b0ebd0feff6859c
2020-05-20 13:11:29 +01:00