Commit graph

11851 commits

Author SHA1 Message Date
Ed Sanders 4beab42217 Switch to wikitext: Don't set oldid if unmodified current ID
Bug: T223651
Change-Id: I5a896cd98d304c419e61c5f56adb6175bc1c72a8
2019-05-22 14:32:54 +01:00
Bartosz Dziewoński b9835f75d3 Check if page is really editable and call #setReadOnly accordingly
There are various circumstances where the wgIsProbablyEditable check
gives incorrect results (hence the 'probably'):

* User is blocked (T111217)
* Page is protected from creation (T173763)
* Page is transcluded on a cascade-protected page (T217217)

Bug: T111217
Bug: T173763
Bug: T217217
Change-Id: I7df8909c31f29d2e7521bef8612c27cb61146a4d
2019-05-18 17:23:31 +02: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 b6704010fa Automatically add a template when chosen from the autocomplete list
This behaves in the same way as the link inspector.

Change-Id: I8901c636cd5c74023f4c6c562b410f55afe91124
2019-05-17 13:15:07 +02:00
Ed Sanders 47af04b8d9 MobileCollabTarget: Cleanup toolbar
Change-Id: I4b2e21ce61cb647ca6a74bdbdd8def614ed41341
2019-05-14 20:19:54 +01:00
Bartosz Dziewoński aadec90f0f DesktopArticleTarget.init: Fix wrong message used for 'Edit' tab in rare cases
If a new namespace was added to $wgVisualEditorAvailableNamespaces,
but VE was loaded on a page with old cached HTML, the 'Edit' tab's
text would incorrectly be 'Edit source'.

If $wgVisualEditorTabMessages['edit'] or ...['create'] was changed
from non-null to null, but VE was loaded on a page with old cached
HTML, the tab would still use the old text.

Change-Id: I2d5c7b922ba480eb90fa0a6da7a1901f062c96df
2019-05-14 00:19:08 +02:00
Bartosz Dziewoński a76d3daf54 DesktopArticleTarget.init: Allow veaction=edit to override namespace settings
Prior to 80bfbfc54b this worked by
accident, and with a number of bugs depending on your settings (see
T219457). It turns out that Wikipedia users have invented various
workflows that depended on this bug (mostly involving sandbox pages in
namespaces where VE is not enabled). Restore it as a supported
feature, and in a way that avoids the problems it previously caused.

Bug: T221892
Change-Id: I62714b6f2905efd1d1b34c7a13b9917cb6c609fc
2019-05-14 00:18:47 +02:00
jenkins-bot e59da0183f Merge "Section switch from wikitext to VE" 2019-05-13 19:24:58 +00:00
Ed Sanders 3a4822c2fe Section switch from wikitext to VE
Use an API 'parse' call with a sectionid to trigger
a full document expansion using replaceSectionAtRev.

Then send this off the RESTBase to convert to HTML
and statsh.

Ensure the etag is passed back to the API response.

Bug: T117716
Bug: T223023
Change-Id: I1b35b28e428a1f86d2e34d90ddbe73361ce14818
2019-05-13 19:49:10 +01:00
jenkins-bot a0a1f5422e Merge "Fix inheritance of isResizable" 2019-05-13 18:11:44 +00:00
Ed Sanders 4c8346f822 Fix API request for media dialog preview
Regressed with upgrade to apiversion 2.

