Commit graph

18703 commits

Author SHA1 Message Date
jenkins-bot ba5f31ef8f Merge "DesktopArticleTarget.init: Make getInitialEditMode re-usable" 2022-02-21 13:12:00 +00:00
jenkins-bot 400770088b Merge "build: Update stylelint-config-wikimedia to 0.12.1" 2022-02-21 13:09:17 +00:00
jenkins-bot 2a72f4e290 Merge "Remove not needed self = this indirections" 2022-02-21 12:57:41 +00:00
jenkins-bot e497efca9e Merge "Use .bind() syntax where it makes code more readable" 2022-02-21 12:55:26 +00:00
jenkins-bot 86d01b6c04 Merge "selenium: Wait for VisualEditor to load" 2022-02-21 12:22:52 +00:00
Thiemo Kreuz 3c042049bf Use .bind() syntax where it makes code more readable
This focuses on a few trivial cases where the syntax helps making
the code more readable. One level of indirection is gone with this.

Change-Id: Ibf25d7eaa06952e69b36bd5a78a48d04ac62890c
2022-02-21 10:34:03 +00:00
Thiemo Kreuz 58e27f56d6 Remove not needed self = this indirections
These are only needed when we need to access a specific `this` from
within another `function () {}` context. This is not the case in the
situations here.

This is split from Ibf25d7e to make it smaller and easier to argue
about.

Change-Id: Ide1476de91fc343aa992ad92a1321d3a38b06dd0
2022-02-21 10:52:24 +01:00
Translation updater bot a6ffafb982 Localisation updates from https://translatewiki.net.
Change-Id: Ic09d05200ddc74ef9c26799f019a154292a9a7db
2022-02-21 08:17:15 +01:00
Ed Sanders e21acbe847 build: Update stylelint-config-wikimedia to 0.12.1
Change-Id: I989c038e86610ae2b724b3d9f08c9cd33047bfea
2022-02-20 13:59:31 +00:00
Ed Sanders e4c22ec0d6 Don't suppress teardown prompt when pressing escape
Follow-up to If9e5d1fbf00f8359.

Bug: T302096
Change-Id: I60fcddee7bf0dfb3a39e92d26898da2963861c19
2022-02-18 18:15:40 +00:00
jenkins-bot 0db6720128 Merge "Move methods from DesktopArticleTraget to ArticleTarget" 2022-02-18 18:04:28 +00:00
jenkins-bot d7a33aa9f9 Merge "ApiVisualEditorEdit: Pass useskin & mobileformat to ApiParse" 2022-02-18 18:01:45 +00:00
jenkins-bot a1a518236e Merge "DesktopArticleTarget.init: Only bind event listener once" 2022-02-18 17:52:20 +00:00
Ed Sanders c8072f1af2 Move methods from DesktopArticleTraget to ArticleTarget
To allow them to be used by MobileArticleTarget.

