Commit graph

11733 commits

Author SHA1 Message Date
Bartosz Dziewoński 500462f4b2 ve.init.mw.MobileArticleTarget: Improve iOS Safari by moving 'padding-top' for toolbar
We need to set 'padding-top' matching the height of the toolbar
somewhere, so that the toolbar doesn't cover the top of the editing
surface. Apparently moving it from the current place (the top-level
wrapper for the MF overlay) to the document node (the node with the
'contenteditable' attribute) allows Safari to properly scroll the
cursor into view when focussing, rather than scrolling it offscreen.

Bug: T219066
Change-Id: Iee1e03bce24c2f149a0aa0f393a37b9db43eaca6
2019-03-27 22:06:14 +01:00
jenkins-bot 277e387295 Merge "MobileArticleTarget: When saving a section don't trust current page markup" 2019-03-27 17:16:17 +00:00
David Lynch 5496d18953 MobileArticleTarget: When saving a section don't trust current page markup
The edit might have changed the section title, which will change the
section-hash, which will make the redirect break. The only way to avoid this
is to use the HTML provided to saveComplete to check for the new hash.

Bug: T213120
Change-Id: I5adfdb44a8304ed4f30def74400e4512e9e8c0ae
2019-03-27 16:58:58 +00:00
Bartosz Dziewoński 21e9db7d13 Respect user preference for default thumbnail size while editing
Bug: T69047
Change-Id: Ibf90d290df5634cd89651a427a6aa1c6f9d7a553
2019-03-26 22:15:26 +01:00
jenkins-bot 455c95df32 Merge "ve.init.mw.MobileArticleTarget: Bring the toolbar back into view after it scrolls out" 2019-03-23 12:10:29 +00:00
jenkins-bot c02b357b39 Merge "ve.init.mw.MobileArticleTarget: Remove unused method" 2019-03-23 04:37:46 +00:00
jenkins-bot 40fb9ce0fb Merge "ve.init.mw.MobileArticleTarget: Restore missing methods" 2019-03-23 04:37:02 +00:00
Bartosz Dziewoński 9dc3632982 ve.init.mw.MobileArticleTarget: Restore missing methods
It appears that I did a Ctrl+X in one file, but forgot to Ctrl+V in
the other. And no one noticed that 100 lines of code went missing.

Follow-up to 73561f7aba.

Bug: T218946
Bug: T219041
Bug: T219043
Change-Id: Ib1fd85d121083239397698ff1a30a7908deca25f
2019-03-23 04:49:53 +01:00
jenkins-bot 5e0c2c0bdd Merge "Introduce a 'mobile-ab' config option for section editing" 2019-03-23 02:59:23 +00:00
Bartosz Dziewoński e9ef3a6f78 ve.init.mw.MobileArticleTarget: Remove unused method
ve.init.Target#isToolbarOverSurface has been removed in VE/VE in 2016:
8b1208cb976278bd44025e6d2c86a3ea6ed8c177. Nothing calls this method.

