Commit graph

5122 commits

Author SHA1 Message Date
Adam Wight e2ea1bcf68 [refactor] reuse dialog handles its children's events
Hide some knowledge from the reference dialog, and prepare the way
for additional events such as "extends".

Bug: T375053
Change-Id: I6097eb85deadcb58d1f56844c65726f19dbf6dda
2024-09-30 11:22:07 +02:00
jenkins-bot 97495c9bf1 Merge "[refactor] Move result items rendering to ReferenceResultWidget" 2024-09-30 08:37:36 +00:00
jenkins-bot 9c4c360ca4 Merge "Consistently use ve.msg() where possible" 2024-09-30 07:47:07 +00:00
Translation updater bot b8f29d80cd
Localisation updates from https://translatewiki.net.
Change-Id: I1b446618511c8c6b8e1ca6e24fff0a92ba1373d9
2024-09-30 09:20:43 +02:00
WMDE-Fisch 73917d493b [refactor] Move result items rendering to ReferenceResultWidget
The exact rendering of each item should be part of the widget.
This also allows a better application of the sub-ref indent.

Bug: T375841
Change-Id: Ic2c24f40d59f41b316c6d6f362726c1ee68f2102
2024-09-29 20:06:02 +02:00
jenkins-bot 805f691188 Merge "Indent subrefs in the reuse search item list" 2024-09-27 21:13:57 +00:00
WMDE-Fisch d9399cb81b Consistently use ve.msg() where possible
Change-Id: I2813ec963b869ea97aaadeb2018475e8dbaabb3e
2024-09-27 22:28:08 +02:00
Adam Wight 324e34fb12 Indent subrefs in the reuse search item list
TODO: This can be merged as-is, since it only affects pages with
subrefs, but it behaves surprisingly when the ref body is long.  In
this case, the text wraps around and flows onto the next lines
unindented.

A full implementation would require deeper changes to the item pane
layout, which is happening in a separate patch.  Recommend merging
this as a quick visual fix and then we come back to the subref+long
content edge case once the pane is easier to adjust layout in.

Bug: T375841
Change-Id: I65510f1550e033e57a3493676d8fc24f628c0600
2024-09-27 13:45:55 +02:00
jenkins-bot a5926502e1 Merge "Adjust messages related to sub-referencing" 2024-09-27 11:32:06 +00:00
jenkins-bot 1fea584fc2 Merge "Cypress: Add test for WT2017 integration" 2024-09-27 08:16:47 +00:00
WMDE-Fisch 72cf12a2de Adjust messages related to sub-referencing
Also adding some margin where it made sense looking at the mocks
in the message document.

Bug: T373876
Change-Id: I1165681521565d900b705a45579fd816fe625a8f
2024-09-26 21:09:56 +02:00
Translation updater bot a506383054
Localisation updates from https://translatewiki.net.
Change-Id: I06dae9c9a48bd840d2ea446de823047e77fa9ffe
2024-09-26 09:19:37 +02:00
jenkins-bot 3b197da578 Merge "Use dependency injection for References/RefProcessor" 2024-09-25 17:18:42 +00:00
Translation updater bot 3177fa6583
Localisation updates from https://translatewiki.net.
Change-Id: Ida19dcc9302674d08e49d58464a898171de008c8
2024-09-25 09:17:14 +02:00
mareikeheuer 326abf110d Cypress: Add test for WT2017 integration
Add e2e test to verify adding a basic ref and a VE-Cite tool template works with the WT2017 editor

TODO: In follow-up work, streamline Cite and Citoid initialization so
that we don't have to `wait` for partially-wired elements to get
their full behavior.

