Commit graph

764 commits

Author SHA1 Message Date
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   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   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
jenkins-bot 4233f931fd Merge "Extract Parsoid/RESTBase stuff out of our API code" 2020-05-18 23:49:14 +00:00
Ed Sanders 07867cf349 Update extension.json authors to match AUTHORS.txt
Change-Id: I8ad57c1038b4fd24c2be7c510149d6903910a27b
2020-05-15 22:32:42 +01:00
jenkins-bot c5b030d1c7 Merge "Simplify API modules setup" 2020-05-12 21:10:32 +00:00