Commit graph

3188 commits

Author SHA1 Message Date
jenkins-bot 1418002309 Merge "Improve DiscussionTools a/b test bucket logging" 2022-02-12 01:38:32 +00:00
jenkins-bot 802dd69c50 Merge "Check for disabled button in click handler" 2022-02-11 22:26:43 +00:00
Sam Wilson 64d5613172 Check for disabled button in click handler
For some reason, even though jQuery UI dialogs know about their
own buttons, they don't know if the buttons are disabled. This
means that it's still possible to submit the dialog when a button
is disabled.

This change (which is mostly whitespace) adds a check in the click
handler to return early if the 'insert link' button is disabled.
It also gives this button a class name, and so simplifies the other
place that refers to the button.

Bug: T298596
Change-Id: I39fea13b1874f851a68cf08243b3e7ccd355d775
2022-02-11 22:53:13 +01:00
David Lynch 9c478c9290 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: I244381ee9e47bd3119e341cddb42e2ab38add4a8
2022-02-11 15:41:53 -06:00
jenkins-bot 4a1caf3390 Merge "Add 'element' type for toolbar tools" 2022-02-11 21:23:49 +00:00
Sam Wilson 5c9d867847 Remove out of date invalid link alert
The alert text is now added as a red message under the form field
for the link target text, and there's no need to have an additional
alert because the dialog's insert-link button can't be clicked
while there's an invalid internal link anyway.

Bug: T298596
Change-Id: Ib536b51baae24a6cfe7a7426d039fdf11c4cb150
2022-02-11 15:49:12 +08:00
Translation updater bot 8e05e5d8d0 Localisation updates from https://translatewiki.net.
Change-Id: I8d0af9dbc6d5f230e77c125afaeb9594370f1555
2022-02-09 08:13:21 +01:00
Translation updater bot 05eabda0f7 Localisation updates from https://translatewiki.net.
Change-Id: I4ab02239aec3dd1ee6dd4149aa79e22f2e5629a8
2022-02-08 08:29:11 +01:00
jenkins-bot 84f26ccfd2 Merge "Properly disable insert-link button" 2022-02-08 04:21:55 +00:00
Sam Wilson 2d58366710 Add 'element' type for toolbar tools
In addition to button, toggle, and select, add an element type of
tool which can be used to insert any HTML content.

Bug: T286759
Change-Id: Ia193308a076a7eaa010269ea0dd7b707c774561d
2022-02-08 10:33:54 +08:00
Ed Sanders 7fea791042 build: Update eslint-config-wikimedia to 0.21.0
Change-Id: I87bca80d107c965296af74e16961cd855d72b806
2022-02-07 17:27:27 +00:00
Translation updater bot 07f1703a5d Localisation updates from https://translatewiki.net.
Change-Id: Ibc3fbad894f18d0ea73a220951ff43374b38f10d
2022-02-07 08:23:12 +01:00
Reedy 51c3fe42bd Swap to AutoloadNamespaces
Change-Id: I4eb121b4e81b4ec4833ce0bea81ae041abbdacc9
Follows-Up: I0be9b88accafce97f7e9b7524ec740fb576fa11c
2022-02-06 13:55:54 +00:00
Translation updater bot 60a7383e47 Localisation updates from https://translatewiki.net.
Change-Id: Id0b57e3524d6840e5cf91ae137b73216ba27eba7
2022-02-03 08:44:48 +01:00
David Lynch fda6c3c117 New bucket for abtest data
Bug: T291308
Change-Id: I7aa47139e3fe552833798d6b8daacc1b30517915
2022-02-02 15:50:21 -06:00
Translation updater bot 259d826bdc Localisation updates from https://translatewiki.net.
Change-Id: I68fe3156fc2e9631fb24856fd8a169a653aa206e
2022-01-31 08:22:50 +01:00
Translation updater bot 8057a604ba Localisation updates from https://translatewiki.net.
Change-Id: Ibf6cdb0c4f312a9b87a90467164d4d3d9967ce0c
2022-01-27 08:39:35 +01:00
Translation updater bot 4477ceba08 Localisation updates from https://translatewiki.net.
Change-Id: Idc8a9e50aad74b7b823760f6704eee3f50e0379b
2022-01-20 09:18:20 +01:00
Translation updater bot f0de643a18 Localisation updates from https://translatewiki.net.
Change-Id: Iff81b77eeea259df00c0a4b541b70ca2b1d9782b
2022-01-18 08:11:32 +01:00
Translation updater bot e81202a68b Localisation updates from https://translatewiki.net.
Change-Id: I88417d81d97b974aba8591b8e85f4649023599f7
2022-01-17 08:13:22 +01:00
Sam Wilson 739b93310d Properly disable insert-link button
Use jQuery UI's proper button disabling system, rather than trying
to set attributes manually.

