Commit graph

1686 commits

Author SHA1 Message Date
jenkins-bot 45a5121853 Merge "requestParsoidData: Support 'wikitext' param in RESTBase-less environment" 2017-10-17 19:22:55 +00:00
Ed Sanders 0306f77fde Simplify mobile overrides using LESS
Change-Id: I9ffce148fede03dda6e78377a0d20355bb45e5fd
2017-10-17 19:44:03 +01:00
jenkins-bot 18e2ccdc96 Merge "init.mw.DesktopArticleTarget: properly set up section links" 2017-10-17 16:28:54 +00:00
David Lynch 80c813e08c init.mw.DesktopArticleTarget: properly set up section links
We were reimplementing (incompletely) the setup from the .init version. Just
call the original, modified slightly so it doesn't over-setup on repeated
calls.

Bug: T151021
Change-Id: I65bd7c5ecf75c478d6babeb13e7fb2a76a9842c8
2017-10-17 10:14:50 -05:00
Ed Sanders 8f11796c43 Convert mobile overrides to LESS
Change-Id: I44754f2d6e69ad9a8a6ce941962714a6d2617b5a
2017-10-17 11:46:17 +01:00
Ed Sanders 59955251fe Fix button alignment in MW mobile
Change-Id: I4b29dfef672f48bc6d2b6644b1e0da5a7ada521a
2017-10-17 11:32:58 +01:00
Ed Sanders 169ce28c44 Remove duplication from browser whitelist
The whitelist isn't checked for blacklisted browsers,
so if all non-blacklisted browsers are whitelisted,
set the whitelist definition to all (null).

Change-Id: I8ee3569d9d5be2eda9153f1b087c1be385f93d9c
2017-10-12 16:54:46 +01:00
Ed Sanders 58a226288b requestParsoidData: Support 'wikitext' param in RESTBase-less environment
Change-Id: I6154376be090655d3249ad7e74a0e90b39208a82
2017-10-11 21:26:18 +01:00
Ed Sanders 581847acb3 Show visual diffs in wikitext mode
Bug: T170371
Change-Id: I8fd9ed4f804444ec486c4df72125cdeb04da0d5f
2017-10-11 20:31:39 +01:00
Ed Sanders fc9e0d88f6 Fix WikiEditor mode switcher widget
Broken by upstream CSS changes in OOUI.

Change-Id: I04c51f18624c09fd0030a8b73410a731216dd99c
2017-10-11 18:16:44 +01:00
David Lynch 4e938e58c7 init.mw.Target: make getSurfaceConfig aware of modes
ve.init.Target sets up TriggerListeners based on getSurfaceConfig if there's
no Surface instantiated. As such, loading directly in source mode would have
those listeners present and assuming the document is in visual mode. So, if
there's not a Surface already, we'll assume we're going to get one created
with the defaultMode, and set things up expecting that.

Bug: T153959
Change-Id: Ia0afe32e6b63ea0d3418137ca5c8bc32c009ecfa
2017-10-10 15:14:25 -05:00
James D. Forrester bd2deb3ac4 DesktopArticleTarget.init: Load 'mediawiki.action.view.postEdit' via loader
Bug: T164148
Change-Id: I537144bfd52ff84499f5d086f5d05efe2ba0493b
2017-10-05 15:54:20 -07:00
Ed Sanders 43763f0a75 Target teardown refactor
* Rename 'deactivate' to 'tryDeactivate' as it may prompts
  the user to deactivate.
* Merge 'cancel' and 'teardownSurface' in to 'teardown',
  extending the parent method.
* Rename elementsThatHadOurAccessKey to $saveAccessKeyElements
  and move teardown to parent class where it is setup.
* Move toolbarSaveButton teardown to parent class where it is setup.
* Cleanup changeDocumentTitle

Depends-On: I9d97614695272dca6936ef6f3461178fcf0368a8
Change-Id: Ie998a04c21f6615b4415edf471310db5edca3b5a
2017-10-05 10:26:46 -07:00
jenkins-bot 65ede4fc4f Merge "Use destroy event to teardown new section inputs" 2017-10-05 17:24:57 +00:00
jenkins-bot 5d9c66497a Merge "Use parent #clearSurfaces method to clear surfaces" 2017-10-05 17:22:41 +00:00
jenkins-bot e657612068 Merge "Strip RESTBase IDs from historical diffs" 2017-10-05 16:06:43 +00:00
Ed Sanders 1256b19d72 Use destroy event to teardown new section inputs
Change-Id: I4990a162b62b7195016efba47cc5926b9e3a0f21
2017-10-05 16:20:48 +01:00
Ed Sanders e0f7f30bbd Use parent #clearSurfaces method to clear surfaces
Move mwTocWidget teardown to a destroy event listener.

