Commit graph

5062 commits

Author SHA1 Message Date
WMDE-Fisch c0d98cdd4f Use existing extends warning i18n
Also introducing a line break to make the difference a bit more
clear what's part of the message.

We still probably want parsed content and not only text here.

Bug: T247922
Change-Id: If545ab2fe1d807a6bcbcdfc0c3b7de83817554e6
2024-07-11 13:16:14 +02:00
Adam Wight 08969af51c Make content language data available to VE
We have a use case in which the client needs to be able to use
language utilities in the content language (footnote markers), so the
data must be wired through.  This will only be done in VE, and in the
special case that the interface language != the content language.

Bug: T369613
Change-Id: I2c10e1e36ba594da98e0efa433dd9e1a25aae6fe
2024-07-10 13:41:31 +02:00
thiemowmde 4d8ec5ebc5 Use MainConfigNames constants in tests where possible
I believe this makes the code less brittle, and also makes it a bit
more obvious what these strings are meant to represent.

Change-Id: I0c5cdaa0b94b525ad3e65278ca9bf088f480df40
2024-07-10 12:44:36 +02:00
jenkins-bot e22dc3c08b Merge "Split FootnoteMarkFormatter code into logical pieces" 2024-07-09 08:47:38 +00:00
jenkins-bot 1b5c3f241a Merge "Re-enable linting tests post-sync" 2024-07-08 23:57:40 +00:00
Translation updater bot 81bb451395
Localisation updates from https://translatewiki.net.
Change-Id: I0ae952009d28914848da86ee6b290a41b8cb2686
2024-07-08 09:32:30 +02:00
thiemowmde 36f4ab138d Split FootnoteMarkFormatter code into logical pieces
This is motivated by T367749 where we probably need this code to be
separated. This minor refactoring just moves existing code around
without changing anything. The idea is just to make the concepts more
visible in the code.

Bug: T367749
Change-Id: I765d19fa9cb43a6f8492b707a7ae46ddffe43897
2024-07-07 14:14:39 +00:00
Arlo Breault c44eaf6f96 Re-enable linting tests post-sync
Depends-On: Ibc421e4c2e339133f5f8879517cc22c8ce58c502
Change-Id: Ibaac02cc51787ae3b26a2be23c7d00bcf38ecf5f
2024-07-05 12:58:09 -04:00
Arlo Breault d9351bc0f4 Disable linting tests temporarily for cross repo sync
Change-Id: Ibaef82dc9c72d290c2f92f03cf518b413a77f8ad
2024-07-05 12:55:29 -04:00
jenkins-bot 13474951dd Merge "Additional parser test cases for delayed extends usage" 2024-07-05 11:33:54 +00:00
jenkins-bot 5dc88f01db Merge "Promote orphaned subrefs to the top level" 2024-07-05 11:25:58 +00:00
thiemowmde 1aeac001fe Additional parser test cases for delayed extends usage
We want it to be possible to turn a <ref> into an extended one after
it was re-used for the first time, not knowing if it later turns out
to be an extended ref.

This should work: <ref name=x/> is a short re-use of a ref that later
turns out to be a <ref extends=… name=x>…</ref>.

<ref name=x></ref> is just another syntax that should behave
identical.

However, it should probably not be possible to turn
<ref name=x>foo</ref> into a subref later because it really, really
looks like a normal ref. Even if the content matches with a later
<ref extends=… name=x>foo</ref> and we usually ignore identical
content, I suggest to block this with a dedicated error message. But
this is for a later patch. This patch here just documents the status
quo.

This patch also contains minor code cleanups that will be useful in
Ia752a7d.

Bug: T367749
Change-Id: Ie38769b36e5c476b96e7af7f03b0fc800b32ba97
2024-07-05 13:08:23 +02:00
jenkins-bot 8a6993ccd9 Merge "Use slightly narrower interfaces in a few places" 2024-07-05 10:58:42 +00:00
jenkins-bot 1f4175593b Merge "Display extends warning message when editing a reference" 2024-07-05 10:55:58 +00:00
jenkins-bot 0030cfde68 Merge "Don't update the editors re-use warning when re-using a reference" 2024-07-05 10:55:57 +00:00
jenkins-bot 0122adb8ba Merge "Extract some methods around the reference insert/update workflow" 2024-07-05 10:55:57 +00:00
Adam Wight de7f294f91 Promote orphaned subrefs to the top level
This isn't the ideal solution since it doesn't exactly match the
rendered reader view, but it's a reasonable workaround and an
improvement on "undefined" numbering.

