Commit graph

11819 commits

Author SHA1 Message Date
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
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
Bartosz Dziewoński 75ff121b29 ve.init.mw.DesktopArticleTarget.init: Update for Minerva changes
I think mostly the incompatible changes were made in commit
I5a7d73b20617cb3c6d6379084ac4bea23ec3bc74, but I didn't try
to track them down.

Also fix an issue where hrefs in section edit links generated
by this code were wrong.

Bug: T208102
Change-Id: Ibf6564bc0dcb7fcb420739a897b54346a01add02
2019-04-26 20:52:52 +02:00
Ed Sanders 4fb17205b6 Allow switching from mobile visual to mobile source mode with data
Bug: T128422
Depends-On: I11b7195e9d63f9b279213201036c6338d71669f0
Change-Id: Ieaa2df17c1f73d681d935cd6103ef41c061e1a28
2019-04-25 22:37:53 +02:00
Ed Sanders 709530993b DesktopArticleTarget: Remove changing document opacity when switching to WTE
When this was introduced in 7b2cacbe57
(2013), the confimation dialog was a generic confirm() popup. Now that
it is a OOUI dialog, the dialog overlay serves the same function.

Change-Id: I9812ab55c7a8179524865d93a6d269e388d4c4ab
2019-04-25 21:08:42 +02:00
jenkins-bot d39c28ca69 Merge "ve.ui.MWSaveDialog: Work around save panel disappearing on iOS Safari as well" 2019-04-24 22:25:59 +00:00
Ed Sanders e3846ed09b EditSummaryWidget: Don't highlight first automatically
Bug: T50274
Change-Id: If9d46116caac381bfc7264652429377e60bb2a0b
2019-04-24 17:58:46 +01:00
Bartosz Dziewoński 11673b21ad ve.ui.MWSaveDialog: Work around save panel disappearing on iOS Safari as well
Same thing as Ifb49ede450cabdcd8303b298b62f2ac632809b53, for
a slightly different case that we missed.

Bug: T221289
Change-Id: I0ca287af87e1058620fbed75a50d40f01513a567
2019-04-24 15:56:58 +02:00
jenkins-bot 25b0475434 Merge "Remove block notice tracking" 2019-04-24 02:47:26 +00:00
jenkins-bot dc5e49aad1 Merge "ve.ui.MWSaveDialog: Fix preview of redirects" 2019-04-24 02:45:28 +00:00
Bartosz Dziewoński 5b0bb28323 ve.ui.MWSaveDialog: Fix preview of redirects
Incorrect order of operations caused all metadata to be removed before
we looked for the 'mw:PageProp/redirect' metadata item.

Bug: T221686
Change-Id: Ifcf210ad772babe1019fd0cfbaa7bd60d0e7e5fe
2019-04-23 23:02:24 +02:00
Ed Sanders e91df06c32 Restore external paste sanitization of DOM elements
Was accidentally removed in I366a091ff4.

Bug: T221668
Change-Id: I6631f47b0afcbfb81ee72234f0b1cdabb24c1a85
2019-04-23 19:48:49 +01:00
Dayllan Maza 96de1353d3 Remove block notice tracking
This is a clean up after collecting the necessary data related to
blocks and how often users see the block notices

See: https://phabricator.wikimedia.org/T189724

Bug: T214214
Change-Id: I532a0cd95009109ba25caa8dd31badd5c1900da7
2019-04-23 11:31:37 -04: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 6d7de40f0d Merge "ve.ui.MWSaveDialog: Fix border radius styles after changes in OOUI" 2019-04-17 19:13:38 +00: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
Bartosz Dziewoński 80bfbfc54b ve.init.mw.DesktopArticleTarget: Validate 'veaction' parameter against available modes
If a page can't be edited in the requested mode (e.g. veaction=edit on
talk pages), the parameter will now do nothing (the editor won't
load), instead of trying to load the editor in another available mode.

Bug: T219457
Change-Id: I2cd78ea13ba13ff622f5e4b7db033f82dfa7875e
2019-04-16 20:19:37 +02:00
Bartosz Dziewoński bba27be62e ve.ui.MWSaveDialog: Fix border radius styles after changes in OOUI
The OOUI selector has changed and we need to update ours, as we're losing the specificity fight.

Change-Id: I294c1c5480a335431542e10bcff234499001090d
2019-04-16 17:35:56 +02:00
Bartosz Dziewoński 0e0bc12177 ve.ui.MWMagicLinkNodeInspector: Select annotation after converting
Currently, the selection is not updated, so we end up keeping the
first two characters selected. Same code as ve.ui.MWLinkNodeInspector,
see cb72eea2041bb35e02eb756be3f2c7e8e6c3b43c.

Change-Id: I2204643c41025ad69fa9e232edfc5a896f1b8bdf
2019-04-16 17:10:42 +02:00
Ed Sanders d14d443aff Use new CE Surface selectAnnotation method
Change-Id: Ic26c46d3cdabc7b9949527d04eada5203cf6f7d3
Depends-On: I23f3586e340899801c99b3015e51dd0965a8ef0b
2019-04-16 17:09:01 +02:00
jenkins-bot cf294a0c6d Merge "init: Bundle wgVisualEditorUnsupportedEditParams with DesktopArticleTarget.init" 2019-04-16 14:58:43 +00:00
Timo Tijhof cc599c2e36 init: Bundle wgVisualEditorUnsupportedEditParams with DesktopArticleTarget.init
Bug: T219342
Change-Id: I4b5a048779bd4b957cc5d99c3a7686363ffb3df9
2019-04-16 16:33:53 +02:00
jenkins-bot c0dc4f6e7e Merge "ve.init.mw.ArticleTarget: Add sanity check against loading content in wrong mode" 2019-04-16 12:38:57 +00:00
jenkins-bot b180d6d8f1 Merge "Only depend on ArticleTarget for diff viewer" 2019-04-12 17:56:28 +00:00
jenkins-bot f9f8ce8919 Merge "Fix mobile done/tick button" 2019-04-12 16:12:50 +00:00
jenkins-bot 3a0848f0d6 Merge "ve.ui.MWSaveDialog: Work around review panel disappearing on iOS Safari" 2019-04-12 14:27:09 +00:00
Ed Sanders ef310f41a4 Only depend on ArticleTarget for diff viewer
Change-Id: I1680c9d184edac7b55bab205ff5d9c945cabde3a
2019-04-12 15:14:09 +01:00
jenkins-bot 53db6727b3 Merge "Rename 'citefromid' to 'citoid'" 2019-04-11 11:01:00 +00:00
Ed Sanders 79cee8d820 Fix mobile done/tick button
Change-Id: I53eebfe9b94354521763743ab70e4d1a919286f8
2019-04-10 22:51:08 +01:00
Bartosz Dziewoński b7f7cf3734 ve.ui.MWSaveDialog: Work around review panel disappearing on iOS Safari
No idea what causes it, but I've seen a similar issue when working on
Ic35f084d019afd1782292c831765ceb1444fb14a (in OOUI) and this hack
worked there too.

Bug: T219680
Change-Id: Ifb49ede450cabdcd8303b298b62f2ac632809b53
2019-04-10 22:56:08 +02:00