Change-Id: If96be96aa67da55d3b17dd2565f5e954786ff3ff
2017-10-05 16:03:55 +01:00
Ed Sanders 58237588ad Abort loading when 'escape' is pressed
Bug: T117359
Change-Id: I2c60588f14b9f80b18a7ac8da753fee224be35a4
2017-10-04 14:09:19 +01:00
Ed Sanders ff896e0be6 Always use trackingName for tracking
Change-Id: Ifc7d3275277628b310f5c017c43a76f5a7c25ea7
2017-10-02 22:20:53 +01:00
James D. Forrester 09cde07c45 DesktopArticleTarget: Retain 'mwTarget' stats tracking object
Bug: T177250
Change-Id: I1584f452e16272886af459bac3e24c4995af2231
2017-10-02 21:03:09 +00:00
Bartosz Dziewoński 2b3998df4b ve.init.mw.ArticleTarget: Add 'wpUnicodeCheck' field to wikitext form submission
Bug: T177041
Change-Id: I28a7ec0710595977e5ec889016dd280d60e93034
2017-10-02 17:09:04 +02:00
Bartosz Dziewoński 81d567bfdc ve.init.mw.DesktopArticleTarget: Fix the code to reorder tabs
This code is meant to fix up the tabs if wgVisualEditorTabPosition
was changed and we're seeing cached HTML with the tabs in wrong order.
But it seems it has never worked. `$caEdit[ 0 ].nextSibling` is a text
node and obviously not equal to `$caVeEdit[ 0 ]`, and vice versa for
the other case. The logic is actually correct, so let's fix it to skip
over text nodes.

Also, remove a stray 'eslint-enable' comment left over in
a0f934ed26.

Bug: T50017
Change-Id: I23663a9bfcfdbf52918452c878a128e6960b1191
2017-09-28 15:54:55 +02:00
Bartosz Dziewoński a0f934ed26 ve.init.mw.DesktopArticleTarget: Remove hack for reversed tabs in RTL in Vector
Vector no longer does the silly thing where the tabs are reversed in
the HTML in RTL languages, so we must remove our hack to do the same,
since otherwise it reintroduces the issue it was intended to prevent.

This essentially reverts 2efd4f0061.

Bug: T50017
Change-Id: Ibeaa55bc34899bffab849ea8ad8b127fb5184d43
2017-09-28 07:35:18 +02:00
Ed Sanders 90a9fdb6aa Ensure mw-notification-area doesn't get disabled
Bug: T176874
Change-Id: I43af13a0fcb5c19fdea53cfaeb941ac100579945
2017-09-27 14:50:59 +01:00
Ed Sanders 1b8f8d8908 Replace wg(Relevant)PageName with target#pageName
The default value of target#pageName is wgRelevantPageName
but other targets my override this, or change it dynamically
(e.g. ContentTranslation).

Also remove duplicate setter of pageName in mw.ArticleTarget,
already set in mw.Target.

Change-Id: Iebd1def1d4142978a673afec584a0b663644d176
2017-09-26 13:22:00 +01:00
David Lynch 02c6e9142b Api: Missing preloadparams
* Tiny fix to 33dc60838c for PHP variable name
* Bigger fix to properly pass preloadparams in and split them up

Change-Id: I844db115f2563cb9ee1629c30d5f49d1ce58f5bd
2017-09-25 11:42:09 -05:00
Ed Sanders 9572bbe245 Fix font size in local overlays in monobook
Change-Id: I742c090d64af4e22004e921ab772550474125224
2017-09-21 15:46:26 +01:00
David Lynch 325de4b130 DesktopArticleTarget.init: handle new-section tab when in visual mode
Bug: T157755
Change-Id: Ida657edb57c4d3067f17104ff1b74965c8082131
2017-09-20 15:49:21 +00:00
jenkins-bot 0246c2a62f Merge "Enable preload in VisualEditor" 2017-09-18 19:59:13 +00:00
David Lynch c440a3576f DesktopArticleTarget: Support preloadtitle in source mode
Can't support it in visual mode, since there's no new-section handling at all.

Bug: T51622
Change-Id: I763d5fff156e9ef3893bd882fab1dc2d47121728
2017-09-18 10:18:37 -05:00
David Lynch ea274c94cd Enable preload in VisualEditor
This allows the use of the preload and preloadparams query parameters. They
should behave as they do in the old editor, loading substituted content in
visual and source modes.