Bug: T247921
Change-Id: Ic0d88123d50e2fcb7f25e897280dbfdb6d494501
2024-07-05 11:46:26 +02:00
Translation updater bot 12c9c1c0e6
Localisation updates from https://translatewiki.net.
Change-Id: I1fb24fb5e14c718ecc0fe2e952dde653d1321aa8
2024-07-05 09:47:23 +02:00
jenkins-bot c5a9012b67 Merge "Replace "shield" hack in MWReferenceResultWidget with CSS" 2024-07-04 07:38:00 +00:00
Translation updater bot b1a4ad72a4
Localisation updates from https://translatewiki.net.
Change-Id: I5e7cc90b15a75387d0f11ac5456eb34a0258c9e2
2024-07-04 09:23:20 +02:00
jenkins-bot de1445d2e3 Merge "Render subrefs indented under parent" 2024-07-03 09:55:58 +00:00
jenkins-bot 30de08bfe9 Merge "[refactor] switch reflist rendering source of truth" 2024-07-03 09:54:52 +00:00
mareikeheuer 2ffbf1fa66 Display extends warning message when editing a reference
MVP implementation for adding a warning when editing a reference
that's the extension of another. In the current approach we're
just using the elements .text() like we do when you create an
extended reference.

Bug: T247922
Change-Id: I2fc574152059937b4aa3fc25ee486d363cc809d5
2024-07-03 07:18:35 +02:00
WMDE-Fisch f317419bb9 Don't update the editors re-use warning when re-using a reference
We only need to set some values that are needed by the `insert`
action triggered that then handles the insertion of the ref.

The form to edit or add a reference will never be visible
in the re-use workflow. No need to update that message then.

Change-Id: I710862bdc1bde6a8ce663d863d721cbf075494f0
2024-07-02 12:30:26 +02:00
WMDE-Fisch b483c829ab Extract some methods around the reference insert/update workflow
Includes renaming the method so it's more clear what it's doing.

As preparation for adding the extends warning to the edit pane and
to allow easier identification of parts belonging to the edit
workflow.

Change-Id: If84c5dbdee19c0ebc0a28b50dda93fef3f558c6e
2024-07-02 12:30:11 +02:00
Adam Wight 2748f659a8 Render subrefs indented under parent
With this patch, we show reflists in a hierarchical view with subrefs
listed under their parent.

TODO in follow-up patch: numbering of subrefs is still incorrect.

Change-Id: Ia82658af72caebd29241b9bd329d236ddc3f1e6d
2024-07-02 09:20:53 +00:00
Adam Wight d03d2d8d20 [refactor] switch reflist rendering source of truth
Pure refactor which shouldn't change output in production.  Switches
to interfacing with MWDocumentReferences to get refs in index order.
Temporarily suppresses any subrefs, we only show top-level refs.

Bug: T247921
Change-Id: I9c8347b064173027f436722c87e15e0381c958bd
2024-07-02 11:20:16 +02:00
WMDE-Fisch ccf3809413 Re-enable disabled ReferencePreviews Qunit test
I could just remove the getElementById replacement that was
failing the tests. In the Popups extension there really is a
renderer test that mocks this function call but that test is not
part of this file.

Also it seems that tracking is never triggered here. I think that
the beacon overwrite was only added to avoid tracking.

See I2638611ba67b785338f7e98a1c4b08a5e829812d

Change-Id: Ic3540f6f73783e79c81e2b693d2bf96cfc7fc66b
2024-07-01 18:32:13 +02:00
jenkins-bot 2957948239 Merge "Display reference preview with sub reference" 2024-07-01 08:52:52 +00:00
Translation updater bot a5f6e58494
Localisation updates from https://translatewiki.net.
Change-Id: I097589649a71f4038b9a94c2beb9df41c80e4f42
2024-07-01 09:24:46 +02:00
mareikeheuer 7380a861f0 Display reference preview with sub reference
Identify both parent and child reference (reference and extended
reference) and display them in the reference preview popup.

This is a very simple basic implementation so at least avoid that
the sub referenc content is shown without context.

