Commit graph

11983 commits

Author SHA1 Message Date
Ed Sanders af0ca43125 Mobile surfaceReady: Account for selection changing in listeners
Bug: T232136
Change-Id: Ia49ea99320a8191a4d73703f1cbf3b9ef89035ec
2019-09-05 19:25:33 +01:00
Ed Sanders 7f854ff6ca Fix HTML blacklist inheritance
Bug: T150418
Change-Id: Ic56f90d654bfd34e353edafbbf5954fe167157f6
2019-09-04 17:14:38 +01: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
David Lynch 828aad2e01 MWLinkAnnotationInspector: track edits to the label field
Bug: T229841
Change-Id: If5aa535015260a315f02f9e694f1fcb533928b08
2019-09-03 09:19:09 -05:00
Bartosz Dziewoński 91f99ce78d ve.init.mw.DesktopArticleTarget.init: Update for Minerva changes again
The good thing is that every time our CSS overrides get less crazy.
See 75ff121b29 for the last time.

Change-Id: I9d81aff6a24ec28850563e00206e21c4a6593d2e
2019-08-30 21:40:40 +00:00
jenkins-bot bc963f4155 Merge "Support for defined template context items" 2019-08-30 18:50:27 +00:00
jenkins-bot 6cd05557d0 Merge "MobileArticleTarget: v1 of toolbar refresh" 2019-08-30 17:43:58 +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 593d26b4ab Don't let double-clicking the save button trigger a save
Tapping the toolbar save button while the save dialog is open triggers a save
because of the accesskey. It shouldn't save on a double-tap, because that's
easy to accidentally do / trigger on a slow device.

Bug: T230816
Depends-On: I4c3afce9d57c9bca737272b40b9a4862b5794bac
Change-Id: I1925b1b97de6a811f73196b616ec09a2c30c336f
2019-08-29 22:43:53 +00: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
jenkins-bot 23f5488e93 Merge "Docs: Standardise "messages used" comments" 2019-08-28 16:58:12 +00:00
Ed Sanders 4a8947686d Docs: Standardise "messages used" comments
Change-Id: Ic563901a9439e86ca85ac6210323a35ab34736c3
2019-08-28 16:41:19 +01:00
jenkins-bot 5849de920c Merge "ve.init.mw.ArticleTarget: Use errorformat=html when saving" 2019-08-28 13:43:59 +00:00
jenkins-bot e7985003ab Merge "DesktopArticleTarget.init: Improve handling of 'preloadparams'" 2019-08-28 13:37:54 +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 035f34dac9 DesktopArticleTarget.init: Improve handling of 'preloadparams'
Depends on MediaWiki change I48d4bb3f, which adds the 'arrayParams'
option to handle explicitly indexed array parameters like
`&preloadparams[0]=a&preloadparams[1]=b`. Previously we only handled
implicit indexes like `&preloadparams[]=a&preloadparams[]=b`.

Bug: T231382
Depends-On: I48d4bb3fdf0ea7f5eb133c59bf63651ba356fc42
Change-Id: I8c899bce1b19fa286bd385f89e102a4b87db4db3
2019-08-27 22:32:13 +02:00
jenkins-bot 8f21ec6a5d Merge "ve.ce.MWSignatureNode: Fix rendering" 2019-08-27 18:27:33 +00:00
Bartosz Dziewoński b5aa9e9c72 ve.ce.MWSignatureNode: Fix rendering
The API response format changed in formatversion=2.
Follow-up to 934572cdf7.

Change-Id: I383dfac8b0d10a39b8a9a1b11e11fd595f482619
2019-08-27 17:16:21 +02:00
Ed Sanders 3b09a0719c Link inspector: Turn off 'addQueryInput'
The double result creates more confusion that it clears up,
and now that the query input is always used for text insertion
it is less of an issue that we don't have a case-exact match
in the results list.