Bug: T373787
Change-Id: Iea41ce8b71e61d2c9868e50ba680d9c9245bb906
2024-09-24 10:19:50 +02:00
Translation updater bot 11612e1118
Localisation updates from https://translatewiki.net.
Change-Id: I4b112700fce1172c4568061e0561d6dd5bec03bb
2024-09-24 09:28:39 +02:00
jenkins-bot 3beada9643 Merge "Move Reference Previews user preference into the Cite extension" 2024-09-23 10:47:16 +00:00
Translation updater bot bcbdbf934b
Localisation updates from https://translatewiki.net.
Change-Id: Ifb7babd567408cf57b2d662fac998e1ceb6214a2
2024-09-23 09:21:04 +02:00
Isabelle Hurbain-Palatin 3a9ba45a7d Converts errors in data-mw to objects
Change-Id: I14930937c1beca039484cffd19e486cd06cbc124
2024-09-20 18:01:45 +02:00
jenkins-bot bc8407e824 Merge "Localisation updates from https://translatewiki.net." 2024-09-20 07:24:57 +00:00
Translation updater bot 3f6cf6108e
Localisation updates from https://translatewiki.net.
Change-Id: Ie766a5c2107e1587e410c6b31c8b1f4fd9383ac4
2024-09-20 09:23:22 +02:00
jenkins-bot c15a34af79 Merge "[refactor] Moving the SetExtendsDialog class from Citoid" 2024-09-20 07:23:01 +00:00
WMDE-Fisch 1ba89ae0b8 Fix c&p leftover in MWReferenceEditPanel
Change-Id: Ia3d1ad5eeb652dd3c3b26d40fca184f1a9d9b805
2024-09-19 11:47:03 +00:00
Adam Wight 8534007aee [bugfix] Guard against out-of-order destruction
For unknown reasons, some of the event handlers in the reflist class
can be called when the model is already partially destroyed.  I
removed some guard logic in I0809df9d3c24fdd5fe which turns out to be
necessary, so I'm adding it here explicitly.

To reproduce the bug, try deleting the reflist in VE.

Bug: T375049
Change-Id: I33e6526cdf535eddaaf8ae506243a5898bd15676
2024-09-18 09:32:24 +02:00
WMDE-Fisch 8a85f5fb05 [refactor] Moving the SetExtendsDialog class from Citoid
First step in streamlining the code to create sub-references.

Slightly renaming the class to fit the schema and avoid conflicts.

Bug: T373849
Change-Id: Iadbdbecbedf4d4aa3f0e0bade88ea020f2570926
2024-09-17 11:41:56 +02:00
jenkins-bot 94d78fa268 Merge "Try to always limit our document references to the current fragment" 2024-09-16 15:00:38 +00:00
Translation updater bot 189aa8f9ab
Localisation updates from https://translatewiki.net.
Change-Id: I132aa602e48eb175d39d0c3f0694af16ad91c033
2024-09-16 09:25:29 +02:00
Translation updater bot bbaf397f3e
Localisation updates from https://translatewiki.net.
Change-Id: I7ec9d0672919ecfd52a9fb6ac34aa2f8c4f9ea6c
2024-09-13 09:17:46 +02:00
C. Scott Ananian 7df30e0651 Use dependency injection for References/RefProcessor
This avoids the use of Parsoid's SiteConfig::getMWConfigValue() method,
which is unnecessary when the extension has direct access to MediaWiki
services itself.

This also fixes the omission of CiteResponsiveReferencesThreshold from
the extension.json.

Change-Id: I01b43136b0827f185523f1318253372b09750de4
2024-09-12 11:57:28 -04:00
Translation updater bot 1310475a0e
Localisation updates from https://translatewiki.net.
Change-Id: I25c988a76ffd1c6c7500311f8132a5ab062863a8
2024-09-12 09:17:39 +02:00
Adam Wight c7b60735fe Move Reference Previews user preference into the Cite extension
This seems to play well with Popups with and without
Ie8fa1672b9fd .  However, it's not clear to me why this still works
and even gives priority to the Popups implementation when present,
regardless of the order the extensions are loaded in.  Happily, this
is the desired behavior.

Bug: T363162
Change-Id: Ic479c0a381ee16d1abcecfdd5ee48f0afccc1d3f
2024-09-10 15:33:50 +02:00
Adam Wight 6ea3a8c696 Try to always limit our document references to the current fragment
Reverses the previous logic which traversed up from a fragment to get
the full document's refs.  Much other code in VE isn't ready for this
behavior, for example we can see list-defined refs but not inline refs
defined outside of the fragment.