Change-Id: I257c367b8f639a389002fefcd074e2fffe5a3bd4
2019-05-13 12:51:54 +01:00
Ed Sanders 20f876ca69 Fix inheritance of isResizable
Bug: T223086
Change-Id: Ib57b9a0173903db438120b94ffa391e734aee614
2019-05-13 12:00:05 +01:00
Ed Sanders a424bc3da5 SaveDialog: Move iOS Safari hack to avoid losing focus
Bug: T222859
Change-Id: I07b530573a8f5b900bdb5cbc15314f5758baf36a
2019-05-13 11:50:55 +01:00
jenkins-bot e46debccea Merge "Fix edit summary preview" 2019-05-12 12:03:47 +00:00
jenkins-bot 4197941786 Merge "Fix visual diff in 2017 WTE" 2019-05-12 11:55:31 +00:00
Ed Sanders 95b9bb7e71 Fix visual diff in 2017 WTE
Change-Id: Iaa4c470f8677b83af92138ee44d57fb6a6e903d0
2019-05-11 22:02:19 +01:00
Ed Sanders 83b1e02286 MobileArticleTarget: Fix typo in tool config
Change-Id: Ib465ac175a3ab40584c0199b7801eca03644b2d5
2019-05-11 21:36:42 +01:00
Ed Sanders 5346acc175 Fix edit summary preview
API version 2 doesn't use the '*' property.

Bug: T222999
Change-Id: I4da49dfd6f1e7ffe682fb803bb256ab7ec2aad61
2019-05-11 21:24:43 +01:00
jenkins-bot 83729f53d7 Merge "CollabTarget: Replace button in toolbar" 2019-05-09 17:03:25 +00:00
Ed Sanders 7f39bb9520 CollabTarget: Replace button in toolbar
Change-Id: Ib9d08dd473421e915a0a00edd5c058dcd292fabe
2019-05-09 10:56:43 -05:00
jenkins-bot 28c4e25024 Merge "Fix initial rendering of interwiki links" 2019-05-08 22:42:01 +00:00
jenkins-bot c1c7e22347 Merge "Link inspector: Pass new 'showInterwikis' option to title widget" 2019-05-08 19:46:36 +00:00
Ed Sanders 1168db2370 Link inspector: Pass new 'showInterwikis' option to title widget
Bug: T222831
Change-Id: I28a8c8cbb90f9917301bafa877e0ae66970816e7
2019-05-08 13:48:24 -05:00
Marko Obrovac c32bce5add ArticleTargetLoader: Add stash=true query param to RB HTML fetching
RESTBase is changing the way it is storing HTML/data-parsoid renders. In
order to still support VE (and other editors) with quick access to HTML
and matching data-parsoid (needed later for transforming the modified
HTML to wikitext), VE now needs to let RESTBase know it intends to
perform a transformation call later on. In that case, RESTBase will make
sure to keep the matching data-aprsoid around for long enough.

Bug: T222639
Change-Id: I02672e29bd0f331794fd77d9e56f9cc6822d9b9e
2019-05-08 13:30:01 +02:00
Ed Sanders bee8344efe Fix initial rendering of interwiki links
This does not fix the rendering of new
or modified interwiki links, which will
require an API request.

Bug: T185083
Change-Id: Icb72291e8662456e1a233392bf22d786c7eed1e5
2019-05-07 14:44:18 -05:00
jenkins-bot 7c0650cca2 Merge "Fix abandon edit warning message" 2019-05-07 01:33:29 +00:00
jenkins-bot c8dd21f87d Merge "Fix setting of this.loading so it can be cleared" 2019-05-07 01:10:01 +00:00
Bartosz Dziewoński 274d1cfde6 ve.ui.MWWikitextSurface: Hide UI of extensions that attach to our dummy textbox
Bug: T211898
Change-Id: Ieec33166299ddba4bdd36b3feb0376d82bb704d3
2019-05-06 22:56:39 +02:00
jenkins-bot bc764b1644 Merge "Fix some bad math in CSS code comments" 2019-05-06 20:13:25 +00: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 0bc3c81978 Fix setting of this.loading so it can be cleared
Set this.loading to dataPromise before the done
handler is attached as that can run synchronously
and try to set this.loading back to false.