Bug: T230819
Change-Id: I58cbe740fa7d0327aadd5dd111161bb7087a4ddb
2019-08-27 12:17:44 +01:00
Ed Sanders 042bfdfd9d Update VE core submodule to master (07687721b)
New changes:
77076f828 LinkAnnotationInspector: add a "label" field on mobile

Local changes:
* Updates for mobile link label editing

Bug: T229431
Change-Id: Ib0489f6f59b228ebc4a20f7a0a515be938a8f6d3
2019-08-23 00:25:51 +02: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
Bartosz Dziewoński 84d548e7b1 Remove redundant @method annotations
A @method annotation is only necessary when the docblock is not
directly followed by a function declaration (in which case JSDuck
assumes it documents a property), e.g. when defining an abstract
function or referencing a function from another library.

I verified that JSDuck generates exactly the same output before and
after this change (docs/data-<hash>.js files are identical).

Change-Id: I7edf51a8560ab9978b42800ab1026f0b5555c3bf
2019-08-21 23:33:15 +02:00
jenkins-bot eaeb3bde40 Merge "MobileArticleTarget: Tweak styling for editor switcher" 2019-08-21 17:00:41 +00:00
jenkins-bot 2d52d7e86c Merge "MWSaveDialog: On mobile show a back button rather than an x" 2019-08-15 09:32:32 +00:00
Ed Sanders 3cbe0a5a20 Update VE core submodule to master (c2c5149f3)
New changes:
62f06382c Localisation updates from https://translatewiki.net.
5fc25c0d9 LinkContextItem: Apply ellipsis directly to link

Local changes to fix link ellipsis styles.

Bug: T230267
Depends-On: I25bb4fa9b7288232b08bab9c88f281817a26d6bb
Change-Id: I8a4b04d45979a1f6c375a7c92a340e3e81d7753c
2019-08-15 10:12:22 +02:00
David Lynch ac471d47e9 MWSaveDialog: On mobile show a back button rather than an x
Bug: T230058
Change-Id: I370fedddf8475e5688ac4ce53f9ccd7d6137705b
2019-08-14 11:38:38 -05:00
Bartosz Dziewoński e14e24f037 MobileArticleTarget: Tweak styling for editor switcher
The .oo-ui-popupToolGroup-handle styles only need to apply to the
editTools toolbar, where they override OOUI styles so that our
"stretched" toolbar works; they don't need to apply to the pageTools
toolbar, which contains just the editor switcher, and where they make
it look different from the MF wikitext editor toolbar for no reason.

Change-Id: I21315b34be0a7c3938f84ada720ff5754d953879
2019-08-08 19:47:14 +02:00
Ed Sanders 348c880cbe MWSaveDialog: Don't pretend saveButtonLabel is optional
Change-Id: I7cfc5bfbf8893fa4808f2823b37efae7b9e520ac
2019-08-05 21:16:21 +01:00
Ed Sanders 88cb572e35 Fix typo in file header
Change-Id: I6f258f81e6cb129328bf912245f23d6c4d877f47
2019-08-05 21:15:58 +01:00
Ed Sanders bae45b63d2 Use flexbox for mobile toolbar
* Makes edit tools equal width
* Improves horizontal alignment within tools