Bug: T51622
Change-Id: I522fb5b480d17912f6d6116be6aa043ead855b52
2017-09-15 17:17:51 -05:00
Ed Sanders 405afdce70 Strip RESTBase IDs from historical diffs
Change-Id: I911d529204a97003ed233464709737b018918634
2017-09-14 13:45:10 +01:00
jenkins-bot 779dcc2164 Merge "ArticleTarget: Make save commands triggerable from anywhere" 2017-09-13 15:40:19 +00:00
Ed Sanders f9562838bf ArticleTarget: Make save commands triggerable from anywhere
Change-Id: Iea5b2ff1210b0b28a58017f198f55124c9a3348d
2017-09-13 12:00:19 +00:00
Ed Sanders d515d418c1 Use lowerCamelCase for javascript var oldId
Change-Id: Idd04578a0035320f85dc911a2f4ddbc6f378887f
2017-09-13 12:57:37 +01:00
Ed Sanders ebce67b6ab Remove pageName/revision from ArticleTarget constructor
Other page state is read directly, rather than passed in.
If we come up with a use case for passing this in at a later
date we can reconsider the best way to do this.

Change-Id: Iee7e608c969776b89dbb38b3b56a5177e48344af
2017-09-13 12:57:37 +01:00
Ed Sanders 682787f312 Change ArticleTargetLoader#requestPageData API to use options object
Change-Id: I02e6218a8359b1cbc8fed1a34d68206a2a154d46
2017-09-13 12:57:37 +01:00
jenkins-bot 9ef0f71983 Merge "Stop requiring deprecated EditPage::getCheckboxes()" 2017-09-05 18:00:52 +00:00
jenkins-bot d743fa7c1f Merge "Disable VE on Special:Undelete" 2017-08-31 23:40:41 +00:00
Bartosz Dziewoński df9e564b73 Stop requiring deprecated EditPage::getCheckboxes()
Instead, use getCheckboxesDefinition(), and build our save form
checkboxes from that rather than extracting them from the HTML.

The ability to have non-checkbox fields there is removed, as that was
never intentional and is now impossible.

To avoid transient problems during deployment (old JS code cached in
the user's browser receiving the new format of API responses), the old
property is kept in the API response. We should remove it next week.

Bug: T174613
Bug: T174686
Change-Id: I5bfca5e116fe790302c3b6ac1357e80237fb1ed2
2017-08-31 17:47:15 +02:00
David Lynch dc101c6169 mw.ArticleTarget: strip HTML tags entirely from source-mode summary
Bug: T173711
Change-Id: If8b354b2788285ea27472bf9a16544f8e5c091f8
2017-08-29 12:01:33 -05:00
Ed Sanders 3ba918a6ae Disable VE on Special:Undelete
Bug: T173154
Change-Id: I2a7d815a67c9e0f80ab3cdfd3a3755370c831867
2017-08-25 18:09:37 +01:00
jenkins-bot 842b3336bd Merge "Move historical diff loading to DiffLoader util" 2017-08-24 18:33:45 +00:00
jenkins-bot 8e29c59e44 Merge "Decrease border contrast on selected Vector tabs" 2017-08-22 20:47:22 +00:00
Volker E a2f70cac8b Decrease border contrast on selected Vector tabs
Decreasing border contrast on selected Vector tabs.

Bug: T173465
Change-Id: I46530c8cdf9161e527f421eeb8186a7695057361
2017-08-22 13:28:24 -07:00
Volker E aaffa6aa46 Replace remaining greys/reds with WikimediaUI color palette colors
Replacing remaining greys and reds apart Monobook/Apex specific
stylesheets with WikimediaUI palette colors.

Bug: T173459
Change-Id: I9b5b1c379bf76e8da57eeff28c7dd000f148a8fc
2017-08-16 13:43:02 -07:00
Ed Sanders 3cf074c6ea Move historical diff loading to DiffLoader util
Change-Id: I318752ede2e5c90f9d0ecd26b39e997fff2d60bd
2017-08-13 15:31:42 -04:00
Ed Sanders 1d70266b8b VisualDiff: Store diffmode in query string on diff pages
Change-Id: I092ac68dd31b29b4418e7afb37bfe94befa16558
2017-08-10 11:24:54 -04:00
jenkins-bot 1e474e038e Merge "Support visual diffs on Special:ComparePages" 2017-08-06 11:46:57 +00:00