Commit graph

1513 commits

Author SHA1 Message Date
WMDE-Fisch bc45eb242c Improve sub-ref check to avoid false positives
Bug: T376242
Change-Id: If922dbd52ceb9b1a7973fececa2d062a043f8191
2024-10-02 05:53:01 +00: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
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
Translation updater bot 11612e1118
Localisation updates from https://translatewiki.net.
Change-Id: I4b112700fce1172c4568061e0561d6dd5bec03bb
2024-09-24 09:28:39 +02:00
Translation updater bot bcbdbf934b
Localisation updates from https://translatewiki.net.
Change-Id: Ifb7babd567408cf57b2d662fac998e1ceb6214a2
2024-09-23 09:21:04 +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
Translation updater bot 1310475a0e
Localisation updates from https://translatewiki.net.
Change-Id: I25c988a76ffd1c6c7500311f8132a5ab062863a8
2024-09-12 09:17:39 +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
Translation updater bot 5efd7bcaa3
Localisation updates from https://translatewiki.net.
Change-Id: I3cd229480ee45f8e122b3f96e76c580b9199952d
2024-09-10 09:28:45 +02: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
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 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
WMDE-Fisch 1507354f93 Streamlining the MWReferenceEditPanel QUnit test
I could add some simplifications to reduce the complexity of the
tests a bit. I also fixed the test for the change handler. Seems
it did not work that way before.

Also some minor random doc fixes.

Change-Id: If1530a815ea126c38c3a55f3d52e3ca482059840
2024-09-03 14:50:51 +02:00
jenkins-bot 30b5fca6ee Merge "[refactor] InternalList isn't state" 2024-09-03 12:47:12 +00:00
Adam Wight 5f888c98fa Finish safety fallback for missing groups
In a document without references, the default group doesn't exist.
Make sure that we don't assume any group's existence.

Bug: T373661
Change-Id: I1bfd41b0b61938f32219d61142cd576c8ca97ace
2024-09-03 13:37:31 +02:00
Adam Wight aa9af6346a [refactor] Stash calculated group refs
Motivation is to simplify calling code.

Citoid subclass usage is safe across this change.

Change-Id: I24d9cbd58a0e34f6ce659e9a655547a46d5d057d
2024-09-03 12:47:25 +02:00
Adam Wight 65a02eb97b Fixup types
Change-Id: I609f6b4dfb4ebc357b6190571b8779a167a66f4f
2024-09-03 12:46:47 +02:00
Adam Wight ab0f2ea000 [refactor] Finish decoupling search widget from InternalList
Bug: T370875
Change-Id: I6ed43ea3a5b25c2ef5afc373b5a2523a730fd11e
2024-09-03 12:12:01 +02:00
Adam Wight e3398577c1 [refactor] InternalList isn't state
We've almost finished decoupling, and the last remaining usages of
InternalList can be inlined.

Change-Id: I0809df9d3c24fdd5fe4c628420d0406e012a3259
2024-09-03 11:34:47 +02:00
jenkins-bot 4b92287348 Merge "Fix null reference error in 2017 source editor" 2024-09-02 09:23:12 +00:00
Translation updater bot 4141cb91b9
Localisation updates from https://translatewiki.net.
Change-Id: Ic4cbb937827d897220d8b1720af1e2baef1497f7
2024-09-02 09:20:23 +02:00
thiemowmde 581d987b88 Fix null reference error in 2017 source editor
Looking for other references can (as of now) never work in source
mode. There are never other references or reference lists.

Bug: T373661
Change-Id: Icaad4e71a1538c5fad6a0f016b342a7cb7b9db2f
2024-08-30 17:41:17 +02:00
jenkins-bot 617ca08892 Merge "Drop unused, duplicate "this is an extension" message" 2024-08-30 11:20:00 +00:00
jenkins-bot d68f601b25 Merge "Drop unused "Re-use by this name" message" 2024-08-30 11:17:29 +00:00
jenkins-bot e28b4c0d04 Merge "[refactor] Replace InternalList with DocumentReferences in ReferenceEditPanel" 2024-08-30 08:21:32 +00:00
Translation updater bot 210912c199
Localisation updates from https://translatewiki.net.
Change-Id: Id0e6ab2c0668a8ab2aae344e0b0cf3e13a709826
2024-08-30 09:19:51 +02:00
WMDE-Fisch 31dcf2528e [refactor] Replace InternalList with DocumentReferences in ReferenceEditPanel
Change-Id: Icdb7b80f5ca4284fe77c4905b7a9c98659f9c2b4
2024-08-29 23:43:03 +02:00
Raimond Spekking 1882c463f2 Merge "Localisation updates from https://translatewiki.net." 2024-08-29 16:31:16 +00:00
thiemowmde 24915de7d7 Drop unused, duplicate "this is an extension" message
Patch I83434afaf1b76425bddb575dd724f462a247c83d was meant to be a
revert of I3749683d8a18e502bf16e5bd5f2fe385581625be, but left this
unused message behind.

While an unused message is harmless, it's of no use either. Even if
we are going to re-implement something like this again in the future,
we will certainly not be able to use this exact message (mostly
because of T373307). Starting with a new message is much easier then.

Bug: T373564
Change-Id: I241d44639ca7112e8398d095e7aa59cf8e275da1
2024-08-29 16:21:04 +02:00
thiemowmde b5522b705c Drop unused "Re-use by this name" message
This message was added via Icf9ea348cd97bdb09ddf18769f53c01ea5a8b7ef,
merged 2013-06-15.

The code of the ReferenceDialog class was later largely rewritten
and split into two separate "Edit" and "Insert" dialogs.
See Ib244ff6ad9b4cee1decfd9b9e1d3d4e9cdcfb78c, merged 2013-06-28.
Since then the message is unused. The commit message mentions the
related change. The patch just forgot to remove the message.

Note: The two separate dialog classes have been merged back into
the original ReferenceDialog class.
See I8265febf4fd8f64d2ac40470ff033bac68b24d99, merged 2013-07-18.
The message is already unused at this point. This just makes the
Git history extra confusing.

Bug: T373564
Change-Id: Ifb71a243fbdac43d2199ad40d84da14333d42599
2024-08-29 15:57:43 +02:00