Commit graph

933 commits

Author SHA1 Message Date
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   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
Bartosz Dziewoński 0528f806fa Extract Parsoid/RESTBase stuff out of our API code
Goals:
* Allow other extensions to reuse these methods (maybe upstream them
  to MediaWiki core later)
* Allow ApiVisualEditorEdit to extend ApiEditPage. We'll be able to
  reuse its definitions for API parameters instead of duplicating
  them, and we won't have to pass around unrecognized parameters.

Bug: T252573
Change-Id: If5c8d95560cbb078ae4980f4a912cbaeafe53d3e
2020-05-12 21:17:29 +02:00
Reedy f78b069f48 Remove _merge_strategy from value
Change-Id: If82bb699a65dd6205cda372091d799f94e802322
2020-05-12 19:02:15 +01:00
Bartosz Dziewoński d92e600d58 Simplify API modules setup
We go through all this trouble to pass the config to the API modules,
and then we don't use it at all (we removed the uses recently in
ce094c72d and d85d30f9b).

If we end up needing the config there again, we can just get it by using
MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'visualeditor' )
anywhere we want, like we do all over the place in VisualEditorHooks.

Change-Id: I9d254a9946f0d24783baf68c409b10291a8fd1b3
2020-05-12 18:53:31 +02:00
Reedy 3b64e6a6a7 Convert to manifest_version 2
Bug: T252470
Change-Id: I4d3b0dc23182da6514f85b8812a10383c96a0626
2020-05-12 02:12:25 +01:00
Bartosz Dziewoński 1846b72998 Remove some hardcoded CAPTCHA support code
While we pretend that the ConfirmEdit CAPTCHA support is added by
ve.init.mw.CaptchaSaveErrorHandler in the ConfirmEdit extension,
we still have a bunch of code here required for it to work.

This commit removes some of it, no longer needed after
I6605017fd31a4f96c529dd0beb69e9f4433cebc1.

Depends-On: I6605017fd31a4f96c529dd0beb69e9f4433cebc1
Change-Id: I41e032fd754927b7ea6cfb767eb9f21b522ccacd
2020-04-15 13:18:47 +00:00
Timo Tijhof 48c4dfd59e Remove redundant dependency on 'mediawiki.notify'
The 1 line of code this module contained (to lazy-load
'mediawiki.notification', and forward the function call) was
moved to 'mediawiki.base' and requires no dependency.

Bug: T233676
Change-Id: Ifcb1bca030bede62065a87dc7a8594fe17e017cc
2020-04-08 17:47:21 +01:00
Ed Sanders de47496b19 Move MWutils to preinit and rename to parsoid utils
Bring in ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref
and ve.resolveUrl, so that the file has no dependencies on VE.

Change-Id: I03bc455d5484a6c51f3fa2397c64936b829fe7e3
2020-03-24 23:13:16 +01:00
Ed Sanders 788c57a3ea Update VE core submodule to master (cf72879d2)
New changes:
cf72879d2 Show sum/average when selecting multiple numeric cells

Local changes:
Implement number parsing/formatting for table summing

Bug: T247877
Change-Id: I52af622dc8cfe7e77fd7ce88428be092d5b092a2
2020-03-19 12:26:26 -07:00
C. Scott Ananian ce094c72d4 Remove X-Parsoid-Variant configuration value, which is no longer needed
Reverts Ib1403638b12ec5808f6b81bd114949043aa9ac2e.

Bug: T229074
Change-Id: I9bbc02821d5ee82c9944516ab07d3cb380d2f3a8
2020-03-11 13:24:43 -04:00
Bartosz Dziewoński 59cc4b10aa Update VE core submodule to master (f7f72b5c5)
New changes:
42fea96be Add some accessibility labels to buttons on mobile

Change-Id: I37f03d547b1891c05b50fb1761620e7af9209e2b
2020-03-06 15:09:44 +01:00
Akinwale Alagbe d3292378cc Fix:Internal and External Link annotation widget
Adding the ability to special aria-label for the link annotation widgets
in order to aid accessibility to visually impaired audience

Bug: T245294
Change-Id: I3e1fd4a3e3a951092b5212397acc38b2b89a23c2
2020-02-24 16:40:19 -08:00
Bartosz Dziewoński 9119e57a2e Improve rendering of audio files (for real this time)
ve.dm.MWImageNode:
* Define sensible scalable properties for audio files. They are now
  scalable to any width but have a fixed height. (Ideally they would
  have no concept of height, but that would require many more changes.)
  This prevents them from resetting to 0x0 when resized.

ve.ce.MWBlockImageNode:
* Remove override for #isResizable, audio files can be resized now.
* Move #updateMediaType to MWImageNode mixin so it applies to
  MWInlineImageNode as well.

ve.ce.MWImageNode:
* Add #updateMediaType from MWBlockImageNode.
* Hide the real image 'src' using CSS rather than changing the
  attribute. It seems the previous solution depended on the order in
  which methods are called, because it stopped working when I moved
  the code here. (This depends on VE/VE change If5b1b5b5d.)

audioPlayer.svg:
* Make the file nicely resizeable. The dimensions of the "play" icon
  and time are fixed, the bar adjusts to the width of the container.

