Commit graph

94 commits

Author SHA1 Message Date
Ed Sanders 5c0344aeda Use new select[First|Last]SelectableContentOffset methods
* Make ve.ce.MWBlockImageNode autofocus=false, remove
  unused transition property
* Remove ignoreChildren from ve.dm.MWBlockImageNode
  based on new definition
* Remove tests which assert that deleting in a list next
  to a block image always de-indents. If this is desired
  behaviour it should be fixed without reference to
  ignoreChildren.

Bug: T295905
Depends-On: Idc0cccbe73d1b49d07b60c14a192a40f47d64608
Change-Id: Ib79a070f5d36dbe7742fa0760f8cdf55fe3046ed
2021-12-08 15:53:35 +00:00
jenkins-bot 90643ef6d0 Merge "Prefere ve.extendObject over $.extend" 2021-11-18 21:22:16 +00:00
Ed Sanders 86c405a2e1 Prefere ve.extendObject over $.extend
Change-Id: I37fef45701653cef08de9ec699865aa4fdf477bc
2021-11-15 21:30:19 +00:00
Ed Sanders 24d7f3f4d4 MobileCollabTarget: Add surface class using dedicated method
Change-Id: I8a977115a67dd894a9b469d68e4cc6078fe12463
2021-11-15 18:05:58 +00:00
Ed Sanders 3801aa1bac Move var declarations inline
Change-Id: I12639c515e33b3d9e7a819581b5022ea42fd7046
2021-10-13 14:02:31 +01: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
Ed Sanders a71dd4f797 Ensure correct classes are added to surfaces
* Create getSurfaceClasses method.
* Pass surfaceClasses to target widgets.

This ensures that the 'content' class is passed to mobile
target widgets, and the 'mw-body-content' class is added
in a less hacky way.

Change-Id: Ibce6d1a1d0fda63cca354761f1b91f808858e95b
2021-05-23 20:04:28 +01:00
Ed Sanders 2f4140117a Add 'close' flags to closing actions in dialogs
Change-Id: Ib0eb947432c3cdaa316d1a8116d4ab91f791930d
2020-12-07 18:53:16 +00:00
Ed Sanders 4b9ad322ea CollabTarget: Fix focus of authorList
Change-Id: I91e4fb75af6b65df9da2d8b2f7277e685d54d0f8
2020-12-04 17:59:48 +00:00
Ed Sanders 4545f53245 build: Update eslint-config-wikimedia to 0.17.0
Fix instances of variable shadowing.

Change-Id: I6e2befb020d7d4b506c7b46131eafacd951aa6d1
2020-08-18 13:16:49 +01: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 76cea9b235 ExportWikitextDialog: Make height of wikitext input fit dialog
Change-Id: If60dc55a442ffb255248d3bf5c3e1d0e14b2821f
2020-07-31 16:27:27 +01: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
Ed Sanders d8a0f475e4 ExportWikitextDialog: Fix title comparison
getImportTitle may be null

Change-Id: I04d3504e1b4d815859d3ea57fb846ea2277ee5fa
2020-07-30 16:17:32 +01:00
Mvolz 842a728488 Revert "Allow generic params to be passed to getWikitextFragment"
This reverts commit e5c1ef651b.

This change caused an error where templates failed to be inserted
into wikitext in the 2017 wikitext editor.

Bug: T255785
Change-Id: Ie57c49e68e594be22af2b1b479840f29e46131db
2020-06-19 13:15:23 +00:00
Ed Sanders e5c1ef651b Allow generic params to be passed to getWikitextFragment
mw.Target doesn't know about revid and etag, so move that logic
to ArticleTarget, where the param can still just be a boolean.

Change-Id: Idf4632cd28554aaf5bbf5f2b44ded047c0c4b182
2020-06-04 22:45:09 +01:00
Ed Sanders 6076708ff3 build: Update eslint-config-wikimedia to 0.16.0
Change-Id: I638e0f82949597e2a2e4ea18fc2f0258f225358c
2020-06-02 21:30:00 +01:00
Ed Sanders 651756c4fc eslint: Enable the mediawiki/class-doc rule and make pass
Also minor other adjustments

