Commit graph

3166 commits

Author SHA1 Message Date
WMDE-Fisch 82718bf70a Remove feedback message link
The testing phase for the implemented features is finished. So the
feedback link for the project can be removed.

Also added missing documentation for a message key used.

Bug: T307188
Change-Id: I2e2e4ff58d2bacda5ae841bcf6f418e786a3967e
2022-06-15 12:37:14 +00:00
Adam Wight 1b4c81c27d Remove $wgVisualEditorTransclusionDialogInlineDescriptions feature flag
The feature is always enabled now.

Bug: T307188
Change-Id: Id8b39d44901dee9118837fc4670d7faa4ef19b43
2022-06-15 12:09:47 +02:00
jenkins-bot 9026cf60db Merge "Restore internal mechanism to use either back or close button" 2022-06-15 09:35:06 +00:00
jenkins-bot 59ad19d20c Merge "Minor performance improvement for collapsible template docs" 2022-06-15 09:23:42 +00:00
Adam Wight f7050a2bac Restore internal mechanism to use either back or close button
For some use cases of the transclusion dialog such as Insert
Citation, the back button is inappropriate and we want to keep the
close box.

This partially reverts commit 2e2e40e76e.

Bug: T310602
Change-Id: If68a822c260618c0a93eb8d0c46d2b452fee8baa
2022-06-15 11:09:50 +02:00
jenkins-bot 6a7da15fe5 Merge "Support the upcoming mw:File typeof" 2022-06-14 15:25:11 +00:00
Thiemo Kreuz 224e73d91b Minor performance improvement for collapsible template docs
I benchmarked the template dialog before and after the change made in
I0f35a19 with a large 200 part multi-part template. I measured only
the time spend in .updateSize().
Before I0f35a19: 3.6s
After: 4.6s
With this small fix here: 3.6s

Bug: T309875
Change-Id: I2c2892e173ba70c746fb71624c65b7f4ffde4419
2022-06-14 16:04:27 +02:00
jenkins-bot 1d8fb68669 Merge "Remove $wgVisualEditorTemplateSearchImprovements feature flag" 2022-06-14 12:41:09 +00:00
jenkins-bot 5b01b11724 Merge "Fixing positioning of more/less button on window resize" 2022-06-14 09:25:16 +00:00
Adam Wight e1ea921f76 Remove $wgVisualEditorTemplateSearchImprovements feature flag
The feature is always enabled now.

Bug: T307188
Change-Id: I34a3db44355d93413f611b99cd80b876d8737413
2022-06-14 10:48:19 +02:00
jenkins-bot cbeb7da3b9 Merge "Clean-up users storage after search message removal" 2022-06-14 07:17:08 +00:00
WMDE-Fisch 13f5637290 Clean-up users storage after search message removal
I'm more in favor of leaving no garbage behind. The TODO with a date
is a good way of making sure this gets removed eventually.

This could have been part of Ie6eea76. The new code is added to the
same spot where the code removed in Ie6eea76 originally was.

Bug: T296471
Depends-On: Ie6eea76dacdc614ecb910c48e7e1f519b8c69322
Change-Id: Idec63201ff4aa52a0c53c6d007577a93c94e0ec0
2022-06-14 06:59:46 +00:00
Svantje Lilienthal 311d26c9d4 Fixing positioning of more/less button on window resize
Bug: T309875
Change-Id: I0f35a191b39b1385a9e9f8ce77de3f033c420c55
2022-06-13 14:55:37 +02:00
jenkins-bot b99ed46e1b Merge "Improve test coverage of template dialog outline" 2022-06-13 12:24:01 +00:00
jenkins-bot fcf849ddb0 Merge "Remove $wgVisualEditorTransclusionDialogBackButton feature flag" 2022-06-13 08:12:40 +00:00
jenkins-bot 682b405cf6 Merge "Remove $wgVisualEditorTransclusionDialogSuggestedValues feature flag" 2022-06-13 08:00:50 +00:00
Arlo Breault 0533f49fd5 Support the upcoming mw:File typeof
The "mediaClass" property now only serves to capture the original class
found on the media so that it can be roundtripped without causing dirty
diffs.  In the 2.4.0 version of Parsoid's output, that will still be
the usual Image/Audio/Video.  As of 2.5.0, it will always be File and
the mediaClass property can be dropped.

Parsoid is currently forward compatible with serializing mw:File, so
edited or new media can use that type already.

The contextmenu item for media has been updated to make use of the
"mediaTag" instead of mediaClass to continue distinguishing media types.
That was the only place a grep of mediaClass turned up any use.

Bug: T273505
Change-Id: If5dc6b794dacd6973d3b2093e6b385591b91d539
2022-06-10 14:29:31 -04:00
Adam Wight 2e2e40e76e Remove $wgVisualEditorTransclusionDialogBackButton feature flag
Feature is always enabled now.

Bug: T307188
Change-Id: I70305ec3d2ed9cfb767ee9ea90e8ed6c93cfbdbb
2022-06-10 17:33:56 +02:00
Adam Wight 23f0bdf822 Remove $wgVisualEditorTransclusionDialogSuggestedValues feature flag
Feature is always enabled now.

