Commit graph

1526 commits

Author SHA1 Message Date
WMDE-Fisch bcd76a24c4 Allow the ref re-use sub-menu options to wrap
We discovered that the label can be really long depending on the
language. On mobile, where the screen is quite narrow it seems
more useful to let it wrap.

In this context it's even more relevant, because the options you
can choose from might only differ in the last parts of the message.

Bug: T375053
Change-Id: I9ec111ab1b80843f993d605ff11a1702c3d7b37c
2024-10-04 11:11:22 +02:00
Translation updater bot c68496d327
Localisation updates from https://translatewiki.net.
Change-Id: Iad41ac44401b067751ccea59cc120097b8fe774e
2024-10-03 09:16:47 +02:00
Adam Wight 9d665a8521 Hide group selector when editing a subref
Since changing the group will break a subref, we'll hide the field
for now.

TODO: There's more that can be done here: the main ref group
selector could also be hidden, and changing group could be supported
if we change the group on all linked refs.

Bug: T375156
Change-Id: I220850edae58097e09616a4b100878513767deae
2024-10-02 12:17:53 +02:00
jenkins-bot c5539052b9 Merge "Improve sub-ref check to avoid false positives" 2024-10-02 07:36:45 +00:00
Translation updater bot 5f21f8ac57
Localisation updates from https://translatewiki.net.
Change-Id: Idb2909ccc24e834471e10b85b2c52f205720a9a1
2024-10-02 09:23:49 +02:00
WMDE-Fisch d478955777 Improve sub-ref check to avoid false positives
Bug: T376242
Change-Id: If922dbd52ceb9b1a7973fececa2d062a043f8191
2024-10-02 07:52:23 +02:00
WMDE-Fisch 1be72de7bb Clear preview in SetExtendsContentDialog
We add the preview in the Setup step that's called everytime the
dialog is openend. The preview elements will pile up everytime you
load that dialog when adding additional details. So let's remove
the content from the prior call.

Change-Id: I1e0256d566e0979ce71db958b88493ab084de68a
2024-10-01 16:04:31 +02:00
jenkins-bot f953b7ca1b Merge "Add a submenu to offer a re-use with different details" 2024-10-01 12:38:40 +00:00
jenkins-bot 063cee1c34 Merge "Update some messages for the sub-ref use case" 2024-10-01 11:38:14 +00:00
WMDE-Fisch 14d87b1e04 Add a submenu to offer a re-use with different details
Adding a submenu to the results of the reference re-use search.
This allows the user to either create a direct reuse or a reuse with
different details.

Hide the menu when there's a sub-reference.

Known Issues:
- Ref name is hidden (conditionally when our feature is enabled) as a
  quick fix to not having a good layout choice yet.
- Submenu is clipped at the dialog bounds.
- Submenu highlight should vanish when the submenu is closed
- Instrument action with metrics.

Bug: T375053
Change-Id: I3eddd6bad328aaf9bb99eb2783ba66d4e08f862d
2024-10-01 13:26:52 +02:00
WMDE-Fisch 2337844925 Update some messages for the sub-ref use case
Bug: T373876
Change-Id: I2f65e2823de5b25a5e6a5dbce0a32cdbaf617b50
2024-10-01 11:58:24 +02:00
jenkins-bot b7e9910a35 Merge "Localisation updates from https://translatewiki.net." 2024-10-01 07:39:52 +00:00
Translation updater bot 107bf73c63
Localisation updates from https://translatewiki.net.
Change-Id: I6613f0a7e41cdadedbcd5297eda1f3f5b0a44a3b
2024-10-01 09:37:00 +02:00
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
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