Also remove the alert which used to show when trying to insert a
blank link target, as it now has no use. The functionality was
removed in I3541f438fad9b7e0bf23ead2f2e164e84565d254
when the insert-link button was changed to always disable when an invalid
link was being attempted, but the alert was not noticed at that point
(and nor was this disabling bug).

Bug: T298596
Change-Id: I17c454d6ba336abd0b4eeee0d7166fdf81d25734
2022-01-10 15:35:04 +08:00
Translation updater bot c9c494d65e Localisation updates from https://translatewiki.net.
Change-Id: I161bb19905da3c4aef90b7e3ea6d1badbffc9a18
2022-01-04 08:28:28 +01:00
Translation updater bot 2e5791ca32 Localisation updates from https://translatewiki.net.
Change-Id: Idb668ed1e26c89828c05e956e1219a2c2eb0547c
2021-12-27 09:31:20 +01:00
Translation updater bot b5170d1be1 Localisation updates from https://translatewiki.net.
Change-Id: Ia826b11b69a04c7934762ce67cd2175b5144b3b8
2021-12-24 09:10:08 +01:00
Translation updater bot af7eb136db Localisation updates from https://translatewiki.net.
Change-Id: Ie69858660fbfc18856f28a0d4dd728919677ae0e
2021-12-23 08:38:42 +01:00
jenkins-bot 1e95619723 Merge "Set link type radio when confirming looks-like internal" 2021-12-21 19:51:38 +00:00
Translation updater bot c5e00b179c Localisation updates from https://translatewiki.net.
Change-Id: Ie9cc55b345c61ba17ba43011d7151aae9f90cd64
2021-12-20 08:21:54 +01:00
libraryupgrader b47f4d3c57 build: Updating mediawiki/mediawiki-phan-config to 0.11.1
Change-Id: I956a27fd44aad86b10eb76056b88c1e824f91c01
2021-12-19 10:51:56 +00:00
Translation updater bot 4a2e1a7d6b Localisation updates from https://translatewiki.net.
Change-Id: I382b6cb38c267a710e456a07917bebe913fa63a1
2021-12-14 08:43:15 +01:00
jenkins-bot 9a065b82ee Merge "build: Load ConfirmEdit as phan dependency" 2021-12-13 09:48:13 +00:00
Translation updater bot 62bdbd882c Localisation updates from https://translatewiki.net.
Change-Id: I0b9e97877fd03618155c40eb825e42ba6f63ab3a
2021-12-13 08:22:27 +01:00
Translation updater bot ec5acd8e2e Localisation updates from https://translatewiki.net.
Change-Id: I862505b8377c53d797b4fdea2f44bc6e3aea2513
2021-12-10 08:25:18 +01:00
jenkins-bot 0fe853a748 Merge "Move insert-link mode constants to a better location" 2021-12-09 20:13:04 +00:00
Translation updater bot bdb4f1c20a Localisation updates from https://translatewiki.net.
Change-Id: If3b2b87cfb360a4d2e2fdb55be27e0a5820cdd37
2021-12-09 08:23:13 +01:00
jenkins-bot 2df343929c Merge "Fix link-inserter event value when dialog opens" 2021-12-08 22:33:47 +00:00
Translation updater bot 6645b555be Localisation updates from https://translatewiki.net.
Change-Id: I5888be33123bb8eb1947da43c6f0428aa87d171b
2021-12-08 08:13:02 +01:00
Sam Wilson dd1173de39 Set link type radio when confirming looks-like internal
When closing the alert that appears when a link looks like an
internal URL, the link target text was changed but the radio
button was not. This patch rectifies this.

