Commit graph

4936 commits

Author SHA1 Message Date
jenkins-bot d4f2116ec3 Merge "[Cypress] Streamline page edit and VE Cite setup" 2024-06-04 12:25:39 +00:00
jenkins-bot 6a7a032229 Merge "[Cypress] Move VE helpers to own file" 2024-06-04 12:25:30 +00:00
WMDE-Fisch 90a4bb4ee5 [Cypress] Move a bit more code to helpers
Change-Id: I1191b38d6b92c87da9fd35d4ff118823c97a7c93
2024-06-04 11:14:02 +02:00
WMDE-Fisch 2d2efd8259 Move most ReferencePreviews related i18n messages over to Cite
I'm importing the current keys from the Popups extension without
renaming. After that's done keys can be renamed and we can take
care off the fallback solutions.

Bug: T363156
Change-Id: I788c16c5bddc0df7f00dbbc39625b9adaa5bf184
2024-06-04 10:50:05 +02:00
WMDE-Fisch b4f4dc7fb7 [Cypress] Streamline page edit and VE Cite setup
Change-Id: I4818b662e16f8d70a7d59dcfa29348e9468100df
2024-06-04 07:57:19 +02:00
WMDE-Fisch 1a67a23fbc [Cypress] Move VE helpers to own file
Change-Id: I9e5297f481ba1d70f027e805ed415378d4c8f15c
2024-06-04 07:56:56 +02:00
Ed Sanders cc2105e4a3 MWCitationDialog: Use const instead of let
Change-Id: I4f516505566ade57ede2a5c644f6215c786920c5
2024-06-03 12:31:33 +01:00
Ed Sanders d468e9fd55 Use array spread syntax instead of Array#concat
Change-Id: I38db1d3db51033e99dd55ccc867fb6ad0452640f
2024-06-03 12:31:33 +01:00
Ed Sanders aaeedee289 Remove unnecessary local variable for this
Change-Id: Id71b30552597e052f861de21347d3b4f55debee3
2024-06-03 12:31:33 +01:00
Ed Sanders 5a2154de38 ESLint: Enforce prefer-arrow-callback
Change-Id: I8d96b69e8c15bc8ad84cfb0c511396e5b3e7ac20
2024-06-03 12:31:33 +01:00
WMDE-Fisch d05b738a29 [Cypress] Disable CI Citoid flaky test
I'm still not sure what causes this to fail in CI locally they
are running fine. In the CI it seems from the recordings, that
Citoid is not loaded when these tests are executed.

Bug: T366383
Change-Id: Iee9e4dd04e08fd3ddfa77409d037ec80f84ead3e
2024-06-03 11:50:11 +02:00
Translation updater bot 85fddfb1e4 Localisation updates from https://translatewiki.net.
Change-Id: I067a734c6a89950aa56be3551e9ae3fedc4f9fed
2024-06-03 09:31:09 +02:00
jenkins-bot 477bda1085 Merge "Add 'reference-text' class to Parsoid's HTML" 2024-05-31 21:30:39 +00:00
Subramanya Sastry f38bcde14e Add 'mw-cite-backlink' class to Parsoid's HTML
This patch adds 'mw-cite-backlink' to the linkback span for both
named and unnamed refs. This requires us to add a span wrapper
for the unnamed refs case.

Verified in local testing that this causes aria attributes to be
added to the linkback tags in Parsoid HTML.

This should likely fix other gadgets and code that rely on this
class name to do their work.

Strictly speaking, this is a breaking change since we add an
extra span wrapper for the unnamed ref backlinks which *could*
break anyone using a li > a[rel="mw:referencedBy"] selector.
But, given the specificity of the a[rel] selector, the "li >"
part is unnecessary and might not be used. So, if we wanted to
push our luck (and break process), we could get this in.

Alternatively, we could:
- do this in the the read views OutputTransformPipeline.
- do a real major version bump -- we would be exercising that
  functionality and have to fix and implement any missing pieces
  that may have broke as part of the RESTBase sunsetting.
- not add the span wrapper and fix gadgets to explicitly look for
  both named and unnamed refs with their selectors.

Bug: T328695
Change-Id: Icbd325ebd12cb42186c5b5220dc016835eb18b64
2024-05-31 14:42:04 -05:00
jenkins-bot 56d7dd2496 Merge "[Cypress] Wait for VE modules to load" 2024-05-31 09:43:47 +00:00
WMDE-Fisch 1102102e8f [Cypress] Wait for VE modules to load
This should make sure events are added to the corresponding UI
elements and reduce flaky test results even more.

Change-Id: I2317321912945ef20f8f49405b54fddd65c618d1
2024-05-31 09:18:53 +00:00
Translation updater bot 1d0fde6f7c Localisation updates from https://translatewiki.net.
Change-Id: Iaf4e3913d56029735f5b2ab357b32e5a03362562
2024-05-31 09:56:07 +02:00
C. Scott Ananian 6256b2fc58 Replace book-referencing page property with tracking category
Page property is removed immediately since $wgCiteBookReferencing has
never been enabled in production.

