Commit graph

1547 commits

Author SHA1 Message Date
Translation updater bot 863565ec3a
Localisation updates from https://translatewiki.net.
Change-Id: I7e97e05098b614eda4d81981f6cb835460fb9fe7
2024-10-10 09:21:23 +02:00
jenkins-bot 05df48daa4 Merge "Prepare the ReferenceDialog to be opend for creating a sub-ref" 2024-10-09 20:06:17 +00:00
jenkins-bot 91bf6c9efd Merge "Use the default edit dialog to create a sub-ref" 2024-10-09 20:02:08 +00:00
jenkins-bot 72dd9f74ca Merge "[refactor] Don't setup the edit panel when re-using a ref" 2024-10-09 20:00:38 +00:00
jenkins-bot 3beb678313 Merge "Separate sub-ref content from main content in ContextItem" 2024-10-09 19:29:54 +00:00
WMDE-Fisch a776b8d753 Prepare the ReferenceDialog to be opend for creating a sub-ref
The ReferenceDialog can be used to insert a new sub-ref and set
the additional details for that. Here I'm creating an entry point
for that workflow.

Bug: T375156
Change-Id: I47db21cd44d19ff209f9d5fa736bd6a057b983f2
2024-10-09 11:00:25 +02:00
jenkins-bot 160b0d05d8 Merge "Use - instead of _ in LESS file names as language code" 2024-10-07 13:06:40 +00:00
Translation updater bot c5607f0205
Localisation updates from https://translatewiki.net.
Change-Id: I454feb21a27b51dd1f4ca202b7798871dfcea45c
2024-10-07 09:25:17 +02:00
WMDE-Fisch 39679be927 Use the default edit dialog to create a sub-ref
There's no need to open another dialog to set the additional
details when creating a sub-reference. We can just use the edit
panel that's already added to the ReferenceDialog.

In the edit panel I assume that whenever it is loaded with a
reference that uses the extends attribute and has no content
then the panel is used to create a sub-ref.

Note: SetExtendsContentDialog is still used for the Citoid flow.

Bug: T375156
Change-Id: I8cb3663f2f45a807b1d00f543ae13e8c5f53c6d8
2024-10-06 20:34:29 +02:00
WMDE-Fisch 60eb760dd8 [refactor] Don't setup the edit panel when re-using a ref
In the setup process the dialog is loaded and initialized. For the
case where the user opens this dialog to directly re-use a
reference, it does not make sense to fill out the form or create
the internal ref model. The edit panel is not used then.

This method might also be an entry point to create a new sub-ref
when triggered from e.g. Citoid. Switching to the re-use panel
still would not require to setup the edit panel.

I'm also moving a setup for the abilities, that's only relevant
in the edit case.

Bug: T375156
Change-Id: I061b88abc6cfd702a53208bac76be7a2ed6812c2
2024-10-06 17:34:39 +02:00
jenkins-bot 442ba0bf6b Merge "Update JSDocs related to the reference re-use dialog" 2024-10-04 11:56:43 +00:00
jenkins-bot 3591e4f14d Merge "Allow the ref re-use sub-menu options to wrap" 2024-10-04 11:50:23 +00:00
jenkins-bot 281b5765f6 Merge "Remove misplaced tooltip on ellipsis in citation dialog" 2024-10-04 09:40:04 +00:00
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
thiemowmde 9ceabba9fe Update JSDocs related to the reference re-use dialog
Bug: T375053
Change-Id: I69a5caa8de730328ce4b5e2f92d9e04dcc576b6d
2024-10-04 11:08:58 +02:00
jenkins-bot 990ea23797 Merge "Extend height of the SetExtendsContent dialog" 2024-10-04 09:02:08 +00:00
WMDE-Fisch d1451ac6db Extend height of the SetExtendsContent dialog
I mock something similar to what's done in the ReferenceDialog,
just to improve the situation for now.

Change-Id: Ie3a1facf79a1920fe282a023b2ac33165d62f117
2024-10-04 08:27:37 +00:00
Fomafix 656b00134e Use - instead of _ in LESS file names as language code
Change-Id: Ifcd6d8f927a651d13e8a01ac3995210292551bc8
2024-10-04 08:25:49 +00:00
thiemowmde 44aefe2a6e Remove misplaced tooltip on ellipsis in citation dialog
We want the tooltip on the entire search result item, but not on
the button. The button probably needs a dedicated tooltip. To be
discussed. Let's start with removing the wrong tooltip.

Bug: T375053
Change-Id: I69da1f3cf80cf94342498a30b47acac8412d08ca
2024-10-04 10:16:23 +02:00
WMDE-Fisch c517172ecb Position the re-use sub-menu under its button
When the reference to re-use has a lot of content the button element
of the sub-menu expands over the whole height of the result widget.

The expanded sub-menu will always be positioned at the end of the
button element, that's why it was always added to the end of the
result widget and not the visible button.

Makeing sure that the element of the button is not larger than the
visible outlines fixes that problem.

Bug: T375053
Change-Id: I3c16aeae37c3774808544b03c7e6e52762e6d145
2024-10-04 10:05:18 +02:00
Translation updater bot 81c0036b91
Localisation updates from https://translatewiki.net.
Change-Id: I44fa8923a7ae6e0283121395f649b8572e95dadd
2024-10-04 09:21:17 +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
WMDE-Fisch c40dc94c37 Separate sub-ref content from main content in ContextItem
Bug: T376131
Change-Id: I859298746cf85b75cc27192c1e1c9c136312beea
2024-10-01 13:59:32 +02: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