Commit graph

2221 commits

Author SHA1 Message Date
Ed Sanders c958ea383d Add number of images to gallery context
Change-Id: I3e54c6cb2b29ecb1153afd5f2f61adaabceb095b
2019-07-16 01:04:08 +02:00
Niklas Laxström ea66017b4b Remove non-existing showRedlink from ve.ui.MWInternalLinkAnnotationWidget
It was removed in 3e31a31 in 2016.

Change-Id: Ib7383a4ff585258a98d6795487e912597b41900e
2019-07-10 12:18:48 +02:00
jenkins-bot 2ec5bd5447 Merge "MWLinkAnnotationInspector: Work around annoying syntax highlighting bug in Gerrit" 2019-07-09 17:09:40 +00:00
David Lynch e32f460a5c Extra logging for link inspectors
Bug: T221249
Change-Id: I4e5991f7aa90d08598d5ba7ac14839956bee9b94
2019-07-09 10:12:33 +00:00
Bartosz Dziewoński 9ba3255c26 MWLinkAnnotationInspector: Work around annoying syntax highlighting bug in Gerrit
Wrap a regexp in parentheses to avoid confusing Gerrit's New UI syntax
highlighter, which goes crazy if a line starts with a regexp.
https://github.com/highlightjs/highlight.js/issues/1962

Change-Id: I7e4ca4d5c4d449925af7168147016ed2fb8a6e33
2019-07-09 10:08:23 +02:00
jenkins-bot 1d2b9d20cf Merge "Dialogs: Use close flag for close actions" 2019-07-02 19:01:36 +00:00
Ed Sanders 3f892fe368 Simplify pulsating dot to one DOM node using :before/:after
Change-Id: I81af08d58a33b6d3751bfc5012217b9bd98e69dc
2019-06-27 15:35:50 +01:00
jenkins-bot b57aaa59cd Merge "MW link inspector: Empty before appending" 2019-06-26 19:23:12 +00:00
Ed Sanders d4bd5d14c8 Fix link normalization when opening inspector
Move fix for I92ffc19eab4e to getInsertionData as getTextFromAnnotation
is also used when populating internal link search field.

Bug: T226645
Change-Id: I60806932b00a742dae52651fb7931caf07413361
2019-06-26 16:16:17 +01:00
Ed Sanders 239e592d15 MW link inspector: Empty before appending
We don't inherit any root DOM structure from the parent,
so explicitly clear it.

Change-Id: If4c034e8230ccaf721a8e3667f29c6783c94a8bb
2019-06-23 16:58:04 +01:00
Ed Sanders e83e80f42e Show edit summary on preview page
Bug: T199582
Change-Id: Ia8c2322706e8e635498c447dddb3b4b98040e27e
2019-06-21 12:54:13 +01:00
Ed Sanders 7ad624f0a3 Remove switch confirm dialogs
Bug: T220007
Change-Id: I81b39a02d573d96bcb6b4238aabbcd077e874906
2019-06-11 22:35:34 +02:00
Ed Sanders efae95dabf Dialogs: Use close flag for close actions
Bug: T225021
Change-Id: Ifd0cb40031c2717cc0716f98a27c124f54709003
Depends-On: I67b8474b0662f8dbc23c1b5ff883e3d4093bdbd4
2019-06-10 15:58:47 +01:00
jenkins-bot 4ec7272876 Merge "MWEditSummaryWidget: Use showSuggestionsOnFocus flag" 2019-05-29 15:29:13 +00:00
Ed Sanders 5b4158860a 'scrollCursorIntoView' -> 'scrollSelectionIntoView'
Change-Id: I202b1bdb3196b318c26422577b66de66d37080c8
Depends-On: Iac446ce9fce170b43c96001ca89e8af4825522ca
2019-05-24 10:11:38 +00:00
Ed Sanders c1130d386c MWEditSummaryWidget: Use showSuggestionsOnFocus flag
Bug: T169484
Depends-On: Ib47c9831ea712bf92b56a88474c3419067124458
Change-Id: I8697e153d4ed0bfbc8d89b65ff63a302c11a27ea
2019-05-24 11:09:26 +01:00
Bartosz Dziewoński d43262feb6 ve.ui.MWEditSummaryWidget: Remove a hack for T220204
Change-Id: I1539eb72b9b313c32743b300a58a734f3eaafef4
2019-05-23 21:30:15 +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 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 a424bc3da5 SaveDialog: Move iOS Safari hack to avoid losing focus
Bug: T222859
Change-Id: I07b530573a8f5b900bdb5cbc15314f5758baf36a
2019-05-13 11:50:55 +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
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
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
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
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
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 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
Ed Sanders 31dd73ae81 MediaDialog: Use new icons
Bug: T222086
Change-Id: I09c0a4e039de224d3cb0dd92855c559668ed35d3
2019-04-29 10:00:06 -07: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
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 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 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 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
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
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
jenkins-bot afdd97c58f Merge "EditSummaryWidget: Disable pending animation" 2019-04-09 20:13:07 +00:00
Ed Sanders ed0105b5a1 EditSummaryWidget: Disable pending animation
Animation shows breifly on every keystroke, even though
only one server request is made, as the promises always yield
to a browser animation frame.

A pending animation isn't really required for autocomplete
as the results are only optional suggestions.

Change-Id: Ifa257592b10d84dccfa3e0c819c1edf1f7ef9cfa
2019-04-09 19:54:39 +00:00
Ed Sanders e2dfdf0ef7 EditSummaryWidget: Don't show suggestions on focus
Bug: T220176
Change-Id: Iffad075929d8835eb4f8677b33c3edd30a27b3f8
2019-04-05 14:04:29 +01:00
jenkins-bot 96dfb99016 Merge "Edit summary autocomplete" 2019-04-04 17:44:36 +00:00
Bartosz Dziewoński a5c5257e71 Directly call action=query&prop=langlinks from JS rather than PHP wrapper
When this code was written in 2013 (1a5bdd5bd2),
the langlinks API did not have a way to return the language names (autonyms).
This has been added in 2014 (4ba3a9aea96ee21c035c69999be23580e23f4e0a).

Change-Id: I70edb846d94b1108b079caf5915532234190da8f
2019-03-18 23:27:44 +01:00
Ed Sanders 1ffb574450 Edit summary autocomplete
Bug: T50274
Change-Id: Ida462f3dea325902459546af97e66cd9d0c86166
2019-03-09 14:03:27 +00:00