This patch will ensure that we're only looking at refs accessible from
the current fragment, and prevents caching on fragments because the
cache uses `persistentStorage`, which is shared between fragments and
their parent document.

Bug: T374068
Change-Id: Ia38098f8b3e5a9d24c2206e11edab37d60209225
2024-09-10 12:26:32 +02:00
jenkins-bot e26e726cb0 Merge "[refactor] Rewrite context as service" 2024-09-10 08:27:05 +00:00
Translation updater bot 5efd7bcaa3
Localisation updates from https://translatewiki.net.
Change-Id: I3cd229480ee45f8e122b3f96e76c580b9199952d
2024-09-10 09:28:45 +02:00
jenkins-bot 334087ee39 Merge "Ignore cypress generated PHP files" 2024-09-10 05:21:49 +00:00
jenkins-bot 6203ab3d13 Merge "VE include subref count in warning message" 2024-09-09 12:09:26 +00:00
jenkins-bot 25b71720a4 Merge "[refactor] Renaming some fields in SearchWidget for clarity" 2024-09-09 07:26:57 +00:00
Translation updater bot d91bf9251a
Localisation updates from https://translatewiki.net.
Change-Id: Ie569a85559b233f8ba4da913df914fd65dc48273
2024-09-09 09:22:11 +02:00
mareikeheuer bdcbcc08f8 VE include subref count in warning message
Include subref count in warning messages in VE editPanel dialog and contextItem

Bug: T373023
Change-Id: Ie7d162c4a2291db441846ec338159e8955c206c2
2024-09-09 09:21:06 +02:00
WMDE-Fisch b5a41a62de [refactor] Renaming some fields in SearchWidget for clarity
Should be a no-op. I checked CodeSearch for other usages but seems
safe so far.

Bug: T370875
Change-Id: I4969e93308735f06be3e344616341c1284157c19
2024-09-09 09:03:11 +02:00
Adam Wight 8e4c83bfc6 [refactor] Rewrite context as service
Puts the ReferencePreviewsContext behind a service to improve
testability.

Bug: T363162
Change-Id: I63aa4144081a2625da1b89f4d56adb612741c8fc
2024-09-06 16:26:20 +02:00
Adam Wight 79be7f0f08 Ignore cypress generated PHP files
Change-Id: I53a673ec969da7feae00b38f67d9de53f18dfa7e
2024-09-06 14:28:29 +02:00
thiemowmde 878a29b727 Add extra safe-guard to ve.ui.MWCitationDialogTool
Note this doesn't fully solve T374068. The issue is probably that the
reuse tab shouldn't be visible in the first place. Still I think this
is a useful safe-guard that cannot hurt. We are doing the same in
almost all other places already.

Bug: T374068
Change-Id: I9b91374dbda74af75d8c36e24ffe5b9448da1aa7
2024-09-05 17:54:50 +02:00
jenkins-bot 2890772a9f Merge "Adding some QUnit tests for MWGroupReferences" 2024-09-04 11:46:11 +00:00
Translation updater bot 1a68933678
Localisation updates from https://translatewiki.net.
Change-Id: Ib0f3a420e937d0b52281b8b691cbfd2493350fb5
2024-09-04 09:16:11 +02:00
WMDE-Fisch f133ad3ead Adding some QUnit tests for MWGroupReferences
Bug: T373854
Change-Id: Ie1ea1016e6e67429b109989bc7995b6dd532f314
2024-09-03 17:00:01 +02:00
jenkins-bot 70277f746d Merge "[refactor] Stash calculated group refs" 2024-09-03 13:48:13 +00:00
jenkins-bot 52dc522cca Merge "Streamlining the MWReferenceEditPanel QUnit test" 2024-09-03 13:19:54 +00:00
jenkins-bot 0f72ad8b05 Merge "[refactor] Finish decoupling search widget from InternalList" 2024-09-03 12:52:26 +00:00
jenkins-bot 45e9e7a328 Merge "Finish safety fallback for missing groups" 2024-09-03 12:52:24 +00:00