Bug: T295517
Change-Id: Ie0339f3aac8ccfd118c604602ce638539ff67e03
2021-12-08 14:34:11 +08:00
Sam Wilson b8a4fcc998 Fix link-inserter event value when dialog opens
When the insert-link dialog is opened, a change event is manually
fired in order to get the system in sync. This is not optimum,
but until we refactor jquery.wikiEditor.dialogs.config.js it's
a simple way to do it.

The issue was that this manual event was being given an empty string
as the title value, but it should've been the actual current field
value. The reason it's not the same is that when the dialog is
closed with the cancel button, the state of all the fields is not
reset (this is a long-standing design feature of the dialog).

Bug: T293167
Change-Id: I8e2a0a5169b5d2a6d706623dc0c879469acd9afa
2021-12-08 10:00:48 +08:00
jenkins-bot 1072dcc27c Merge "Tag WikiEditor edits with a hidden tag" 2021-12-07 23:58:30 +00:00
Ed Sanders b4f144057e Tag WikiEditor edits with a hidden tag
Bug: T249038
Change-Id: Ia4267bc430ba0f12cce496ebf6f8c1773ae355a6
2021-12-07 23:30:27 +00:00
Sam Wilson b296fc3578 Move insert-link mode constants to a better location
Also capitalize them and don't keep them in an array.

The data values for the radio buttons are also removed, because
they're not used for anything.

This is a follow-up to Ie40e8bdebe6f1330fc75ea1861f120e51ad58224.

Bug: T293168
Change-Id: I2f6de07f6f82e9e59ab67c771fcd60a68ad577dc
2021-12-07 16:39:11 +08:00
jenkins-bot 86f4001ff3 Merge "Prevent external links from showing as invalid" 2021-12-07 06:14:02 +00:00
Sam Wilson d96435cd18 Prevent external links from showing as invalid
* When the link target text is changed, only change the URL mode if the user
  hasn't explicitely set the type (internal/external).
* Improve the conditions for the display of the 'external' and 'exists'
  link-target messages.
* Validate the link target (i.e. show messages) not only when the text is
  changed but also when the target type radio is changed.
* Rename the TitleInputWidget.isExternalLink() method to
  looksLikeExternalLink(), to make its purpose clearer.

Bug: T293168
Change-Id: Ie40e8bdebe6f1330fc75ea1861f120e51ad58224
2021-12-06 15:24:04 +08:00
Translation updater bot 6d9830bf36 Localisation updates from https://translatewiki.net.
Change-Id: I0df722ff6f296f1b59398912a841ed91e2904ab0
2021-12-06 08:20:33 +01:00
Translation updater bot 6be5553f7d Localisation updates from https://translatewiki.net.
Change-Id: Iaeaf739433db99ad359d684864c10c68c08422e5
2021-12-02 08:42:20 +01:00
jenkins-bot fb1fcfd19e Merge "Add new 'secondary' toolbar section" 2021-12-01 22:45:19 +00:00
Translation updater bot 648a9543b6 Localisation updates from https://translatewiki.net.
Change-Id: I14ae56c0c1d6703e7b31d24d682bd75b497be9f7
2021-12-01 08:15:47 +01:00
Sam Wilson 94569125a7 Add new 'secondary' toolbar section
Add a new top-level section to the right side of the toolbar,
containing a single (empty) 'default' group.

Bug: T296447
Change-Id: If88789f20420f02c729122392e16509bbc5ae7d0
2021-12-01 11:19:41 +08:00
Translation updater bot 987e3d1d04 Localisation updates from https://translatewiki.net.
Change-Id: I404f512972cddff9234f1a3a414109d08644a0ff
2021-11-30 08:22:38 +01:00
Sam Wilson 79a0d3040e Disable link-insert button if target is empty
Set the opening state of the insertion button (in the insert-link
dialog) to disabled, and also disable it whenever the target field
is empty. This makes it unneccessary to show an alert when trying
to insert a blank target so that code is removed.

Bug: T293167
Change-Id: I3541f438fad9b7e0bf23ead2f2e164e84565d254
2021-11-26 12:45:48 +08:00