Change-Id: I4e5208b7bac9968951f30555dc56e054c38a3935
2019-05-06 15:11:52 -05:00
Bartosz Dziewoński b9dfb5debb Fix some bad math in CSS code comments
Change-Id: Iff405ab0defabe0fff8f3b2ad2e86ceae78ef546
2019-05-06 21:53:15 +02:00
jenkins-bot dd262c5089 Merge "Fix diffs in non-section-editing mode" 2019-05-06 18:13:39 +00:00
Bartosz Dziewoński ff15a2ba47 Fix diffs in non-section-editing mode
If the editor was opened via a section edit link, but visual section
editing was disabled (the editor contained the entire article),
generating visual diffs would fail.

Follow-up to ec6cbeaf5e.

Bug: T222489
Change-Id: I74d589bb9f7ee09312ef816148c581440beb65e5
2019-05-06 19:39:25 +02:00
James D. Forrester dd5a1f0285 Follow-up f9330c8564: Don't auto-add MWSaveTool
Bug: T222325
Change-Id: I1ccd43c6de51cd2fc8d4fc3291b1870b99736d80
2019-05-02 15:57:34 -07:00
Bartosz Dziewoński c31cf00432 ve.ui.MWSaveDialog: More save panel disappearing on iOS Safari
Bug: T221289
Change-Id: I6ec40bd78f5c36a6033e800466124fcbb4f6446d
2019-05-01 22:43:49 +02:00
Ed Sanders 8068198efc ArticleTarget: Return dataPromise from #load
Allows users to get hold of the data promise, as
this.loading is reset to false on completion.

Change-Id: I90452ac21c898185ec993b05c12f80ae2edfb814
2019-05-01 16:48:31 +01:00
jenkins-bot 857c1bd3d1 Merge "Replace the save button with a save tool" 2019-04-30 19:51:36 +00:00
jenkins-bot d85062d1d1 Merge "Fix switching without changes" 2019-04-30 19:37:03 +00: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
jenkins-bot cd70d287de Merge "API: Use formatversion=2 by default" 2019-04-30 19:30:21 +00:00
Ed Sanders 934572cdf7 API: Use formatversion=2 by default
V2 has better handling for booleans.

Change-Id: I5388bd2cc64ae0c9ed4a185adce1e3bb4cdd92fc
2019-04-30 19:31:28 +01:00
Ed Sanders 30095b68c3 Make mobile check icon progressive blue
Bug: T222187
Change-Id: Ie713aa662bdc8bf9a74c6de8add4848b3d1499d6
2019-04-30 16:05:28 +01:00
Ed Sanders 7739b1c79b Fix switching without changes
* Remove 'discardChanges' from switchToWikitext. This was
  intended to discard changes even when the document was
  modified, but it is no longer used as we always keep
  changes if we can.
* Remove 'leaveVE' param, it was only used once and has
  been replaced with a direct call to switchToFallbackWikitextEditor.
* Don't reset 'section' if there are no changes.

Bug: T221981
Change-Id: Ia39345da44d203ba67ae331917c8d5ece7d42ef7
2019-04-30 14:52:58 +01:00
jenkins-bot 33e157eb78 Merge "MediaDialog: Use new icons" 2019-04-29 17:38:57 +00:00
jenkins-bot 90966ac74e Merge "Improve rendering of audio files" 2019-04-29 17:09:51 +00:00
Ed Sanders 31dd73ae81 MediaDialog: Use new icons
Bug: T222086
Change-Id: I09c0a4e039de224d3cb0dd92855c559668ed35d3
2019-04-29 10:00:06 -07:00
Ed Sanders 258965c8b2 Improve rendering of audio files
Use a static image of an audio player.

Also disable resizeable handle.

Bug: T206022
Change-Id: Ic41f381e65c40c3682f470b9993b2c9dbbb506c5
2019-04-28 23:56:08 +01:00
Ed Sanders ec6cbeaf5e Only diff <section> contents in section editing mode
Bug: T221903
Change-Id: I5989d0c899d35ca8ac5af9cdecdfa5ea4f6c22e8
Depends-On: Ie8e2a88eddbeca5fbf47ab038964885f12718df7
2019-04-28 15:32:47 +00:00