Bug: T307188
Change-Id: I6f8288d31fecc6827a7a9e5e9705239e15c86ae2
2022-06-10 16:40:06 +02:00
Svantje Lilienthal 6072c46ffc Tighten spacing in VE template dialog
Bug: T308646
Change-Id: Ic785838d76dfbe2f8b776e67ccccf47fca717205
2022-06-10 14:08:56 +00:00
jenkins-bot 03a2523501 Merge "Show all elements when expanding a collapsible description" 2022-06-10 13:46:38 +00:00
Svantje Lilienthal 58fd0531d9 Remove updated feature message about search
Bug: T296471
Change-Id: Ie6eea76dacdc614ecb910c48e7e1f519b8c69322
2022-06-10 13:13:51 +00:00
Andrew Kostka c8ad755112 Show all elements when expanding a collapsible description
Bug: T309875
Change-Id: If69b8bcf5574210fbc5c0b533a18977e05d7b5a4
2022-06-09 12:38:26 +02:00
Bartosz Dziewoński 6869bc90fd ve.ui.MWLinkAnnotationInspector: Prevent long sitenames from messing up the layout
Bug: T309443
Change-Id: Ia9e9dacb7f293e2529e8d0766e1117a61e34b3e5
2022-06-01 23:34:19 +02:00
Andrew Kostka efa0e3ae9a Make collapsible descriptions more responsive
Bug: T307986
Change-Id: Ib28ec5a5c73fab8eb2b10ed6153a30028c3505cb
2022-05-27 16:10:00 +02:00
jenkins-bot 7276bf57cf Merge "GalleryImageNode: Handle broken images" 2022-05-24 01:40:01 +00:00
jenkins-bot 767d1e403b Merge "GalleryDialog: Use correct src attribute when rebuilding DOM" 2022-05-24 01:39:59 +00:00
Ed Sanders 5d060c34cc GalleryImageNode: Handle broken images
Most of this logic copied from MWBlockImageNode.

Change-Id: I92c860c53741c5ee48c8bce216987d97a92bc05f
2022-05-23 15:29:42 +01:00
Ed Sanders da8de2e509 GalleryDialog: Use correct src attribute when rebuilding DOM
This avoids a meaningless attirbute change with the image
is unmodified (as thumbUrl can be a different size).

Change-Id: Ib79a4703382552e38022a3f345ca5cd762c52303
2022-05-23 14:55:12 +01:00
jenkins-bot b6e398fd85 Merge "Improve collapsible descriptions for smaller screens" 2022-05-23 10:27:27 +00:00
jenkins-bot ee0f823f25 Merge "Fix non-collapsible parameter descriptions on smaller screens" 2022-05-23 10:27:24 +00:00
Ed Sanders fb1ed9e700 MWGalleryImageNode: Avoid converting altText from null to ''
Bug: T308747
Change-Id: Icd811a6baaa2213d8615bdcb3690d26aa35ab302
2022-05-21 04:09:41 +02:00
Andrew Kostka 46846d1b01 Improve collapsible descriptions for smaller screens
Bug: T307986
Change-Id: Iac6205fc90a884965c2e37cf6ed4b403874256d8
2022-05-19 12:39:20 +02:00
Andrew Kostka 0c176752eb Fix non-collapsible parameter descriptions on smaller screens
This patch fixes a bug which causes long parameter descriptions to
be to non-collapsible when adding them from the sidebar-only view on
smaller screens.

Change-Id: If373587a9b2c3841ad6814f74bfcbf0c0f013488
2022-05-19 12:26:30 +02:00
Thiemo Kreuz aa989c00dd Extract MWExpandableContentElement.onButtonClick method
This is done in preparation for Iac6205f to make it easier to review.
This patch here is meant to be a no-op that doesn't change anything,
just moves existing code around.

Bug: T307986
Change-Id: Ie6ccd9528e5799ba340fed344e1f47a443c2c51f
2022-05-16 12:43:10 +02:00
Andrew Kostka dda7d8e9c1 Hide the floating help button on small screens
Bug: T307981
Change-Id: I7c1776f95f22e9c81b559f25ad97616d2f1a8dc2
2022-05-12 06:32:16 +02:00
Thiemo Kreuz 53b169ab43 Update CSS to force word wrap in unused parameters button
Follow-up for what was done in I37505af. I don't fully understand why
these two extras are sometimes needed and sometimes not. But this exact
combination of 3 properties is used in multiple places already, so
let's just do the same here.

Bug: T300008
Change-Id: I1eba5fc378475d365111add58a141c3114dc0118
2022-05-10 10:20:44 +02:00
Ed Sanders ab3b068671 build: Update stylelint-config-wikimedia to 0.13.0
Change-Id: I94a18ebc57ea04fe6246b63f6c9b5d5d8718dd4d
2022-05-04 22:54:48 +01:00
Ed Sanders bc57422841 Remove unused CSS vendor prefixes
Change-Id: Id544adce0d88123157f3f52540f7f767027ff6ab
2022-05-04 16:55:43 +01:00
Thiemo Kreuz 9297428eca Improve test coverage of template dialog outline
This focuses on some scenarios that are
a) complex enough to be worth a test,
b) but simple enough so I don't need to spend hours on comming up
   with a test setup. ;-)