Bug: T239989
Change-Id: I6252fcf1485994244dca40470cc5955e8d4f6917
2024-05-30 07:50:59 +00:00
Subramanya Sastry 50f01c4f28 Add 'reference-text' class to Parsoid's HTML
This adds the 'reference-text' class where Parsoid added
'mw-reference-text'.

If we don't care about the "mw-" prefix, since there are very
few wiki and code references to 'mw-reference-text', it might
seem like we could update all those references and rip out
'mw-reference-text' from Parsoid output.

But, Parsoid HTML is also exposed via the REST API which means
there are likely many users out there analyzing Parsoid HTML.
https://github.com/search?q=%22mw-reference-text%22+NOT+language%3AHTML&type=code
says there are 512 references to this string - so looks like
we are probably going to rely on a major HTML version bump in
Parsoid in the future and then rip out all the duplicate
classes (mw-ref, mw-references, mw-reference-text OR
reference, references, reference-text).

Bug: T328695
Change-Id: I04b18ac75863a0e3e61bdd47b34508e5547dc872
2024-05-28 12:36:49 -05:00
jenkins-bot db6d5c2054 Merge "JSDoc: convert @cfg to @param" 2024-05-28 11:55:23 +00:00
thiemowmde 7981f4d430 JSDoc: convert @cfg to @param
Bug: T138401
Change-Id: I5aec31b9a05b41ceb6a4a78c75cb0395aa1880b7
2024-05-28 10:38:26 +02:00
mareikeheuer 1d729a934d [Cypress] Citoid breaks Cite browser tests
Make e2e tests work under either environment (Cite, Citoid)

Bug: T364382
Change-Id: Ib3b7865b9b6c3b1ae86bc792a659a39be3120bc4
2024-05-27 19:57:37 +02:00
jenkins-bot 4f8e06b97b Merge "Make it possible to disable the "cite_error" wrapper message" 2024-05-27 08:16:04 +00:00
Translation updater bot 891f8d28c1 Localisation updates from https://translatewiki.net.
Change-Id: I187cbc22c890c794cff826db490d3c4e55503258
2024-05-27 09:28:22 +02:00
jenkins-bot fc9a610c2f Merge "Streamline code dealing with (undeployed) extends attribute" 2024-05-24 10:57:03 +00:00
Subramanya Sastry 3151ad5bfa Match minerva base styles for Parsoid
* The Minerva repository has a ".mw-ref" style which is Cite-specific
  so that makes be wonder if the expectation is for this to be in
  that file instead. That would be a really simple fix and be attached
  to the rule for sup as an extra selector.

* But, it seems like Cite extension is the right place for this.

* Found while trying to test Cite rendering with MFE.

Notes:
* This mirrors the style added in
Ieb91c1251839ff4bb54451aae69af9fb88322219


Change-Id: Iae1d391ef11e53110bfb758d45a0fbdf2addf62e
2024-05-23 23:21:15 +00:00
Translation updater bot 59b733969b Localisation updates from https://translatewiki.net.
Change-Id: Iaac4b948ab0596347cba67c87b32cd32e794db84
2024-05-23 09:26:46 +02:00
Translation updater bot 43a4107713 Localisation updates from https://translatewiki.net.
Change-Id: I65a7865849be27a5834d89af41f9f6de3c416e5b
2024-05-22 09:20:06 +02:00
Translation updater bot 422bd03b74 Localisation updates from https://translatewiki.net.
Change-Id: I010fd555406fe85013cb0bc5d2b68bd88589a430
2024-05-21 09:27:42 +02:00
Translation updater bot 158d5de22a Localisation updates from https://translatewiki.net.
Change-Id: I3247ab4266fff82ce65afa2172445e4d35f52ab2
2024-05-20 09:24:45 +02:00
thiemowmde e4728d7d91 A few tiny code cleanups in the ReferenceStack class
Change-Id: I5feeba61da7e45dad1273cc9eb0b7674fa14e3f0
2024-05-16 14:39:03 +02:00
thiemowmde 5841e03e10 Add missing skip instructions to Gadget integration test
Also simplify the @covers annotations while we are here. The class
is really simple. There isn't much that can be covered acidentally.

Change-Id: I105f4ea6d6beb119d1557a32b691e9eda1b8085c
2024-05-16 14:35:53 +02:00
jenkins-bot 44f0010c07 Merge "Separate names for server-side vs. client-side feature flags" 2024-05-16 12:29:42 +00:00
jenkins-bot 41c6dc4a78 Merge "Remove separate private deferDoc property in ve.dm.MWReferenceModel" 2024-05-15 17:44:57 +00:00
Translation updater bot 6d371918ae Localisation updates from https://translatewiki.net.
Change-Id: Ibb9e3a916f9c0be0c6e3ce2c110a0fe4f16c4559
2024-05-14 09:25:37 +02:00
thiemowmde 6c5c2dc6cb Remove separate private deferDoc property in ve.dm.MWReferenceModel
This is a direct follow-up for what I started in I3c9b9bb. Again all
this does is moving existing code around. The separate this.deferDoc
property is never used anywhere:
https://codesearch.wmcloud.org/search/?q=deferDoc&files=%5C.js%24
Instead I store the deferred function directly in the target property
this.doc and resolve it when needed.