Bug: T239228
Change-Id: I857e1be32db9fd72073015cbba1b1bd37e32085f
2024-06-28 14:23:27 +02:00
jenkins-bot d5a4ecd647 Merge "[Cypress] Always provide ref templates to fix Citoid" 2024-06-28 08:11:40 +00:00
jenkins-bot 73acd732e2 Merge "[Cypress] Fix VE save" 2024-06-28 08:11:38 +00:00
Translation updater bot 94ebc6a8f8
Localisation updates from https://translatewiki.net.
Change-Id: I3e0ad8d57b6cd23accc955beb2284b64c57fe3f0
2024-06-28 09:40:54 +02:00
WMDE-Fisch af3f14d430 [Cypress] Always provide ref templates to fix Citoid
The Citoid dialog won't be available when the .json configuration
is missing. That's why test always failed here when triggered
from the Citoid CI.

Bug: T366383
Change-Id: I88ad478250328896c504ccbc95a973d4a0100dd7
2024-06-27 17:05:35 +00:00
WMDE-Fisch 5fcc9dab86 [Cypress] Fix VE save
In some cases the click on the save button did not trigger the
save dialog. After playing around with this, it seems that the
only thing helping here is a little pause.

Even if we wait for the button to change the state to `enabled`
the click sometimes does not trigger the dialog.

Bug: T366383
Change-Id: I2754fd5a0e9b439e9e0378f3597f67e743a6d0c1
2024-06-27 19:01:44 +02:00
WMDE-Fisch bcc109f943 [Cypress] Re-enable skipped backlinks test
I could identify and fix the issue in

I3224c6131a6e959821bc36e4525889e5088777a2

stress test run fine see

I8e38e8cc533065998f91794a9e490d38d77ad21a

Bug: T368267
Change-Id: Ib7db6c39988ef45404817b8c7a68132572f16e36
2024-06-26 11:59:56 +02:00
jenkins-bot a2506818ae Merge "[Cypress] Fix module wait" 2024-06-26 08:27:01 +00:00
Translation updater bot da045950b0
Localisation updates from https://translatewiki.net.
Change-Id: I4cfed8bf3be5afe4bc6ce04c487b21710edb6449
2024-06-26 09:21:04 +02:00
WMDE-Fisch 4f7b5b2d60 [Cypress] Fix module wait
This was never working it seems. The result of the check needs to
be wrapped in an expect() call.

Bug: T368267
Change-Id: I3224c6131a6e959821bc36e4525889e5088777a2
2024-06-26 09:01:31 +02:00
WMDE-Fisch 20c3798055 Fix re-use search activity tracking name
C&P mistake in the original implementation. Otherwise we end up
with an undefined in the name.

Bug: T362347
Change-Id: I5c6957ca9fc81e6a5211aab050025eea5d0addbe
2024-06-25 17:02:04 +02:00
jenkins-bot c5ecb4b9db Merge "cypress: Disable flaky backlinks.cy.js test" 2024-06-25 08:46:58 +00:00
Translation updater bot cedf792f5d
Localisation updates from https://translatewiki.net.
Change-Id: I69657adf08575b9f9d0a0b0a5ed209909df9a90c
2024-06-25 09:29:49 +02:00
Kosta Harlan c51dc6e280
cypress: Disable flaky backlinks.cy.js test
Bug: T368267
Change-Id: I469c5d63d2db09c691b49a83200fcf39e0f2ac4a
2024-06-24 15:23:11 +02:00
thiemowmde ec9c8bda00 Use slightly narrower interfaces in a few places
The idea is to make the code less ambiguous and easier to predict.
We passed the same information around two times in a few places.

Change-Id: I39c7a2962bb70bbe40074986e63b1051d0766ea2
2024-06-24 08:07:19 +00:00
Ed Sanders 66fb3e661a Fix some documentation warnings
Change-Id: I7a97c99a919796f987a05ba17e25357fb5ef14c5
2024-06-21 18:00:45 +01:00
Ed Sanders 61879d1369 build: Update linters
Change-Id: Iacd5cd029101ae514d1ed4c3167bf013ff635108
2024-06-21 18:00:43 +01:00
Ed Sanders 43333cd6b8 Re-enable pointer events in reference preview
This partially reverts I7e82e03ecfe.

Bug: T368119
Change-Id: Ibfd917b2413e306073e1ef4b3e50f06066a7c967
2024-06-21 12:49:53 +01:00
Translation updater bot 31bad90080
Localisation updates from https://translatewiki.net.
Change-Id: Ic417404292dbcdffbbce3e14ed5d22b2a3884511
2024-06-21 09:41:28 +02:00
Adam Wight a2eec914cd [refactor] Split out reflist item rendering
Should be a no-op.

This change is made to prepare for recursively rendering subrefs.

Bug: T247921
Change-Id: Iebf546743c29a4a591ec1f085cc2e1b3496a38fa
2024-06-19 12:29:50 +02:00