Commit graph

18265 commits

Author SHA1 Message Date
Bartosz Dziewoński 661279f7be Update VE core submodule to master (b50ed2975)
New changes:
b50ed2975 Follow-up Ibac94edb: Fix offsets when rebuilding attachedRoot

Bug: T293254
Change-Id: I6beb4bf4e5fab9da140e2541e7c85dad54f92097
2021-10-21 12:00:29 +02:00
Translation updater bot 0a8b462b0f Localisation updates from https://translatewiki.net.
Change-Id: I6d86764d2ccf7359d9fbc0246a0e12cb0659500c
2021-10-21 08:22:55 +02:00
jenkins-bot fed17e94b6 Merge "Give skins/extensions ability to trigger VisualEditor" 2021-10-20 23:45:14 +00:00
jdlrobson d5b3d2bcbe Give skins/extensions ability to trigger VisualEditor
It should be possible for extensions/skins to trigger the click event

It should be possible to do $('#ca-edit').trigger('click') so that
Vector's sticky header can trigger the VisualEditor.

Bug: T293159
Change-Id: I58625ffca982edfbc4cdcb14a666d79093e1b89d
2021-10-20 16:20:02 -07:00
jenkins-bot aaeb144b85 Merge "Update VE core submodule to master (386526a35)" 2021-10-20 18:47:20 +00:00
jenkins-bot 1d6d0b6264 Merge "Change template dialog hotkeys" 2021-10-20 18:35:30 +00:00
jenkins-bot 92df44d952 Merge "Workaround to prevent removing the selected item" 2021-10-20 17:49:49 +00:00
WMDE-Fisch 2f9fe11231 Change template dialog hotkeys
Changed to be less conflicting see investigation in ticket.

Bug: T290262
Change-Id: If2b75cb1dd8bb26c685f8e51beebfa0e6ab6599c
2021-10-20 10:53:44 +02:00
Translation updater bot a0cfdf7cde Localisation updates from https://translatewiki.net.
Change-Id: I67ef6fff8b227267b3553de27840eb0262bc8928
2021-10-20 08:38:09 +02:00
Adam Wight 5a451e0dd8 Workaround to prevent removing the selected item
Removing the selected item causes StackLayout to select (and scroll
to) its first item.  To prevent this, we preemptively unselect.

Note that even when an unselected item is removed, StackLayout still
clears the selection, so this patch doesn't lose any useful
behaviors.

Fix should be pushed down into OOUI, unless there's a use case where
we want to select the first item?

Bug: T293635
Change-Id: I0c1fddfa32b76621a9f1328c8173f0158386aee8
2021-10-20 00:07:18 +02:00
James D. Forrester b9f3073e5a Update VE core submodule to master (386526a35)
New changes:
f233370d6 Localisation updates from https://translatewiki.net.
df49011d1 Give nails a width to 0.1px to allow cursor placement at end of paragraph
386526a35 Never infer a mobile link annotation click from the DM

Bug: T274068
Change-Id: I39fecc036cbb3e11200b687530c74465ccfb121b
2021-10-19 13:16:08 -07:00
Ed Sanders abcd8428fa Fix rendering of render-less templates in preview snippets
The signature of createInvisibleIcon was changed but this
was never updated.

This fixes invisible template renderings inside previews, e.g.
inside the reference context item for:
<ref>{{InvisibleTemplate}} Content</ref>

Change-Id: I3d1b7a177408032957ac3fa8ead813438aa6bda7
2021-10-19 15:32:00 +01:00
Bartosz Dziewoński 9f9f27eb08 Fix unintentional raw HTML message
Change-Id: Ib5d37d4bdc8a36f7b077995d35cea70fb84e4476
2021-10-18 22:37:25 +02:00
jenkins-bot 185d5be1ee Merge "Localisation updates from https://translatewiki.net." 2021-10-18 14:02:23 +00:00
jenkins-bot dfa08be3f5 Merge "Don't close the old sidebar when the add parameter button is pressed" 2021-10-18 14:02:21 +00:00
Translation updater bot 47fa7bc308 Localisation updates from https://translatewiki.net.
Change-Id: I6dcd90a920473f3811d302b21571aca72cbb2fdc
2021-10-18 15:21:43 +02:00
jenkins-bot 99f7acddf7 Merge "Auto hide the sidebar when only a single placeholder is present in narrow mode" 2021-10-15 08:13:41 +00:00
jenkins-bot 2873d4b328 Merge "Fix broken focus when using the add parameter button in the old sidebar" 2021-10-15 08:08:06 +00:00
jenkins-bot 8b2c78222f Merge "Update VE core submodule to master (4373b0a6e)" 2021-10-14 19:18:10 +00:00
jenkins-bot 9521442b04 Merge "Add mobile 'content' class to visual diff" 2021-10-14 19:18:07 +00:00
jenkins-bot c5e6c9f9e1 Merge "Minor documentation fixes" 2021-10-14 19:07:09 +00:00
Bartosz Dziewoński e389e7ebfe Update VE core submodule to master (4373b0a6e)
New changes:
e1ada5fd8 Localisation updates from https://translatewiki.net.
4373b0a6e Create new stacking context for diffElement