Change-Id: I9ee48359e3e53799f2f6240e44b53972283ce328
2020-04-17 22:59:11 +01:00
Bartosz Dziewoński 7b47575a45 Add accessibility labels to all type: 'list' toolbar groups
Bug: T245776
Change-Id: I67d8e239f4fed7dd7ac4b98be3362426e753076b
2020-03-14 14:13:53 +01:00
Bartosz Dziewoński 58757d4e3e Use built-in mw.Api 'badtoken' handling, also 'assert'/'assertuser'
When the user is saving their edit, we want to ensure that they
understand how it will be attributed. If the user gets logged out or
logs in in another tab, we want to display a message about it before
saving.

Instead of manually managing tokens and handling the 'badtoken' error
to detect this, use the 'assert'/'assertuser' parameters for the API
to detect it for us. Thanks to this we can rely on automatic retrying
for 'badtoken' errors in mw.Api#postWithToken.

It will be possible to share some of this code with other extensions
that already use ArticleTargetSaver, namely DiscussionTools, now that
it doesn't need to manage tokens for VisualEditor.

Bug: T245327
Depends-On: I485f99e1f5f493262b0c9af22370da01adf1e09c
Change-Id: I37f8e89b6d92c419d1b6569891612256342f8139
2020-02-15 03:37:22 +01:00
James D. Forrester 2c77e88d2c doc: Bump copyright year for 2020
Change-Id: I30539877543dc2a57bd1428a00d10ac46d8fc294
2020-01-08 09:13:24 -08:00
Ed Sanders 5a24e78616 Prefix document titles with wgWikiID
This allows one rebase server to serve multiple wikis.

Change-Id: I212e6d0eca99a5d5a0d1634078f63e63e0574506
2019-12-17 14:55:05 +00:00
David Chan 22098d6b16 Convert $.Deferred() to ve.createDeferred(), except in preinit
Follow-up to a8e07e026dea4f54241d1dbb6b7bcdbd8c670db2 in core.

Change-Id: I09333adb4876c6e584a4a6b6a1628227c4cd2616
2019-11-02 13:06:28 +08:00
Ed Sanders 57d8e53111 Catch errors during document initialization
Change-Id: I5dc29666f99ac10bbf63a56153ba9a32d3568daa
Depends-On: I57fb6319bc3a9cee347c39fc75f555543991d703
2019-10-11 15:13:10 +00:00
Ed Sanders 901f107bd0 Delete mobile toolbar flexbox code, upstreamed to VE core
Depends-On: If973baa556a557c2fe5cb3aed44f937fc9d2b62e
Change-Id: I775fb24bd16572cfb8472f5260a7552b2fbb9930
2019-09-03 17:30:19 +00:00
Ed Sanders 32042d76e8 Update VE core submodule to master (fbbb9c4cb)
New changes:
854a1fa2c Distinguish active link styling

Local changes:
* Pull through active link styling