Change-Id: I33e8b3c2361c2dfd0fae8aa41eacf993c93c9c48
2022-02-18 17:04:04 +00:00
Ed Sanders 93a7f33989 ApiVisualEditorEdit: Pass useskin & mobileformat to ApiParse
Passing the useskin parameter ensures that output hooks are run
on the new page HTML. This already happens because we request
the 'subtitle' and 'categorieshtml' props which also trigger
skin mode (along with the 'headhtml' which we don't request).

However it is better for us to be explicit that we want the rendering
for a specific skin, rather than relying on these props to trigger
the correct mode.

Also pass through mobileformat param, which is added by a hook
in MobileFrontend.

Change-Id: I1cd2c5c5c13ae0b90cc32e441b453532343a434a
2022-02-18 16:59:07 +00:00
Translation updater bot acbcc68034 Localisation updates from https://translatewiki.net.
Change-Id: Ida6e604a86787ff6a921377d7abf7c2d17b9fd6b
2022-02-17 08:12:26 +01:00
Ed Sanders c3f88d72c8 DesktopArticleTarget.init: Make getInitialEditMode re-usable
Also let parseSection handle undefined.

Change-Id: I2ec9e7e642d116a555c03af6070f7577ce7030a7
2022-02-16 15:56:24 +00:00
Ed Sanders 88609cb885 DesktopArticleTarget.init: Only bind event listener once
Previously we were adding an event listener every time the
target was opened, and not removing the old ones.

Change-Id: I0ce609f1d9e2d6fb00b605dcade6f27e7a887b9d
2022-02-16 14:41:04 +00:00
Željko Filipin 09668285d6 selenium: Wait for VisualEditor to load
Bug: T296187
Change-Id: Iac98690dd49b6e82062973da05ce30c6f08ba8bc
2022-02-16 14:57:13 +01:00
Translation updater bot d1e6239567 Localisation updates from https://translatewiki.net.
Change-Id: If9fe790be7f6f5735fd85d5af9d07a59391a5103
2022-02-16 08:13:45 +01:00
jenkins-bot d4bfe21e3d Merge "Improve smooth scroll to section behaviour" 2022-02-16 02:39:24 +00:00
jenkins-bot a56ade0a02 Merge "Remove 'Hook' from new hook's method name" 2022-02-15 17:05:19 +00:00
Ed Sanders 8101b6511e Improve smooth scroll to section behaviour
* Append the toolbar before starting the scroll
* If the toolbar is floating set the anchor to full height
  immediately. This shouldn't cause the content to jump down
  due to scroll anchoring:
  (https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-anchor/Guide_to_scroll_anchoring)
  But add our own logic for it for browsers which don't support that.
* Now the browser only has to deal with the scroll animation,
  and not the height animation of the toolbar anchor at the
  same time, making it smoother and less buggy.

Bug: T301773
Change-Id: I61d533d40758d559b03c858e0006ef2e4f0fcd16
2022-02-15 15:23:47 +00:00
Translation updater bot 13ea85af8d Localisation updates from https://translatewiki.net.
Change-Id: Id4878e24f1ef04f63419b7fde98469b67959a009
2022-02-15 08:18:02 +01:00
Ed Sanders 5f8c5144ca Remove 'Hook' from new hook's method name
Only the class name needs the -Hook suffix.

Change-Id: I8c600ddb24a9d3a33ed78501639032d98e1e575f
2022-02-14 23:26:05 +00:00
Bartosz Dziewoński 89842933af Update VE core submodule to master (71a2d651c)
New changes:
1d8fbde1f Prefer the start of a CBN when selecting first visible offset

Bug: T299112
Change-Id: I49f1032905772b27ed8065f7c5b0068a32a15bf1
2022-02-14 22:07:54 +01:00
jenkins-bot b7a0a690fb Merge "Desktop: Always show loading progress in a toolbar placeholder" 2022-02-14 17:00:08 +00:00
jenkins-bot 23e9f189d6 Merge "Smooth scroll the heading to the right place while target is loading" 2022-02-14 16:59:49 +00:00
Ed Sanders 78decedd47 Desktop: Always show loading progress in a toolbar placeholder
Bug: T299907
Change-Id: I0eaeb98719bf7a43e4a87366cfcd204f35b74650
2022-02-14 16:17:48 +00:00
Bartosz Dziewoński 28c9a47164 Hide the edit notices tool earlier if there aren't any
Previously, a toolbar with the extra tool could be shown for a moment
while the editor was loading.

Bug: T301626
Change-Id: I7f5d01ef6e64ef85141a38a236fe2a1d1ada00e8
2022-02-14 15:48:55 +00:00
Bartosz Dziewoński efd1b3ab95 Fix narrow toolbar jumping during loading
When the editor is loading, and the browser window is narrow enough
that we should use the narrow toolbar, the wide toolbar would appear
for a moment. It was particularly jarring when it caused it to wrap
over two lines.

Bug: T301626
Change-Id: I551a66edab40235c4a26751eed163b5b30ef698f
2022-02-14 15:48:46 +00:00
Bartosz Dziewoński 7f79f2a0b4 Update VE core submodule to master (08aae2798)
New changes:
9ee9c8609 Localisation updates from https://translatewiki.net.
43e4c5e0e build: Updating npm dependencies
0b528cd63 Update OOUI to v0.43.1
c8a50eee9 build: Update eslint-config-wikimedia & stylelint-config-wikimedia
328b3d5b6 Localisation updates from https://translatewiki.net.
30591c0d0 Default target: Attach actions toolbar before init

Change-Id: Ifafd7a3453eee554138acca50ec1c49323d4f02d
2022-02-14 16:47:35 +01:00
Translation updater bot 773816af0d Localisation updates from https://translatewiki.net.
Change-Id: I4618643b0bc6e7306f269ded4796d75b0c8de0e4
2022-02-14 08:15:25 +01:00
jenkins-bot 66feffb991 Merge "Misnamed field on a/b test logging" 2022-02-12 20:37:04 +00:00
David Lynch d984bf2246 Misnamed field on a/b test logging
Bug: T301497
Change-Id: Ibbcb23fc3a1d4b89b2cae49fb56901b91be2b3a1
2022-02-11 19:58:36 -06:00
jenkins-bot 924ead5650 Merge "Improve DiscussionTools a/b test bucket logging" 2022-02-12 01:23:57 +00:00
jenkins-bot 6df803a821 Merge "Introduce VisualEditorBeforeEditorHook" 2022-02-12 00:54:15 +00:00
Ed Sanders 38bdb0f87a Smooth scroll the heading to the right place while target is loading
This avoids a sudden scroll jump when the editor finally loads.

Bug: T299773
Change-Id: Ia2d56f7898d8e4c886297807954604ad5a8e8c38
2022-02-11 23:24:00 +00:00
David Lynch 5ccf0324f0 Improve DiscussionTools a/b test bucket logging
Make sure it works on pages which don't trigger DT, such as full-page
wikitext editing.

Bug: T301497
Change-Id: Id3d46eef319f278ee71fbbedbddd16d5ffd540d8
2022-02-11 15:58:25 -06:00
Translation updater bot 7bde7d1712 Localisation updates from https://translatewiki.net.
Change-Id: I1abe1b21247d82264c4dc2f58265b50cddb930df
2022-02-11 08:42:37 +01:00
Ed Sanders fb8815f658 Fix some behaviour when user aborts VE loading with escape
* Pass 'noPrompt' to #tryTeardown
* #loadFail gets triggered by the data promise being aborted,
  so if 'activating' has been cleared at this point, don't
  prompt about there being load error.
* Retry/cancel dialog assumed you were coming from a wikitext
  editor. Rewrite the logic to handle teardown the target if
  the user is coming from read mode.

Change-Id: If9e5d1fbf00f8359f4d06fe7fc3064cc7e349bc9
2022-02-11 00:15:35 +01:00
Translation updater bot b37d95244b Localisation updates from https://translatewiki.net.
Change-Id: If0e230f40c97fc4d61481b99ec1f549d970027b8
2022-02-10 08:42:22 +01:00
jenkins-bot 0ab24602b6 Merge "Modernize some warnings about account not being registered" 2022-02-09 22:05:07 +00:00
Bartosz Dziewoński 8c0a6bce38 Modernize some warnings about account not being registered
Matching MediaWiki change I7a7046bf9b9765cbb82ec3caa1530de7f05e0da4.

Change-Id: I5b2587f00d00622a5e431d0fd69bdf8979b7bc53
2022-02-09 21:26:18 +01:00
jenkins-bot c3bd77c00f Merge "build: Updating npm dependencies" 2022-02-09 15:38:37 +00:00
jenkins-bot 962d95a51f Merge "Add ctrl/cmd backspace hotkey to delete part" 2022-02-09 12:04:25 +00:00
jenkins-bot d21783c363 Merge "Disable hide unused widget when all are selected" 2022-02-09 11:47:47 +00:00
WMDE-Fisch ce230afa09 Disable hide unused widget when all are selected
I bit more logic was needed to make sure, the state of the widget
resets when all unused fields are added during search.

Bug: T299811
Change-Id: I3006c233fda5490e323bc3a3e631bf0c1199bda3
2022-02-09 09:23:14 +00:00
libraryupgrader aa28b52dc9 build: Updating npm dependencies
* eslint-config-wikimedia: 0.21.0 → 0.22.1
* ansi-regex: 5.0.1 → 5.0.1
  * https://github.com/advisories/GHSA-93q8-gq69-wqmw
* meow: 3.7.0 → 3.7.0
  * https://github.com/advisories/GHSA-7p7h-4mm5-852v
* string-width: 4.2.3 → 4.2.3
  * https://github.com/advisories/GHSA-93q8-gq69-wqmw
* strip-ansi: 6.0.1 → 6.0.1
  * https://github.com/advisories/GHSA-93q8-gq69-wqmw
* trim-newlines: 1.0.0 → 1.0.0
  * https://github.com/advisories/GHSA-7p7h-4mm5-852v

Change-Id: Iad400485f197940efd00dfabaddcae805365d116
2022-02-09 07:52:22 +00:00
Translation updater bot cee6e45730 Localisation updates from https://translatewiki.net.
Change-Id: Idaed10586f81902882d6a13dd344c432a4af67bc
2022-02-09 08:13:20 +01:00