Bug: T206022
Change-Id: Ia0f38ca11e0d55a5b725fd9aeb6c79ec1345376d
2020-02-14 04:18:28 +01:00
Bartosz Dziewoński c95be08cc4 Localize remaining hardcoded English error messages
Bug: T227325
Change-Id: Ibee27bd8457f83910da03ecb8801e5f26bdb3b2a
2020-02-12 22:18:40 +01:00
Bartosz Dziewoński 6d993fee49 ArticleTargetSaver: Fix error messages
Follow-up to 5f1c68945d, which renamed
these messages while moving them into MediaWiki core.

Also, parse HTML in them. This is consistent with real API error
messages, and with the behavior of mw.Api#getErrorMessage. (And also
fixes potential HTML escaping issues.)

Change-Id: I307ca9873e245169a0d4b43499317acbac69fb9b
2020-02-12 22:18:40 +01:00
jenkins-bot 5b2ba08c44 Merge "Use WMUI styled WikiEditor switcher when in Vector" 2020-02-08 02:37:12 +00:00
Ed Sanders eebe103fe4 Use WMUI styled WikiEditor switcher when in Vector
Bug: T223155
Change-Id: I6cf305e77cfeda96e7736dc26f1d7feff6fb3911
2020-02-07 18:20:39 -08:00
David Lynch 0d6f984cc5 Change tags method so anon edits will go through
It turns out anonymous users can't apply change tags, so change
I2c1d0f8d69bc03e5c1877c790247e165f160e966 broke editing for them.

Bug: T242184
Change-Id: I7c27e4d9995428e213a980819810f235fdfe9435
2020-02-06 15:31:45 -06:00
David Lynch 078fbcf737 Update VE core submodule to master (e1760b7f7)
New changes:
fb4f0a83b Completion framework

Local changes to wire in the completion framework

Bug: T232601
Depends-On: If6aee9df67e7a1234d47c0ba0c2f05ef47e5bd51
Change-Id: I075cac9aa195574c3d416a40bbdc5ec2d64424e2
2020-02-06 12:05:48 -08:00
jenkins-bot d5ea567039 Merge "Match WikiEditor switching widget to Apex toolbar theme" 2020-02-05 22:40:59 +00:00
Ed Sanders 787d16f512 Match WikiEditor switching widget to Apex toolbar theme
Bug: T223155
Change-Id: I5c14f28ba3c341c74875bac090c6106655c6b4c7
2020-02-04 17:25:59 -08:00
jenkins-bot 124ae7a444 Merge "Tag VE edits from the client-side" 2020-02-04 16:43:59 +00:00
Máté Szabó ff4f382322 Use autogenerated parameter info for templates without TemplateData
When a template does not have user-provided TemplateData documentation,
the TemplateData API falls back to extracting possible parameters from the raw wikitext
to generate an API response with a list of potential parameters. However, it also
sets the "notemplatedata" field in the response, causing the VisualEditor to think
the response contains no useful information and ignore it. This appears to have been
an unintended side-effect of I97a1bfc9f9ead082a673a91b9d2053630a90309c.

This patch ensures that the VisualEditor will correctly consider such responses from
TemplateData by modifying ve.dm.MWTransclusionModel to check if the response contains
a parameter map. Some unit tests were added for the class to verify this behavior.

Bug: T243868
Change-Id: I72005880d9301a53224473900efe2917379e8708
2020-01-31 13:43:56 +01:00
David Lynch d85d30f9b3 Tag VE edits from the client-side
This opens up the API so that other tools can use it without being
forced to tag those edits as being from VE.

Also, document that tags is a working parameter that can be passed
through to the edit API.

Bug: T242184
Change-Id: I2c1d0f8d69bc03e5c1877c790247e165f160e966
2020-01-29 21:55:07 -08:00
Bartosz Dziewoński c1ea108327 Enable visual diff code on mobile
Bug: T242351
Change-Id: I4cf6c9ef846d24847a844d443952c7026fcd306b
2020-01-29 11:15:18 -08:00
jenkins-bot 9e6a40a827 Merge "Use mw.Api#getErrorMessage instead of custom handling" 2020-01-10 14:22:14 +00:00
Ed Sanders 8e20c1c66b Update VE core submodule to master (6bed6aaa5)
New changes:
06ad0c769 git-build: Fix name of grunt.log.error
6bed6aaa5 CommentAnnotation: Replace 'reply' with 'comment'

Change-Id: If7e298eaafdd7cf9ab07b6314cb9c214a2072229
2019-12-20 16:22:33 +00:00
jenkins-bot 7452bcca73 Merge "rebaser: Add missing message" 2019-12-20 15:52:36 +00:00
Ed Sanders 90eb775978 rebaser: Add missing message
Change-Id: Id9fbbe47d0e886a235d5fcafefcb768e8c28e666
2019-12-20 15:38:13 +00:00
Ed Sanders f2a5c10dee Update VE core submodule to master (0aa09c12e)
New changes:
0aa09c12e Make CommentAnnotation use replyable threads

Change-Id: Idaadecace168a0c19741a231b887578274902a86
2019-12-20 14:57:14 +00:00
Thiemo Kreuz 326944402d Simplify Hooks section in extension.json
It is possible, but very rare to have more than a single hook handler
per hook in a single extension. The value can be an array or string in
both version 1 and 2 of extension.json.