Bug: T228220
Change-Id: I925f88d32a514a749b96f501a211003bc4c924f0
2019-07-25 20:25:54 +00:00
Ed Sanders 20561e7e10 Remove citefromid alias support
Change-Id: I74d67a2ea5118ee18c462ccfea06a72cc73c627b
2019-06-20 16:06:07 +01:00
Ed Sanders 48b4051bef CollabTarget: Enable undo
Change-Id: I228ae26662d6577a1499ded1611b48a96f2fc8ef
Depends-On: Ic40e7290a06175916c8b7c0b20b5e8e8acbba7c8
2019-06-04 22:59:13 +00:00
Ed Sanders 25cbd22b23 Synchronizer: Fix defaultName config
Change-Id: I2b7482f6405d7da8515f30c8060f7eac1758e6a9
2019-06-01 17:51:41 +01:00
jenkins-bot 7dc2fee2f7 Merge "MobileCollabTarget: Cleanup toolbar" 2019-05-17 16:55:29 +00:00
Ed Sanders d3d8748967 CollabTarget: Disable nullSelectionOnBlur, as per ArticleTarget
Change-Id: I690e6d63109267f3b385311ecdf84eea24b0e998
2019-05-17 16:29:53 +02:00
Ed Sanders 47af04b8d9 MobileCollabTarget: Cleanup toolbar
Change-Id: I4b2e21ce61cb647ca6a74bdbdd8def614ed41341
2019-05-14 20:19:54 +01:00
Ed Sanders 7f39bb9520 CollabTarget: Replace button in toolbar
Change-Id: Ib9d08dd473421e915a0a00edd5c058dcd292fabe
2019-05-09 10:56:43 -05:00
jenkins-bot 32985886e3 Merge "eslint: Enable valid-jsdoc" 2019-04-17 18:39:41 +00:00
Ed Sanders 0db4ae6e00 eslint: Enable valid-jsdoc
Change-Id: Ia0d1e57246a1c567d73022ceca9b8c02850f9bc8
2019-04-17 17:13:39 +01:00
Timo Tijhof ef36f4b0a1 Move usePageImages/usePageDescriptions from page conf to site conf
These do not vary by user or page, and can thus be loaded asynchronously
via the startup module, rather than blocking rendering and fetching
of modules on all pages.

In a future change, it might be better to go a step further and bundle
these with a module so that they only load as-needed instead of still
on all page views, but this should be an improvement nonetheless.

Change-Id: Icae3712ac5546a90bc7ffd787b0f3285dff6a26f
2019-04-17 00:10:27 +01:00
jenkins-bot 53db6727b3 Merge "Rename 'citefromid' to 'citoid'" 2019-04-11 11:01:00 +00:00
Ed Sanders 72df5f690f Update VE core submodule to master (f039957f3)
New changes:
f039957f3 [BREAKING CHANGE] Use keyed objects for importRules blacklists

Local changes: Use extendObject to set importRules

This allows us to inherit the ruleset from the parent
so we don't have to worry about keeping it up to date.
(For example alienTableCell from upstream was missing
in MW).

Media/Gallery dialogs: Add missing mwTable types.

Change-Id: I366a091ff4def66cc25200b3d1b2c23ba6b716f7
Depends-On: I8ff7e8242c8db235a0f9e11e2e52f90d62d368a0
2019-04-09 16:58:26 -07:00
Ed Sanders d784304ed1 Rename 'citefromid' to 'citoid'
Backwards compatible change can be merged ahead of change
in Citoid repo.

Bug: T219512
Change-Id: I2d7e389cc01808e41353681dd2448a0385543f2e
2019-04-03 13:19:45 +01:00
jenkins-bot 085f21792b Merge "rebaser: pushState when calling showForm" 2019-03-06 12:13:02 +00:00
jenkins-bot 5aec469952 Merge "rebaser: Fix export dialog title" 2019-03-04 14:49:46 +00:00
Ed Sanders b3a35790c1 rebaser: Fix export dialog title
Change-Id: Ib76adbdb8b6547e42968f73cc196d7b8817e25f0
2019-03-04 14:26:39 +00:00
Ed Sanders b0b8194faf rebaser: pushState when calling showForm
Change-Id: Id650acbcc4d0ba699fa1264acfd8ab6249315806
2019-03-04 13:25:26 +00:00
Ed Sanders 6f60b780ff rebaser: Bind special tab click to showForm
Change-Id: I3207c50b2515356833c19c7d46c69af4918dfa58
2019-02-28 19:20:14 +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 332aa1f3d2 build: Update eslint-config-wikimedia to 0.11.0
Change-Id: I5a294705eed1760e2d4dde33934d2ffb12e29525
2019-02-20 20:23:43 +00:00
Ed Sanders 5461c56380 stylelint: Enforce class name pattern
Change-Id: Ia41a08424f840d353eb7fc213815f7992da4a2ef
2019-01-13 15:14:53 +00:00
Ed Sanders 74f6c4899c build: Update eslint-config-wikimedia to 0.10.0
Change-Id: I63a0ebf0b31a0d5d4e680a4e2a5a0be4850be165
2019-01-08 17:00:09 +00:00