Change-Id: I01b9668b638c21607b12381efc198edfe02f23da
2019-08-05 12:01:32 +01:00
jenkins-bot 644f409d61 Merge "Use MobileFrontend license message on mobile when available" 2019-08-02 22:12:12 +00:00
Ed Sanders 0b1f0a0eda Use MobileFrontend license message on mobile when available
Bug: T229579
Change-Id: I861f0d997607a34ca04727afd55771cbf14e253b
2019-08-02 16:29:54 -05:00
James D. Forrester 05fb44ae56 build: Upgrade eslint-config-wikimedia from 0.12.0 to 0.13.1
Change-Id: I43f407da92f59a8bf758cc2586e84aa5e18d9ab0
2019-08-02 09:51:07 -07:00
Ed Sanders 89ecd64a55 Make extension body the default description for extension nodes
Change-Id: Ifada2a6a0279e64a1ba82f49e03884e362516a83
2019-07-31 16:38:27 +01:00
jenkins-bot 51b93cea94 Merge "ve.init.mw.DesktopArticleTarget: Fix generated URL when loaded using veaction=edit in single-tab mode" 2019-07-31 13:28:59 +00:00
jenkins-bot 2d2e7dcdb2 Merge "ve.ui.MWLinkAnnotationInspector: Correct code comment" 2019-07-30 23:58:16 +00:00
Bartosz Dziewoński 7d3154fea8 ve.init.mw.DesktopArticleTarget: Fix generated URL when loaded using veaction=edit in single-tab mode
We were incorrectly always adding action=edit to the URL in that case.
The condition was always passing because `this.section` is `null` when
unset, but `this.currentUri.query.section` is `undefined` when unset.
This is a similar fix/bug to a68cc38b22.

Bug: T209163
Change-Id: Ic80ac377b763aea53678c4209ba6b3a6ba2996c9
2019-07-31 01:10:56 +02:00
Bartosz Dziewoński 0f5fe34534 ve.ui.MWLinkAnnotationInspector: Correct code comment
The way this works changed in ff9bf1fcb3 (2015).

Change-Id: I61617723ec6ada8018cdca55eb3fcc971796fded
2019-07-31 00:21:45 +02:00
Bartosz Dziewoński 7ac972d408 ve.ui.MWInternalLinkAnnotationWidget: Remove 'maxlength' to fix pasting URLs
Bug: T228240
Change-Id: I1f1be3a0893bdf8b7f9d07301ed01673eda8327d
2019-07-29 22:07:51 +02:00
Bartosz Dziewoński 8dd0bd23d4 Work around a Parsoid bug with creating interwiki links
As detailed in T95850#5078990, Parsoid incorrectly converts HTML to
wikitext when a link `href` refers to an interwiki page and contains
percent-encoded colon characters ':'. VisualEditor doesn't know
anything about interwiki pages (it treats those links as normal local
links, and expects MediaWiki and Parsoid to handle them specially),
so we can't easily special-case them. But since leaving the colon
unencoded is valid for all links anyway, we can just do that.

Bug: T103635
Change-Id: I87d7e6952983a72d90ea739b0bc8488d9f6a9be3
2019-07-26 01:01:01 +02:00
jenkins-bot 138c3eb53a Merge "ve.ui.MWLinkAnnotationInspector: Update size after showing/hiding errors" 2019-07-25 20:51:33 +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 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 bfc549e720 ve.ui.MWLinkAnnotationInspector: Update size after showing/hiding errors
Change-Id: I84af3fbfea4aa89d76de95cfcdbfd3bc9e69ee83
2019-07-25 00:06:02 +02:00
Ed Sanders b35241497a Use type=url for external link input
Change-Id: I13cfdaaf5e94f07d16270df2933d1b23cf9f0ff7
2019-07-24 13:50:11 +01:00
jenkins-bot ef25e831b9 Merge "MobileArticleTarget: Compat for OOUI scrolling fix on iOS Safari" 2019-07-24 11:34:23 +00:00
Bartosz Dziewoński cc1cb63aca targets: Fix silly indirection via a global variable
Since we're inside the Target instance, `ve.init.target` refers to
this object. Some of the code I'm changing even uses `this` instead
of `ve.init.target` on the next or previous line.

Most of the mistakes are a result of mass search-and-replace changes
(478b0bcb, e1a887cc), or moving the code from other classes (d294006d).
But I can't explain the "ve.init.target.getSurface().getDom()" line,
it would be good to figure out why it was this way before we change it.

Change-Id: I0d7c6a48369242d4c99620fcd775ab537420d84a
2019-07-23 22:39:47 +00: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