Change-Id: Idab5bb1ee606fe07c0886c8f6ae180bad1f9a4e3
2019-12-18 08:20:28 +01:00
Bartosz Dziewoński 5f1c68945d Use mw.Api#getErrorMessage instead of custom handling
Bug: T240519
Depends-On: Ie18666b41f4aff1ab4bcf93f9df6e3000ac7b500
Change-Id: I69d9432162f195dcfe9470485b549a1b007617ff
2019-12-14 17:01:35 +00:00
jenkins-bot 95a46f1666 Merge "Exactly match collapsible logic of jquery.makeCollapsible" 2019-12-13 15:42:46 +00:00
Ed Sanders a007781e81 Support wikitext link editing
Depends-On: I3eb2d5ee0da52942db1de75ef9f8b0ae2632657e
Change-Id: I7ad61899a221a198a06e206614d907a331861dbb
2019-12-12 02:33:35 +01:00
James D. Forrester 015f796b63 Update VE core submodule to master (3b3dcad84)
New changes:
7017efbce Sanitize HTML on paste

Bug: T239209
Change-Id: I5f59d537d39b64838a222ab0637957429860508f
2019-12-02 17:26:58 -08:00
Bartosz Dziewoński 092d0c332b MWSaveDialog: Fix error handling for diffs
In case of HTTP errors we'd crash and show no message.

Change-Id: Ideeff4ce75e7ca82ce63bf7ede6dff03eaa1c5d7
2019-11-24 09:51:43 +00:00
jenkins-bot a1b6c47962 Merge "Localize some hardcoded English error messages" 2019-11-19 21:18:04 +00:00
Bartosz Dziewoński a8ab487876 Localize some hardcoded English error messages
Bug: T227325
Change-Id: I5a43b34a4492c20cab4b4ef3eceafaf669e89730
2019-11-19 15:23:58 -05:00
jenkins-bot 2e6e75233f Merge "Remove unused message 'visualeditor-loaderror-title'" 2019-11-19 16:09:11 +00:00
Roan Kattouw eebe4cd993 Unbreak instrumentation of init events
ve.track.js was being loaded twice, once early on as part of the
ext.visualEditor.track module, and again later on as part of the
ext.visualEditor.core.utils module (which it was added to by b676b22).
This caused ve.trackSubscribe()'s buffer to be reset. Recording the
first init event relies on this buffer, because it's logged with
ve.track() before the logger subscribes with ve.trackSubscribe().
Subsequent init events did get logged. Some performance logging during
initialization was also dropped, but the 'ready' event and subsequent
events were logged correctly.

Fix this by loading ve.track.js only once, as part of the
ext.visualEditor.track module. Make ext.visualEditor.core.utils depend
on ext.visualEditor.track, rather than also adding ve.track.js to it.

Change-Id: I781595d27edb2dc0ad662fcc8e3c7cb0ddae78f1
2019-11-18 17:19:16 -08:00
Bartosz Dziewoński 99cd4e26e9 Remove unused message 'visualeditor-loaderror-title'
Introduced in 7653dec439 (2015),
has never actually been used.

Change-Id: I35d06b50fbfdfdfbfdcfd0acbe094895a4f7698d
2019-11-18 15:25:45 -05:00
Bartosz Dziewoński 050227aee6 Remove unused message 'visualeditor-loadwarning-token'
No longer used since a701e87caa (2013).

Change-Id: I7708453ac321a92893a1d92c3082023f9ebe769c
2019-11-18 15:18:36 -05:00
Bartosz Dziewoński c8fa50c3b2 Exactly match collapsible logic of jquery.makeCollapsible
Bug: T236247
Change-Id: Iaf8e8515585989fd8ca64ffd33b02399a69278b4
2019-11-13 23:26:08 +00:00
Ed Sanders 545c6f1301 Add missing FragmentInspector tests to MW
Requires unregistering MWLinkAnnotationInspector

Bonus: Remove unnecessary list of unregsiters as
teardownOverrides is run on init.

Change-Id: I3e36ab7736cc8479ab53f40d2eb24c0fa15d3dc0
2019-11-12 13:52:35 +00:00
Ed Sanders 3542799ab4 tests: Have MWDummyTarget create the correct surface type
Change-Id: I3cd025d726e9db56a2391ef52852d1cb2f4305a0
2019-11-11 20:22:33 +00:00
David Lynch 46e7b3ba19 Config value for X-Parsoid-Variant
Bug: T229074
Change-Id: Ib1403638b12ec5808f6b81bd114949043aa9ac2e
2019-11-05 10:56:10 -06:00
Ed Sanders bfdb664ef7 Add missing dependency for parsing utils
Change-Id: If231b00db6b562fd529c1d0a5143a4613c9835c4
2019-11-04 16:20:51 +00:00
Ed Sanders 381b58585c Factor out save logic into ArticleTargetSaver
Change-Id: I63fa04598e0d703fe1ba715c9c5a0abbb0d7ba5b
2019-11-01 15:45:27 +00:00
Ed Sanders 1bb72f0bb5 Replace deprecated easy-deflate.deflate with mediawiki.deflate
Change-Id: I5c77d4818074fd3dc937d7688d449952b92ee358
2019-10-30 19:13:47 +00:00
Bartosz Dziewoński 372f04fc6f Tweak dependency on 'mediawiki.diff.styles'
It's only needed for the save dialog.

Change-Id: Ifada463e95e2e911161f6ba898de6656412b4f83
2019-10-24 18:35:53 +02:00
Ed Sanders b676b2295b Update VE core submodule to master (3fac5f1f2)
New changes:
8cbedc3c8 build: Update linters
a211e9fd8 TargetWidget: Use surface view focus/blur events
57aeb8b38 Separate utilities required for DOM parsing into separate file

Local changes:
* Setup modules for new parsing utils files

