Commit graph

2229 commits

Author SHA1 Message Date
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
Ed Sanders 085764ddd6 SaveDialog: Hide options bar when empty
Since I7f6fd7ee9 it is now possible for the options bar to be
completely empty if the user is logged out. In this case hide
it and only show it again when the character limit needs to be
show.

Ideally we wouldn't have the height change, but it is quite rare
that a user gets to 400 chars and is logged out.

Bug: T228165
Change-Id: Ifbdf352afcbf4e549889e04fdb70fd30ce233aad
2019-07-16 14:28:25 +01:00
jenkins-bot 2d25d15a39 Merge "Add number of images to gallery context" 2019-07-15 23:26:30 +00:00
Ed Sanders c958ea383d Add number of images to gallery context
Change-Id: I3e54c6cb2b29ecb1153afd5f2f61adaabceb095b
2019-07-16 01:04:08 +02:00
Ed Sanders 377ed366cd Add validation to feedback to internal links
Turns out we had this message lying around unused,
so use it (even though an invalid title is quite
hard to come up with).

Change-Id: I0200678820fe88a59869f7fad8f491b4c5b77482
2019-07-15 22:35:59 +00:00
Ed Sanders fba9585dbf Add validation feedback to external link
Bug: T227899
Change-Id: I165ed59402bdffb63b0c79b68a41d509c4574837
2019-07-15 22:35:46 +00:00
jenkins-bot 14539bfe22 Merge "Make page title the target title" 2019-07-15 19:08:11 +00:00
tcreusc 57317a20e4 Make page title the target title
There are cases where the page title and the real/desired page name
are not the same. Fixing that also fixes the suggestions that appear
in dialogs (see related bug).

Bug: T193132
Change-Id: Iafa84c05bea08ebb061ee6d1323eb50945b39815
2019-07-15 17:22:17 +00:00
Bartosz Dziewoński f259bb9c02 MWSaveDialog: Use close flag for close actions, move 'back' button
When previewing/reviewing changes, the "Return to save form" button
now replaces the "Resume editing" button in the top-left corner (and
receives the 'back' flag). Effectively, you tap 'back' once to go back
to the edit summary, and twice to go back to editing. This seems to me
like a much more natural interaction than two separate buttons.

Bug: T225021
Bug: T227049
Bug: T227857
Change-Id: Id27ccf06923c8aa86b1c1a9292bc43bb825ce6c8
2019-07-12 20:33:02 +00: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