Change-Id: I9640978b45e568412db4b1c5aa80631a68d847b2
2019-03-23 03:52:01 +01:00
Bartosz Dziewoński f2fc7b8e73 ve.init.mw.MobileArticleTarget: Bring the toolbar back into view after it scrolls out
On iOS Safari, when the keyboard is open, the editor toolbar could
previously be scrolled out of view, due to how the keyboard affects
the viewport (or rather how it doesn't).

Detect when this happens and bring it back in, with a similar slide-in
animation as when the editor loads. Technical restrictions prevent us
from really keeping it in view at all times, and I think this is the
best we can do (and it looks almost intentional).

Bug: T218414
Change-Id: I5eed360d4644815bc9829fbc6b0ffd79b205d10b
2019-03-23 00:59:50 +01:00
Bartosz Dziewoński 73561f7aba ve.init.mw.MobileArticleTarget: Merge in downstream code from MobileFrontend
It will be easier for us to maintain this way. The code I'm moving had
a lot of comments saying that it should be moved here.

See MobileFrontend change Ibe192360bdecab86519de1781f66f90a3441c551.

Bug: T218946
Change-Id: I908e035ec245a9b190f05e64c35dbb29936434de
2019-03-22 18:30:05 +00:00
Bartosz Dziewoński 5806329748 MobileArticleTarget: Remove padding below the surface on iOS
It was here because our old hacks prevented the viewport from being
scrolled, so the keyboard would always cover the last few lines of
the surface. But it is no longer necessary after we ditched the iOS
scrolling hacks in MobileFrontend.

Bug: T217769
Change-Id: Iaf3f86c0fc43f75d11a43462721f44d62abc6eb3
2019-03-21 18:33:02 +00:00
Bartosz Dziewoński a89896a500 MobileArticleTarget: Remove broken iOS override for #scrollToHeading
This is no longer necessary and doesn't work after we ditched the iOS
scrolling hacks in MobileFrontend. And the default implementation works!

Bug: T218429
Change-Id: I5fba78a3877901dac5afda46d3004c07cad383d0
2019-03-21 18:32:54 +00:00
Ed Sanders d6d48ff4b8 Introduce a 'mobile-ab' config option for section editing
This enables mobile section editing if the user is logged
in and has an odd user ID. Otherwise it is disabled.

Bug: T218851
Change-Id: I2c22d7636ae11d2db7780ae5adb3abe9df532b7c
2019-03-21 13:18:10 +00:00
jenkins-bot 074973f01d Merge "Remove special handling for category and file pages" 2019-03-19 19:24:13 +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
jenkins-bot 73063b4f8c Merge "Fix section param in historical diffs" 2019-03-09 01:14:40 +00:00
Bartosz Dziewoński 7acbc4d44c ve.init.mw.ArticleTargetLoader: Better document pageName parameters
Bug: T217826
Change-Id: If136b7b9dc747a75062f88f8decc1128938fee9f
2019-03-08 22:46:10 +01:00
Ed Sanders 2e33841b5a Fix section param in historical diffs
Passing section=undefined resulted in no <section> tags being
unwrapped, which broke the historical diff. Ensure 'null' is
used instead for whole documents.

Bug: T217752
Change-Id: Iec33e6ab83bfbd011df9dc05f4daccc26b1df8b5
2019-03-07 12:01:44 +00:00
jenkins-bot 085f21792b Merge "rebaser: pushState when calling showForm" 2019-03-06 12:13:02 +00:00
jenkins-bot 5aec469952 Merge "rebaser: Fix export dialog title" 2019-03-04 14:49:46 +00:00
jenkins-bot fefc7351a6 Merge "MWTransclusionNode: Comment strange matchTagNames values" 2019-03-04 14:49:43 +00:00
Ed Sanders b3a35790c1 rebaser: Fix export dialog title
Change-Id: Ib76adbdb8b6547e42968f73cc196d7b8817e25f0
2019-03-04 14:26:39 +00:00
Ed Sanders b0b8194faf rebaser: pushState when calling showForm
Change-Id: Id650acbcc4d0ba699fa1264acfd8ab6249315806
2019-03-04 13:25:26 +00:00
jenkins-bot f3cb757811 Merge "rebaser: Bind special tab click to showForm" 2019-03-04 04:44:26 +00:00
jenkins-bot 266a2bf036 Merge "ApiVisualEditor: Separate out templatesUsed from metadata" 2019-03-02 01:49:06 +00:00
Ed Sanders 9aee6bb5d1 MWTransclusionNode: Comment strange matchTagNames values
Change-Id: Ica207be94e5cc888c4454989d2fd6e9b5579a8ea
2019-03-01 16:16:20 +00:00
Ed Sanders 6f60b780ff rebaser: Bind special tab click to showForm
Change-Id: I3207c50b2515356833c19c7d46c69af4918dfa58
2019-02-28 19:20:14 +00:00
jenkins-bot ba5589f801 Merge "ve.init.mw.DesktopArticleTarget: Remove some unnecessary toolbar setup code" 2019-02-28 13:19:30 +00:00
jenkins-bot d17d9ae768 Merge "Allow page title heading to be selected while editor is active" 2019-02-27 12:50:21 +00:00
jenkins-bot 3ccbc96fa7 Merge "When rendering categories, hide/show catlinks as needed" 2019-02-26 19:52:37 +00:00
David Lynch b1863f4b25 When rendering categories, hide/show catlinks as needed
Catlinks is hidden via a class when there are no non-hidden categories on the
page. We thus need to toggle that class depending on the categories
added/removed from the page.

Bug: T213528
Change-Id: I4067c5721c28041542b9ef2dbc796fbc41b1afe8
2019-02-26 11:26:27 -06:00
Bartosz Dziewoński 73b2defc1e Update VE core submodule to master (4669eff2b)
New changes:
0d28d49e7 ve.transformStyleAttributes: Update browser bug workaround comments
f51b718d0 Localisation updates from https://translatewiki.net.
b0d33a88a Use 'then' for opening/opened promises
40e98a759 Abort opening window for insertion when in readonly mode
744dc8cfa FragmentWindow: Add missing mixins, rename logic in WindowAction
ac5c18052 ve.ui.DiffElement: Don't always target links to new window

Bug: T210142
Change-Id: If07a40fff92fc739b7c6f954c3b89ad3fd7bdfd5
2019-02-26 16:57:17 +01:00
jenkins-bot 86a1995662 Merge "ve.dm.MWGalleryImageNode: Update for Parsoid changes to "broken" images" 2019-02-26 11:51:55 +00:00
jenkins-bot 1c083a362e Merge "Add more read-only implementations" 2019-02-25 23:59:13 +00:00
jenkins-bot 010c1889b3 Merge "TemplateContext: Filter out empty template descriptions" 2019-02-25 23:16:42 +00:00
jenkins-bot 92ce7f0b99 Merge "MWMetaDialog: Implement read-only mode" 2019-02-25 23:12:47 +00:00
Ed Sanders 403b1f97b1 TemplateContext: Filter out empty template descriptions
Change-Id: I1be721c30d92b1da4fc226935a7e0a322f0c4d41
2019-02-25 23:05:51 +00:00
jenkins-bot 99351fa20a Merge "MWCategoryWidget: Implement setDisabled" 2019-02-25 23:05:23 +00:00
jenkins-bot f8ffb4d6ce Merge "MW(Advanced)SettingsPage: Use Array.forEach for metaItemCheckboxes" 2019-02-25 22:57:52 +00:00
Ed Sanders c04d3da853 Add more read-only implementations
* Gallery:
  - Disable add/remove image buttons in read-only mode
  - Make image list undraggable
* Template: Disable outline controls
* Transclusion: Add/remove buttons on template pages
* MagicLinkNodeInspector: Disable input (e.g. ISBN links)

Bug: T210142
Change-Id: Ibb03ab0bfd55ef5bf7d7558c217c779d7904a134
2019-02-25 20:01:11 +00:00
Ed Sanders e3bb0b9e8b ApiVisualEditor: Separate out templatesUsed from metadata
Generating the templatesUsed list is relative slow, and is only
used in an obscure part of the editor, so only generate it when
needed.

Bug: T209078
Change-Id: I1cecdad65b80c4c9b1746e752ea4b41bc0fc0037
2019-02-25 13:01:43 +00:00
Ed Sanders 6aa61aefa5 MWMetaDialog: Implement read-only mode
Bug: T210142
Change-Id: I7b32668a5daecc04515e9fa13875b278cadfbcce
2019-02-25 12:56:37 +00:00
Ed Sanders 33774758b7 MWCategoryWidget: Implement setDisabled
Change-Id: I443f2b55e2f17fb3c182e6cb22e392434513ce6c
2019-02-25 12:56:37 +00:00
Ed Sanders 9c5ec0d0d1 MW(Advanced)SettingsPage: Use Array.forEach for metaItemCheckboxes
Change-Id: Id034ae5cba46503370fbf61094b33e6b93569fe9
2019-02-25 12:56:35 +00:00
Ed Sanders 8e3ef8fb7f Hide label section in MagicLinkNodeContextItem
Change-Id: Ifc6cdb2ee15874bfd036b29a6abaffa6e4207728
2019-02-24 13:25:23 +00:00
jenkins-bot 362a0b727c Merge "ve.ui.MWSaveDialog: Fix fragment links in visual diff too" 2019-02-23 18:26:07 +00:00
jenkins-bot f7a4e0a80a Merge "ve.ui.MWSaveDialog: Target links in visual diff to new window" 2019-02-23 18:21:18 +00:00
jenkins-bot fe70c26ee3 Merge "ApiVisualEditor: Remove red-link cache warming" 2019-02-23 10:36:56 +00:00