Change-Id: Ie4e59650fdb869e7e4148c97cd03d79ce35187dc
2019-10-23 18:34:17 +02:00
Bartosz Dziewoński 3f0f302577 Enforce that some files must not use the ve global
Previously, the ve-mw/init/ directory contained two kinds of files:
those that were used when initializing VE, and those that may be
loaded even if VE is not going to be initialized at all. The latter
kind must not use the `ve` global variable.

After moving those files to ve-mw/preinit/ we can enforce this with
.eslintrc.json in that directory. This would have prevented T228684.

(Technically they merely must not use `ve.init`, and may use `ve`,
but that's harder to enforce. We should instead move the few non-init
methods out of `ve`: now, track, trackSubscribe, trackSubscribeAll).

Also, group some files under ve-mw/init/: targets/ now (only)
contains ve.init.mw.Target and its subclasses, apiresponsecache/
now contains ve.init.mw.ApiResponseCache and its subclasses.

Bug: T228684
Change-Id: I945249a27f6a0fa10a432d5c5dc57bc7e0461fd8
2019-10-10 15:15:40 +00:00
James D. Forrester 673d2bc657 Update VE core submodule to master (163767591)
New changes:
05306a572 ve.ui.SpecialCharacterPage: Remove unused icon handling
738244b1f Localisation updates from https://translatewiki.net.
7527b151c Upgrade DOMPurify 1.0.10 -> 2.0.0
ff5c1def9 Catch errors when applying initial history

Change-Id: I43c2668ddf1c2a15d724b24532256fc2d222facd
2019-10-01 14:37:01 -07:00
Timo Tijhof aae62a87be Remove cache group setting from styles modules
Follows-up 35eead0f3. This caused an extra stylesheet and HTTP
request to be added to all page views, because
'ext.visualEditor.desktopArticleTarget.noscript' is a styles
module, which should be allowed to join the regular batch.

Also remove it from other styles-only modules known to be loaded
with addModuleStyles().

Bug: T233095
Change-Id: Iea1f33199ec8dc83a42ac7102595a033300e33e6
2019-09-17 19:06:23 +01:00
jenkins-bot cc5a5dfaff Merge "Break up our massive load.php request to work around network issues" 2019-08-30 22:25:16 +00:00
jenkins-bot bc963f4155 Merge "Support for defined template context items" 2019-08-30 18:50:27 +00:00
Ed Sanders e5f5a49344 Support for defined template context items
Context items can be created for specific template titles. Titles
are mapped to context items using an on-wiki message.

Bug: T211243
Change-Id: Icfc39e350452da238d0e0c17cb2305c60d9ca16a
2019-08-30 13:02:47 +01:00
David Lynch 1761b6d6d6 MobileArticleTarget: v1 of toolbar refresh
Bug: T211789
Bug: T230807
Change-Id: Ifd2319039628a8143dc09f6fa35e4a9825d3062c
2019-08-29 15:27:56 +00:00
jenkins-bot dd86fc76aa Merge "Use upstream pulsating dot" 2019-08-28 17:31:52 +00:00
Ed Sanders 7cc538fe51 Use upstream pulsating dot
Bug: T226719
Depends-On: Ibd035ea48b7d0316a7627a91623ff6116ccbae31
Change-Id: Iedf88e9c5ac8efa809ccb25f2081eff9946da395
2019-08-28 13:40:29 +01:00
Bartosz Dziewoński 756572ed8a ve.init.mw.ArticleTarget: Use errorformat=html when saving
When saving fails for a reason we don't handle explicitly, the error
message will have HTML formatting and will respect any on-wiki
overridden messages, rather than being plain text generic message.

Extensions providing custom SaveErrorHandlers may need to be updated.
The only one in Gerrit that requires a fix is TitleBlacklist:
Ibeae79c95557a7af699716c9d921f34c310bee6d.

* Remove handling for errors returned in .visualeditoredit.edit.info
  rather than .errors (.error in old format). AFAIK this is only used
  by some extensions, it is probably incorrect to do (T229539) and all
  extensions I know of that do this (AbuseFilter, SpamBlacklist,
  ConfirmEdit) have custom SaveErrorHandlers.

* Remove custom error messages for 'readonly' (identical to API
  response) and for 'hookaborted' (very unhelpful and there is a
  chance that the API response is better, if the extension causing
  this error generates any error message).

