Commit graph

742 commits

Author SHA1 Message Date
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