This patch also simplifies the ARIA related code in
MWTransclusionOutlinePartWidget a bit.
* Check 1 of the 3 ARIA configs only. Only having one is already
  helpful and should not be skipped.
* No need for the large conditional. setAriaDescribedBy() works fine
  with undefined.

Bug: T291157
Change-Id: I142782ec9b96147de64497f4f6a373eae05b9c8e
2022-05-04 12:01:58 +02:00
jenkins-bot 0e77a51898 Merge "Stop hide unused label from overflowing" 2022-04-29 08:45:20 +00:00
WMDE-Fisch 4377893297 Stop hide unused label from overflowing
Will implicitly set a max width for the button due to the margin.
Long words will break in the middle of the word.

Also includes a shorter label.

Bug: T300008
Change-Id: I37505af8383d8c0c2bd4af3987ec5e2a3049688a
2022-04-29 10:26:20 +02:00
WMDE-Fisch d996288169 Move message about missing parameters to sidebar
Will be removed when parameters are added. Needs different margins
depending on beeing shown in the single transclusion mode without
header or on multiple transclusions.

Bug: T300710
Change-Id: Ieb95d7276aa4d4b0fcbb74f87ab734e4a393dc21
2022-04-29 10:03:23 +02:00
Thiemo Kreuz 8831887e3c Update template search fallback to max out at 10
Before, the fallback algorithm was somewhat adaptive, trying harder and
harder the fewer CirrusSearch results have been found. This updated
algorithm guarantees that 10 results are shown.

Warning: You might see only 9 results. The reason is a bogus, unrelated
behavior in the mw.widgets.TitleWidget in core that's used as a base
class here. There is a "showMissing" option that's apparently enabled
by default, and prepends a non-existing title from the main namespace,
ignoring the "namespace" option. This extra result from the wrong
namespace is later dropped by the very same widget.

This code here sees 10 results before the bogus one is dropped.
Disabling "showMissing" causes other issues. We would need a series (?)
of custom hacks to work around all this, but this seems inappropriate.
Let's live with 9 for the moment.

Bug: T303524
Change-Id: I2c577c9ef2752b6c6cd360f4023e151e9272fcd5
2022-04-21 09:25:00 +00:00
Thiemo Kreuz 50497ee7f3 Drop assumption that all template search index start at 1
The main advantage of this change is that it drops the assumption
that the index starts with 1. This is not necessarily the case when
we prepend extra search results. Dropping this assumption here allows
to simplify such code.

* The incoming list of pages is guaranteed to be an array.
* There is no point (any more) that could cause the array to become
  sparse.
* Note we still make a copy of the `origPages` array at some point,
  e.g. on `.filter()`.

Bug: T303524
Change-Id: Ifbd92bb052155c613d2ca21ab6d54a0b3ef28c0c
2022-04-21 11:23:48 +02:00
Thiemo Kreuz 89e5c2fb92 Disable useless "showMissing" option in TemplateTitleInputWidget
This option is not only buggy (it just doesn't work when the namespace
option is set the same time), it is not useful in this context even
if it would work. It doesn't make much sense to suggest non-existing
templates in the context of the template dialog. If adding a
non-existing template really is what the user wants, they can still do
this by simply typing the name of the template and submitting the form.
We never need this to show up in the suggester below the input field.

The main advantage of this change is that is saves 1 useless API
request that's potentially done every time a key is pressed.

Bug: T303524
Change-Id: I903340a06d6e6490bb58f628f41903aa044ccb21
2022-04-20 14:43:29 +00:00
Thiemo Kreuz d3d3e1cf75 Move "index from redirect" logic up in template search widget
This separates the two steps:
1. See if items in the list of `origPages` miss their `.index`
   property, and add it if possible.
2. Later code doesn't need to care about redirects any more.

Note that `origPages` is not used for anything else. And even if,
it's not wrong to have the index for each search result on both the
redirect and the redirect target.

Change-Id: I12135f0430c944b4e33c49ece7779d7c3bb6c211
2022-04-20 14:50:36 +02:00
Thiemo Kreuz e24c8ecd2d Fix misleading variable name in TemplateTitleInputWidget
This is not a pageid, but a simple numeric index in an array. Luckily
it doesn't make a practical difference for this particluar way of
iterating something.

Change-Id: I7ec9ace00d4fba7adde17670058a0365b30f5617
2022-04-19 14:40:00 +00:00
Thiemo Kreuz af2779fc06 Fix API response default in TemplateTitleInputWidget
The result is guaranteed to be in formatversion=2, where the list of
pages is an array, not an object.

Change-Id: Ic73a68c3e249a70108a6a19a89f4ff6c475794ed
2022-04-19 13:35:27 +02:00
jenkins-bot 616fa37de4 Merge "Fill template search results with prefix matches when Cirrus fails" 2022-04-08 11:57:23 +00:00