Bug: T292491
Change-Id: I0399a57443404e20066c3292b78fe01f6947faf3
2021-10-14 20:48:58 +02:00
jenkins-bot 9d199fb287 Merge "Replace IIFE with block scope in ES6 code" 2021-10-14 17:55:55 +00:00
Ed Sanders 789519012e Add mobile 'content' class to visual diff
Bug: T293392
Change-Id: I7d0d6fee5a50fc2d965ebf0ad20c49dd26c70901
2021-10-14 17:26:03 +01:00
Ed Sanders e1fb20d8be Replace IIFE with block scope in ES6 code
Change-Id: I635f72a62ae44943a7705d28e92c9a0d265800b6
2021-10-14 15:11:45 +01:00
Andrew Kostka bf846d2313 Don't close the old sidebar when the add parameter button is pressed
Change-Id: I635d741a028196d9ad3b68cb26e5eac58b199fe5
2021-10-14 13:59:46 +02:00
Andrew Kostka 18964cdf2c Fix broken focus when using the add parameter button in the old sidebar
Bug: T293203
Change-Id: I9b9658ea05afe9c0d76e0956e8037842f540f74d
2021-10-14 13:43:35 +02:00
Svantje Lilienthal 9b9c6ff492 Remove focus from first input field when clicking on template name in sidebar
Bug: T293250
Change-Id: I017bd9fa5e566762b78e354f9ff94902b2c8968a
2021-10-14 10:25:34 +00:00
Andrew Kostka 0350b742c8 Auto hide the sidebar when only a single placeholder is present in narrow mode
Bug: T293202
Change-Id: I0226ca7d39e04a69617c0d8a5d3c293cfc9e0709
2021-10-14 11:37:23 +02:00
Bartosz Dziewoński 4e2318f2f0 Fix value of 'namespacesWithSubpages' in wgVisualEditorConfig
After filtering the PHP array to only include the ids
of namespaces with subpages enabled, add an array_values()
call so that the ids are again indexed numerically beginning
from 0, which is needed for the array to be passed to the
JavaScript as an array rather than an object.

Bug: T293310
Follow-up: Ia0ecac71721eceed52cc90f39ecc560bdf1b7f9b
Change-Id: I45bb281314caf5da0b7836829eb44f858836566f
2021-10-13 23:50:39 +00:00
jenkins-bot a0eb10487a Merge "Revert "build: Remove max-len over-ride (leave as warning)"" 2021-10-13 18:31:15 +00:00
Bartosz Dziewoński fa629a42a9 Update VE core submodule to master (35412f822)
New changes:
026d0cb4f Localisation updates from https://translatewiki.net.
f16f2179c Never rebuild above the attachedRoot
78bedf8be ElementLinearData tests: Refactor for loops
aed112aa8 Follow-up Ia593dad856: Use set data when changing character in sanitize

Bug: T293254
Change-Id: Ic5d5c1b77ae86eb18ebcb250c4b9c0ed64ccba6d
2021-10-13 20:04:55 +02:00
Ed Sanders 295d139ef1 Minor documentation fixes
Change-Id: I6822c04c8d160431510e62752783e6829950dc36
2021-10-13 14:02:57 +01:00
Esanders aaf27e3901 Revert "build: Remove max-len over-ride (leave as warning)"
This reverts commit 2c75722ff1.

Reason for revert: Creates too much warning spam (>50) which makes
errors hard to spot. Most of these should be fixed before enforcing
the rule.

Change-Id: I8a785ec73d3429d4681d5c965a0efdbf0c86893d
2021-10-13 12:54:46 +00:00
jenkins-bot ebeeed35bb Merge "Remove duplicate load error handling code" 2021-10-12 16:07:07 +00:00
jenkins-bot 48f6436034 Merge "ve.dm.MWExtensionNode: Clarify documentation of 'extensionName'" 2021-10-12 13:52:20 +00:00
Bartosz Dziewoński e603613a7c ve.dm.MWExtensionNode: Clarify documentation of 'extensionName'
Bug: T291900
Change-Id: I70db47747aef7693ade6b8b7ea68e6212f78fe29
2021-10-12 00:16:42 +02:00
Bartosz Dziewoński 33bbd5bcf2 Remove duplicate load error handling code
Load errors are already handled in the MobileFrontend part of the
mobile visual editor, by this code:

66c55573e5/src/mobile.init/editor.js (L375-L387)

    // Wait for the data to load before we show the editor overlay
    overlay.getLoadingPromise().then( function () {
    	...
    }, function ( error, apiResponse ) {
    	// Could not load the editor.
(1) 	overlayManager.router.back();
    	if ( error.show ) {
    		// Probably a blockMessageDrawer returned because the user is blocked.
    		document.body.appendChild( error.$el[ 0 ] );
    		error.show();
    	} else if ( apiResponse ) {
(2) 		mw.notify( editorOptions.api.getErrorMessage( apiResponse ) );
    	} else {
    		mw.notify( mw.msg( 'mobile-frontend-editor-error-loading' ) );
    	}
    } );

Compared to our code:

    ve.init.mw.MobileArticleTarget.prototype.loadFail = function ( code, errorDetails ) {
    	...
(1) 	this.overlay.onExitClick( $.Event() );
(2) 	mw.notify( this.extractErrorMessages( errorDetails ) );
    };

The lines marked with (1) and (2) do basically the same thing. And
the function parameters "error, apiResponse" and "code, errorDetails"
are actually the same objects, just with confusingly different names.

This causes the popup with error message to appears twice (although it
isn't too obvious, since the two popups appear in the same place, so
only one is visible), and also causes bogus data to be sent in event
logging (T237063).

Bug: T237063
Change-Id: I7fe7a944707fe585251ce9e16bbb78ccd123a7ed
2021-10-11 23:20:43 +02:00
jenkins-bot f4571dd956 Merge "Check whether to show the sidebar after adding the parts" 2021-10-11 09:12:18 +00:00
Andrew Kostka 0fa54f2f9e Check whether to show the sidebar after adding the parts
Bug: T292852
Change-Id: I18309164ae4838d9a7aa9fc842012806fbd0c845
2021-10-11 10:50:05 +02:00
libraryupgrader 3dd4b47039 build: Updating npm dependencies
* ansi-regex: 5.0.0 → 5.0.1
  * https://npmjs.com/advisories/1002401 (CVE-2021-3807)
* is-svg: 4.2.1 → 4.3.1
  * https://npmjs.com/advisories/1002911 (CVE-2021-28092)

Additional changes:
* composer.json: Updated phpcs command in composer test (T280592).
* composer.json: Added phpcs command to scripts (T280592).

Change-Id: I03a4d3b8038590812667adc9d33c3b78d0d134df
2021-10-09 12:08:12 +00:00
Bartosz Dziewoński bcfab14fee Update VE core submodule to master (5805b83ba)
New changes:
8161c0a6e Localisation updates from https://translatewiki.net.
c5e396884 Add precision on matching order in ve.dm.ModelRegistry doc comments
82bcc8562 build: Updating ansi-regex to 5.0.1
9b2c9b97a Localisation updates from https://translatewiki.net.
5805b83ba Move eslintrc config into sub-folders

Change-Id: I9baaa2193465a0a852baf0fba59404381d8fe292
2021-10-08 23:46:30 +02:00
Thiemo Kreuz dc85603c0e Remove redundant variable from TransclusionOutlineWidget
Change-Id: I27a890069748d9e689c96fa7c515568fb38e9973
2021-10-08 13:38:44 +02:00
jenkins-bot 871dd4486c Merge "Fix sidebar bottom position when pressing Ctrl+Shift+E" 2021-10-08 11:19:51 +00:00
jenkins-bot 990d5372e9 Merge "Fix first click on parameter page causing bad scroll" 2021-10-08 10:50:15 +00:00
jenkins-bot 5e7eea44f1 Merge "Don't reset narrow screen mode when it's already active" 2021-10-08 08:17:34 +00:00
Translation updater bot 5e4ec274ea Localisation updates from https://translatewiki.net.
Change-Id: I87bbd0cb29e16e0094aad0b3319482ba39a82acb
2021-10-08 09:21:43 +02:00
Thiemo Kreuz 25ee94ee07 Don't reset narrow screen mode when it's already active
Bug: T292693
Change-Id: I39f4655115c6162a0bc7984702bebe28f12563fe
2021-10-08 06:44:12 +00:00
Thiemo Kreuz 893a3d5cf0 Fix sidebar bottom position when pressing Ctrl+Shift+E
This patch fixes two issues:
* The bottom corner of the new sidebar was never correct because of
  a `padding: 2px` that was introduced later, but never compensated
  for.
* The moment the toolbar is shown it's not a single-template dialog
  any more. This implies minor style changes.

Bug: T290262
Bug: T292727
Change-Id: I08da73880c469085994ee4beb3fcdd973f80ae11
2021-10-07 18:46:47 +00:00
jenkins-bot 8e025e4af0 Merge "Skip flaky test for now" 2021-10-07 17:57:14 +00:00