* Add a silly shim for MobileFrontend integration, because we allow it
  to handle error responses, and it expects them in the old format.
  This is probably subtly wrong in many ways, but MobileFrontend code
  only uses this for logging, so it shouldn't explode. In the future
  we will hopefully change it to use errorformat=html (T228897#5366960).

Bug: T229532
Change-Id: I3b9c4fefc0869ef7999c21cef754434febd852ec
2019-08-22 00:37:15 +00:00
Ed Sanders 9a1994e47c Update VE core submodule to master (7cb9caca1)
New changes:
28aea2e4d Edit cards v2 design
739017973 Track usage of the new "close context" button

Local changes:
* Edit cards v2 pull through

Bug: T222396
Change-Id: I1ca885e8d8127e7827a059755315ed789a7b9210
2019-07-25 22:24:48 +02:00
Bartosz Dziewoński 0fb7d5efda Update VE core submodule to 962335a40293cf4b1314c0236788f35f080ae877
New changes:
a06204317 Fix TableNode unit test getOffsetFromCoords failure on Firefox
dfe0eb025 Refactor mobile context logic into ve.ui.MobileContext

Local changes:
* Pull through for edit cards refactor

Bug: T227532
Bug: T228767
Change-Id: I6c043e039fbef62a56f475b0dc365e171ab7bf59
2019-07-23 22:13:27 +00:00
Ed Sanders 393de5985f Update VE core submodule to abf2bfa85e64e67cdf963601fe1da2a11fd9e89a
New changes:
1a7460058 Remove ve.newMobileContext feature flag

Local changes:
* Remove ve.newMobileContext feature flag

Change-Id: Ia8def997b7cba4623866080752b06068d2118cc3
2019-07-23 22:12:48 +00:00
Bartosz Dziewoński a5867818ff MWEditingTabDialog: Don't use ve.init.target because it may not be loaded
We also show this dialog on the old wikitext editor, where
ve.init.target is not set, because the relevant code is not loaded.

Follow-up to 478b0bcbb9.

Similar to e88cd81f94, which fixed the
same issue in a different file.

I checked all uses of ve.init.target in files under ve-mw/init/ and I
think this was the only remaining mistake.

Bug: T228684
Change-Id: I15551870cdb01d570e24ba9668e67330b8072e01
2019-07-23 19:09:37 +00:00
Bartosz Dziewoński 59bc6f6a76 Add dependency on 'mediawiki.interface.helpers.styles'
This module is now needed to correctly display log excerpts,
like in our edit notices popup for protected pages.

Bug: T227190
Change-Id: I19dec69a33a2b3246ff1abe6bec90b2359ac36a4
2019-07-16 20:58:38 +00:00
jenkins-bot 2d25d15a39 Merge "Add number of images to gallery context" 2019-07-15 23:26:30 +00:00
Ed Sanders c958ea383d Add number of images to gallery context
Change-Id: I3e54c6cb2b29ecb1153afd5f2f61adaabceb095b
2019-07-16 01:04:08 +02:00
Ed Sanders fba9585dbf Add validation feedback to external link
Bug: T227899
Change-Id: I165ed59402bdffb63b0c79b68a41d509c4574837
2019-07-15 22:35:46 +00:00
Ed Sanders b64cd4ced1 Update VE core submodule to master (213b79783)
New changes:
6cd9ba63f Localisation updates from https://translatewiki.net.
c9cebed32 Update OOUI to v0.33.2
65c66b8a6 Localisation updates from https://translatewiki.net.
8d94ad13f Replace unrendered parts of the view tree with a stub node
213b79783 Basic unit tests for attachedRoot functionality

Bug: T215717
Change-Id: I7bd8106a82e4fa7c912ce9f8d4fab86bfb546702
2019-07-14 15:26:28 +01:00
Bartosz Dziewoński 35eead0f3d Break up our massive load.php request to work around network issues
I suspect that the size of our singular load.php request (~600 KB
after gzip, depending on the installed extensions) is somehow
triggering the network problems on T213214. To test this theory,
break it up by putting some modules (all that start with
'ext.visualEditor.') into a separate ResourceLoader group.

Now we have two load.php requests (~300 KB each after gzip).
This may increase load times (it will be interesting to see by
how much), but may also fix T213214.

Bug: T213214
Bug: T221197
Change-Id: I0b1a65963267ba52d7962ce31db5a8e6f913322d
2019-07-09 21:35:37 +02:00
James D. Forrester 56df3cc4cb Update VE core submodule to master (75510a515)
New changes:
a3d860daf Localisation updates from https://translatewiki.net.
0421bf6f0 Gather annotations from clicked node where possible
2d2491877 Change#squash: Compact multiple transactions into one
dc0e4650e Fix documentation of ve.dm.Change#serialize
a40f8314f Fix contexedAnnotations equality check
ec62ccb34 Use 16px font size on SA mobile demo
57984c072 Update OOUI to v0.33.1

Add lib/ve/src/dm/ve.dm.TransactionSquasher.js to debugScripts.

Bug: T188026
Bug: T226708
Change-Id: I6eb4ab50ef2c6774963f692f600f059662bf0ac3
2019-07-04 00:31:57 +00:00
jenkins-bot 7796b569c9 Merge "MobileArticleTarget: Prevent unwanted page zooming on focus on iOS" 2019-07-01 16:14:35 +00:00
Bartosz Dziewoński 2563bb3d89 MobileArticleTarget: Prevent unwanted page zooming on focus on iOS
Bug: T216446
Change-Id: I48beb1e120b5b087533b0827904212be9286529f
2019-07-01 15:53:29 +02:00
James D. Forrester 34158b8568 Stop loading oojs-ui.styles.textures, gone as of OOUI 0.33.0
Change-Id: I38aa1ce529bed43175d2ecdcecd1c6a2a0ed603f
2019-06-26 20:54:49 -07:00
Ed Sanders df8feb6faf Move mobile context to bottom of page
Hidden behind ve.newMobileContext feature flag.

Bug: T204733
Depends-On: Id276686a0e82c12c457c81eaec9939722c65c7ec
Depends-On: Id5f7ead769dc30c0fbd2a8b8f6f6c4d68dcfabac
Change-Id: Ibd4b699dfe4bb9bcaec6898b6b82357eb287d128
2019-06-14 20:57:22 +00:00
Ed Sanders 2b7bbf0737 Cleanup mwcore messages and dependencies
* Move many messages from mwcore to articletarget or mwsave
* Delete old unused messages
  - visualeditor-beta-label
  - visualeditor-toolbar-savedialog
  - visualeditor-toolbar-savedialog-short
* Remove unused core messages (showtoc/hidetoc)
* Fix typos in comments

Change-Id: I59455f4cad272db9fd05f45f8a66069e5da0421d
2019-06-11 20:42:01 +00:00
Ed Sanders 7ad624f0a3 Remove switch confirm dialogs
Bug: T220007
Change-Id: I81b39a02d573d96bcb6b4238aabbcd077e874906
2019-06-11 22:35:34 +02:00
Bartosz Dziewoński 8ae4925676 Allow switching from WTE to VE with changes in non-RESTBase mode
* Change the query in ve.init.mw.ArticleTargetLoader#requestParsoidData
  so that in non-RESTBase mode with wikitext it still returns the
  metadata required to initialize the editor, using the backend API
  code added in I1b35b28e428a1f86d2e34d90ddbe73361ce14818. This fixes
  the exception from T222312.

* Introduce new configuration option $wgVisualEditorAllowLossySwitching
  to control this feature. It is enabled by default, fixing T214542.
  We allow it to be disabled because switching in non-RESTBase mode may
  cause "dirty diffs" (non-semantic changes to the wikitext), which are
  undesirable on wikis where users carefully review all changes.

Bug: T214542
Bug: T222312
Change-Id: I58879cba5612002c70c24731306214d2577c2c52
2019-05-30 20:18:53 +02:00
Ed Sanders b1ac5b74d3 Update VE core submodule to master (06f1ebb8e)
New changes:
06f1ebb8e Local/SessionStorage refactor

Local changes:
* Update for core storage refactor

Depends-On: I3cc1d5adfbce794e8345b7f1090c10fb0d42d150
Change-Id: If855ee33b0993788cc159d8c3acf03070e6a9566
2019-05-29 14:49:53 -07:00
James D. Forrester 0e7e88c43e Update VE core submodule to master (d9ece414a)
New changes:
c0799b060 Source mode performance optimizations
d9ece414a ve.dm.MetaItem: Add removable flag

Bug: T96528
Change-Id: Ifc0d3322c0ab0c0384fd179281cb1ed7f3ff6b31
2019-05-29 12:31:24 -07:00
David Lynch 5c7d913f62 Add missing translations from VE submodule
New table context keys were missing from extension.json.

Bug: T211240
Change-Id: I10acc3fc7191441e5c454ed869dc6b1db717b6bf
2019-05-13 11:07:11 -05:00
James D. Forrester 622e77d620 Update VE core submodule to master (6fc2d029c)
New changes:
8df948f5d TableLineContext: add context for the entire table
aae86a822 TableNode: Change mobile behavior so initial tap enters the cell
195d8cb3a Check resizeable node is focused before rendering handles

Bug: T211240
Change-Id: Ib2430c521abb4e59aaa2c5e4f9b26a16437db02e
2019-05-13 13:30:15 +01:00
Bartosz Dziewoński 636531808c ApiVisualEditor: Fix use of getBlockInfo()
The method ApiQueryUserInfo::getBlockInfo() was removed in unannounced
breaking change in MW core: I84ed21641c44b2f65ebe1980b0893d1846db3b34.
Apparently we're supposed to use the method from ApiBlockInfoTrait now.

Bug: T209599
Change-Id: I7ab5492310980b1527c7329faf65655330b8bef0
2019-05-08 22:36:38 +02:00
Ed Sanders c035073cf9 Fix abandon edit warning message
This message was upstreamed to core and later renamed.

Use the upstreamed dialog itself when switching sections.

Bug: T222525
Change-Id: Ibd2d75ec503e92b5ddec2105f762b0c9f0dc96fb
2019-05-06 15:11:58 -05:00
Ed Sanders f9330c8564 Replace the save button with a save tool
Now shows correct tooltip for save button (including
the access key).

Bug: T163142
Change-Id: If14a1a5a5829fc215cb79827392173dc05c4bdd7
2019-04-30 19:32:33 +00:00
Ed Sanders a7149cc3ee Update VE core submodule to master (7cd15cfe9)
New changes:
9b162a5da Localisation updates from https://translatewiki.net.
10dbdabf4 Remove valid-jsdoc exceptions for @chainable
a424f804d Make blockquote a non-content branch node

Local changes:
* Update stuff for making blockquote a non-content branch node

Bug: T76426
Change-Id: I95ae25f20d3d102da69bf5ffdff55335f6c07635
2019-04-22 12:39:14 +01:00
jenkins-bot 8401da1073 Merge "Move autosave logic up to mw.Target" 2019-04-18 22:36:47 +00:00
Ed Sanders 1123c1eadc Move autosave logic up to mw.Target
This would allow non-article targets to implement
autosave more easily.

Change-Id: Icc945575d0982cf82647c9078caf9a39bb715c2e
2019-04-18 15:21:33 -07:00
jenkins-bot ebe04bb856 Merge "Apply styles for WikimediaUI theme by default rather than only Vector and Minerva" 2019-04-17 19:13:41 +00:00
jenkins-bot b17acda9b6 Merge "Remove unnecessary duplications of 'default' theme files" 2019-04-16 15:47:56 +00:00
Bartosz Dziewoński b1d3fdbb0c Apply styles for WikimediaUI theme by default rather than only Vector and Minerva
They will now apply for other skins not mentioned here, e.g. Timeless.
The most noticeable change is proper styling for target widgets.

Change-Id: Ibf4c080aaaeedd65144ac5e95ed2f48a1cd17635
2019-04-16 17:35:56 +02:00
jenkins-bot 7197fd49c3 Merge "Update VE core submodule to master (6590e0ac5)" 2019-04-16 14:58:46 +00:00
Timo Tijhof cc599c2e36 init: Bundle wgVisualEditorUnsupportedEditParams with DesktopArticleTarget.init
Bug: T219342
Change-Id: I4b5a048779bd4b957cc5d99c3a7686363ffb3df9
2019-04-16 16:33:53 +02:00
James D. Forrester 51b68049d1 Update VE core submodule to master (6590e0ac5)
New changes:
6590e0ac5 Create generic command to move focus to context

Change-Id: Iba309ca5f7299f4157a3a43836064e17b5f4d62b
2019-04-15 14:13:42 -07:00
jenkins-bot 1b2c1425ee Merge "Allow external link pasting to be enabled by config" 2019-04-09 16:05:26 +00:00
Ed Sanders c1bc3f00e0 Remove unnecessary duplications of 'default' theme files
Change-Id: I52b4851a44ad9e472f006d4a892d8cc54c7ab5db
2019-04-05 14:47:58 +01:00
jenkins-bot 96dfb99016 Merge "Edit summary autocomplete" 2019-04-04 17:44:36 +00:00
Aaron Schulz 1a5fc05dda Avoid keeping excess keys from storeInSerializationCache() in cache
Remove overkill $VisualEditorSerializationCacheTimeout config setting
and just use a simple constant instead (convention over configuration).

Bug: T203786
Change-Id: I94424088a03a3262fcea30132883a612465c546e
2019-04-03 18:34:07 +00:00
Ed Sanders 1ffb574450 Edit summary autocomplete
Bug: T50274
Change-Id: Ida462f3dea325902459546af97e66cd9d0c86166
2019-03-09 14:03:27 +00:00
Ed Sanders 2092529fb1 Allow external link pasting to be enabled by config
Bug: T129546
Change-Id: I3346c842cf56fb79fb65a8bd7d716c22134636b9
2019-02-27 19:54:55 +00:00
Ed Sanders 18907dde5a Implementations for read-only mode
Depends-On: Ifaa74be266c048d87f94b4ae2df59cafc7aa155f
Change-Id: Iedd1bd9ce17750ad8528c1a053293c4a7321c5de
2019-02-22 18:20:51 +00:00
Ed Sanders e21d4fab3f Update VE core submodule to master (2951e9378)
New changes:
202adf904 [BREAKING CHANGE] Unify FragmentInspector/Dialog behaviour

Local changes:
* Update dialogs to use common actions & FragmentWindow

Change-Id: Ib744b8996db48d1ee58bc873120400566c490e88
2019-02-22 01:13:36 +01:00
jenkins-bot 8846e65e44 Merge "Support only surfacing part of the document" 2019-02-20 19:06:30 +00:00
James D. Forrester f6a9dc8d85 tests: Register TestModules via extension.json
The 'ext.visualEditor.test' module is no more.

Change-Id: I25e047ca4de7d9082a5a86efa0ea0d403dc1b0fb
2019-02-13 21:55:41 +00:00
Ed Sanders 3269d53632 Support only surfacing part of the document
Bug: T76541
Depends-On: I227a0d704b9b337cff2102d424be9795d6362ed7
Change-Id: Iac71a51c8696434658f24fbb41c8142237bd810e
2019-02-13 19:03:44 +00:00
Bartosz Dziewoński 6e076b3b6c DesktopArticleTarget: Make the progress bar into a reusable widget
We want to add a similar progress bar on mobile without copy-pasting
all this code.

Bug: T210630
Change-Id: I7192869cb719114ffd04940eabf38cf0f0421c13
2019-02-06 22:20:37 +01:00
James D. Forrester c1d690e53d MWTemplateTitleInputWidget: Filter out templates named '…/doc'
As configured on-wiki via MediaWiki:templatedata-doc-subpage; this will
probably have a few false positives, but that's worth it.

Bug: T54448
Change-Id: Id91f95b5865e151f8007a2421428aeb82b11b3fd
2019-01-26 13:23:38 -08:00
David Chan 0d362040bd Update VE core module to master (469c6340e)
New changes:
6515e03e1 ve.ce.Surface: Rearrange #findBlockSlug test to check other cases
cbfdc8570 Localisation updates from https://translatewiki.net.
708ba0557 Prevent block slugs from overlapping floated elements
3703fd66d Separate the concept of a document node and a root node in CSS

Bug: T211844
Change-Id: Ia86cf9b23e561d3c32601d41c1bc5a9824e9953c
2019-01-06 07:47:17 +08:00
Ed Sanders 85974b171c Bring back 'alert' indicator
Was removed upstream in OOUI, but we require it to
show that parameters are deprecated.

Resize to fit new 12x12 size for indicators.

Change-Id: I2356de0754a2ccf09b87b152f3023282f2e37f41
2018-12-11 14:25:48 +00:00
Ed Sanders 278789e27d Remove TitleBlacklist handling code
This has been moved to the TitleBlacklist extension.

Bug: T211242
Change-Id: Ia15c2619e6c642b3ceb567c28f77b50ccf41731a
Depends-On: Ibaf8a37f1aaef510923bde5ed9114f1f00fff461
2018-12-06 15:00:06 -05:00
Ed Sanders 041e7b77a1 Create SaveErrorHandler class to better define structure
Change-Id: I036ee32847cc3b25a1cc478247cfe54599781098
2018-11-29 15:47:03 +00:00
jenkins-bot fc126c1260 Merge "Rename configs for tracking block notices on visual editor" 2018-11-29 00:43:31 +00:00
Thalia 2516753c53 Rename configs for tracking block notices on visual editor
* Also make sure block notices have type 'block'.
* Remove old flag for tracking since we'll be using one
  from core

Change-Id: I4b66e73c8a4c4dd7bffd7c0239b1d5ec06eed12f
Depends-On: I6bd1c95548616677e1f72ba6bcfc6f2b551c1ca6
2018-11-28 15:26:15 -05:00
Ed Sanders 0d54a62858 Use mw.Title.wantSignaturesNamespace
Change-Id: I60187f0a3eb9cf5d56a4fdaa3401b107758bd8e3
Depends-On: Ib2faa22c429096d545ddb829a6b4025427ad6071
2018-11-27 18:42:44 +00:00
jenkins-bot 44fcea9f65 Merge "Track when block notices are returned on the api" 2018-11-20 22:31:27 +00:00
Dayllan Maza 3269bb136c Track when block notices are returned on the api
Tracking is behind $VisualEditorTrackBlockNotices config flag
which is set to false by default. Additional data will be logged
into a different bucket on the client and both metrics will be
considered with their known limitations.

The reason behind this is to get an idea on how frequently blocked
users attempt to edit a page. Similar tracking is being added to
MobileFrontend and mediawiki/core.

Bug: T201718
Change-Id: I51576276b97be0716c2c22348eaa756ffb04fe50
2018-11-19 23:02:02 -05:00
Bartosz Dziewoński 7bcb1ac50c Update VE core submodule to master (f32c0be7c)
New changes:
61992def0 Remove dedicated annotation operation types
c18308313 Move 'enter' and 'f2' keydown handlers to command/trigger code

Bug: T205535
Change-Id: Ibbf578070c820ae63a8b8ab50e6e4520cabfebe6
2018-11-08 13:45:21 +01:00
Ed Sanders ff1a05e245 Bump version number due to recent breaking change
Specifically I715ae805f, which changes the signature of
ve.dm.*Selection objects.

Change-Id: Iffa657179dd8a126e9f16787f3b33743f6e3d489
2018-11-07 16:50:35 +00:00
jenkins-bot 73deda8f66 Merge "ve.init.mw.DesktopArticleTarget.init: Move Vector styles to separate file" 2018-11-07 13:18:47 +00:00
jenkins-bot 07856d2a16 Merge "ve.init.mw.DesktopArticleTarget: Edit surface padding and gutter for Minerva" 2018-11-07 13:18:42 +00:00
jenkins-bot 45c9ff5e21 Merge "ve.init.mw.DesktopArticleTarget.init: Make multi-tab mode compatible with Minerva" 2018-11-07 12:26:38 +00:00
Bartosz Dziewoński b0c0553dc2 ve.init.mw.DesktopArticleTarget.init: Move Vector styles to separate file
Change-Id: Iecf25bf71c1e4fca8964d608082e42ef0c929044
2018-11-06 16:47:31 +00:00
Bartosz Dziewoński c87b010da0 ve.init.mw.DesktopArticleTarget: Edit surface padding and gutter for Minerva
Bug: T208102
Change-Id: I0a43550c938144f79f04dc91c2c742229f939177
2018-11-06 16:47:23 +00:00
Bartosz Dziewoński 5996cf15e9 ve.init.mw.DesktopArticleTarget.init: Make multi-tab mode compatible with Minerva
* Make inserting secondary tab work with Minerva's non-standard structure
  of navigation menus
* Distinguish primary and secondary tabs with tiny icons, since Minerva
  hides their text
* Hide section edit link dividers (unnecessary when we use icons)

Bug: T208102
Change-Id: Ieaec60165617e3b423ec58857d6f0a0406e22b1d
2018-11-06 17:45:48 +01:00
jenkins-bot 314bfdfc3e Merge "Missing dependency resulting in a missing icon" 2018-11-05 21:56:26 +00:00
jenkins-bot 3f97176f7c Merge "Use upstream AbandonEditDialog" 2018-11-05 18:19:23 +00:00
Seb35 951fa31a7c Missing dependency resulting in a missing icon
Bug: T208686
Change-Id: I0780a66bc70fe25154322c256958cea0c67613c2
2018-11-04 18:47:07 +01:00
Roan Kattouw 817987466d Unbreak input debugging images
They're the only thing in ve.ce.debug.js, and that file is never loaded
by VE-MW.

Change-Id: I22e64dc55a4b9d44728a235cf9edf4019504cbc2
2018-11-02 10:58:36 -07:00
jenkins-bot 9ac196777a Merge "Blocked apply if redirect address is invalid" 2018-11-01 22:17:03 +00:00
flutters f847880292 Blocked apply if redirect address is invalid
Extracted extractValue to a separate method
Added checkValidRedirect method to MWSettingsPage
Added errors when redirect address is invalid
Added 1 error message to localisation strings
Added 1 TODO (more precise error messages)

Bug: T74971
Change-Id: I8bcf16e97e5211671759acdf0846243df2c03fc2
2018-11-01 21:20:01 +01:00
Bjornskjald 9490ff370c
Update the styles for VisualEditor's "Format" dropdown
Now when using the MonoBook skin, the text size for headings inside the dropdown is the same as their size on the page.

Bug: T72559
Change-Id: Ie0c30369021f8022b788730a6de90e44a288b13b
2018-11-01 20:40:56 +01:00