Note that the concept of a parentDoc still exists. I tried to make
this as obvious as possible via comments and by arranging the code
accordingly:
1. A lot of code calls setDocument which directly sets this.doc. The
   parentDoc is never used in this case.
2. The parentDoc is only needed to auto-generate the (empty) document
   for the reference when a new reference is created.

That's also why the existing code always calls the constructor with
the parentDoc, even if this ends being unused in many cases: It's a
simple fallback.

Bug: T363096
Change-Id: I7874f187b2b397ed511b695ca9ff95838fcff302
2024-05-13 22:25:06 +02:00
thiemowmde 81f774c789 Don't call things "attrs" that aren't mw.attrs
mw.attrs does have a special meaning in this code. Together with
mw.body it reflects 1:1 what was written in the original wikitext
in the <ref …> and <references …> tags. Let's avoid using the same
(or almost same) variable name for other kinds of attributes.

Bug: T363096
Change-Id: I3e599ab910b9639e121f9b9d532b0f57f08f1e73
2024-05-13 18:37:17 +02:00
jenkins-bot 0c846421b3 Merge "Consolidate duplicate "is reference list empty" code paths" 2024-05-13 13:28:20 +00:00
jenkins-bot f9ba47d7f0 Merge "Drop separate MWReferenceModel.parentDoc property" 2024-05-13 13:01:26 +00:00
Translation updater bot 7bdfae8d60 Localisation updates from https://translatewiki.net.
Change-Id: Ic3c99c584111742d5692b05575753fa929922677
2024-05-13 09:26:42 +02:00
Translation updater bot 06b4fe15ed Localisation updates from https://translatewiki.net.
Change-Id: I9027b5856d1ecc522919fafa355447d4dfb8d3d4
2024-05-10 09:28:23 +02:00
jenkins-bot 82f4a50031 Merge "Temporarily skip tests incompatible with Citoid" 2024-05-07 16:57:49 +00:00
thiemowmde c921c76dd2 Consolidate duplicate "is reference list empty" code paths
Introduce a static method so we don't need to copy paste code.

Note that the static method still largely duplicates what the method
.buildIndex() will later do. Both loops iterate the reference groups
and the references in each group. The main difference is that the
"is empty" check stops extremely early the moment it finds any
non-empty group.

That's also why I'm convinced it's not worth caching the result.
I benchmarked it and it's nanoseconds. But there are more reasons:

The non-static .isIndexEmpty() method is currently only used when
Citoid is active the same time. Which means the cached result was
entirely unused on installations without Citoid.

Bug: T356871
Change-Id: Id5c4295086bc977ef52ad141be9962d2eecb1bcc
2024-05-07 15:51:12 +02:00
jenkins-bot 2349c3ceec Merge "Use OOUI's native "unselect all" feature" 2024-05-07 12:15:20 +00:00
Adam Wight 9699781545 Temporarily skip tests incompatible with Citoid
Cite tests are blocking Citoid patches, by failing in that
environment.

TODO: To be reverted once the incompatibility is resolved.

Bug: T364382
Change-Id: Ie8eeac79966ccb46389e4f9aaa4620e9bd75cc00
2024-05-07 13:37:25 +02:00
WMDE-Fisch 52b9521dc9 Add tracking for VE Cite re-use interaction
Includes a minor drive by cleanup for an obsolete JSDoc block.

Bug: T362347
Change-Id: Ie4a6ebc5a468c0419001b0170c9cc7e13de616ba
2024-05-07 12:47:37 +02:00
Translation updater bot e464b53470 Localisation updates from https://translatewiki.net.
Change-Id: I826992025a712a7e779f00e5d1c99bb333fa996a
2024-05-07 09:22:19 +02:00
Translation updater bot 48a4eb029e Localisation updates from https://translatewiki.net.
Change-Id: I0db6b2fce7293962a8f715ab746c3a8162a75cc1
2024-05-06 09:25:14 +02:00
Translation updater bot fd85662ab7 Localisation updates from https://translatewiki.net.
Change-Id: I80558444c309afb41efef8cbba144bbd16343a20
2024-05-03 09:28:19 +02:00
thiemowmde a531d4d82d Streamline code dealing with (undeployed) extends attribute
No need to create an expensive model here when all we need is a
single attribute.

Note this code is still behind a feature flag and not running
anywhere, except on the beta cluster.

Bug: T247922
Change-Id: Iea48837213b72a8d0f4b3cc9d9688d9a08315509
2024-05-02 17:13:24 +02:00