Commit graph

17783 commits

Author SHA1 Message Date
Andrew Kostka 0d4dee341b Hide deprecated parameters if they don't have a value
Bug: T274551
Change-Id: I6bfceae2579a5bcedae9da7eb5326fe8f60ea7c0
2021-07-22 12:24:57 +02:00
Translation updater bot 8eeaabd05d Localisation updates from https://translatewiki.net.
Change-Id: I467f78f1a03418f3d9e8d6b11cbdb4b901645775
2021-07-22 08:13:42 +02:00
libraryupgrader 30b68f3a74 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0

npm:
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* glob-parent: 5.1.1 → 5.1.2
  * https://npmjs.com/advisories/1751 (CVE-2020-28469)
* trim-newlines: 1.0.0 → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)

Change-Id: Ia15aa76cb4abbfe42215532edf52b08c75f72034
2021-07-21 19:56:36 +00:00
jenkins-bot d37cde0de0 Merge "Dynamically set the visibility of the sidebar search" 2021-07-21 12:41:26 +00:00
jenkins-bot 3d80b759b4 Merge "Don't reset the sidebar search field if the search widget is undefined" 2021-07-21 11:30:29 +00:00
Translation updater bot adfe5c7c70 Localisation updates from https://translatewiki.net.
Change-Id: I54a7dbf2157568e6d16ba5b6003a3ea28bc42da3
2021-07-21 08:06:04 +02:00
Andrew Kostka ef33a908a0 Dynamically set the visibility of the sidebar search
With this users can also filter undocumented parameters
that they added to an empty starting template.

Bug: T272481
Change-Id: I99adb38b0ae4d4ade91fcb506f10c0222b9bb5e8
2021-07-20 13:11:08 +02:00
Andrew Kostka 6cec42f8dc Don't reset the sidebar search field if the search widget is undefined
Bug: T286987
Change-Id: I66116ea08d4682e179e9eb70d117454194e3517d
2021-07-20 12:08:00 +02:00
Translation updater bot 951f025b1d Localisation updates from https://translatewiki.net.
Change-Id: I2fab4aa94b253d84a3dbb89562efdcec5aec537d
2021-07-20 08:21:12 +02:00
Bartosz Dziewoński 12c7084b46 Update VE core submodule to master (b54bff109)
New changes:
6cbd167ab Localisation updates from https://translatewiki.net.
74ebef479 Localisation updates from https://translatewiki.net.
599e63855 Localisation updates from https://translatewiki.net.
42666fbef Typo fix: "the the" -> "the"
b54bff109 Localisation updates from https://translatewiki.net.

Bug: T201491
Change-Id: Ia5fe3a1f0e21ff95224f35b0eb75eb21a6d4cba5
2021-07-19 23:49:40 +02:00
Translation updater bot cd9b0ccc0d Localisation updates from https://translatewiki.net.
Change-Id: I6982972fc6fe4314a30f0c2720963b016e2cdd20
2021-07-19 08:16:43 +02:00
Andrew Kostka d44bc19d20 Adjust the styling for the template parameter search
Bug: T272481
Change-Id: Ie1c6b95cf32640401cb2a17bcda656a40a22e9b4
2021-07-16 18:03:48 +02:00
jenkins-bot d738698deb Merge "Fix incomplete back button implementation in template dialog" 2021-07-16 14:41:07 +00:00
jenkins-bot 317b78782e Merge "Make it possible to reuse existing transclusion outlines" 2021-07-16 14:25:24 +00:00
jenkins-bot 4cb9b05668 Merge "fix order of sidebar elements" 2021-07-16 14:15:16 +00:00
Svantje Lilienthal 2f4e73d6ed fix order of sidebar elements
Bug: T272481
Change-Id: Ifd925bd6e8b972fd5d4e851c3a39a91aeac97d43
2021-07-16 15:10:56 +02:00
jenkins-bot 18a18bc825 Merge "Fix incomplete template dialog event handling in new sidebar" 2021-07-16 13:07:03 +00:00
Thiemo Kreuz 014bc9369c Fix incomplete back button implementation in template dialog
Bug: T286783
Change-Id: Ie86e2c8c6a874fde11591286a83faba71a34430d
2021-07-16 14:54:09 +02:00
jenkins-bot 575d4a8376 Merge "Fix ellipsis on long strings in parameter search widget" 2021-07-16 12:48:53 +00:00
Thiemo Kreuz 5c6d2212da Make it possible to reuse existing transclusion outlines
Note that this patch alone probably does not make that much
sense. The code executed is pretty much the same. The only
difference is that the empty (!) …ContainerWidget is kept
and re-filled with what might be a completely different
template.

This is not much of a difference to before when the
container was recreated.

This change will make more sense when the container has to
manage more state, e.g. focus states. This state will
survive then.

Change-Id: Ic336d10a595e3e222741a3dc57c1d54639166b7a
2021-07-16 14:43:31 +02:00
Thiemo Kreuz 092276009a Minor JSDoc documentation fixes in template dialog code
Change-Id: I3697e48697ab0910b90b418abbc370736589b6e1
2021-07-16 14:25:11 +02:00
jenkins-bot 4ab5fd5c6b Merge "Add a message next to undocumented parameters" 2021-07-16 12:05:29 +00:00
Thiemo Kreuz 1bbf7c3394 Fix ellipsis on long strings in parameter search widget
This ellipsis was there before we started working on this code,
but was never working properly.

We understand that the CSS was intentionally done like this (as
the comment explains). However:
* We changed the width of the dialog. The old value doesn't
  match any more.
* The width is different when the sidebar is expanded vs. when
  it is collapsed. Even if we update the number, it won't
  always work.
* The 100% work fine in current browsers. I can only assume
  this was different back in 2014 when this CSS was written
  (see Ia8259e9).

Bug: T285044
Change-Id: I3de2b0ed0b6a05d2b9fa0b325a2b12277564b271
2021-07-16 13:33:51 +02:00
Thiemo Kreuz 434c11f6de Fix incomplete template dialog event handling in new sidebar
Notably:
* Don't require the model in the new sidebar via dependency
  injection, but connect the event handlers later. This is
  relevant because we currently create the new sidebar in the
  wrong spot. Removing the hard dependency allows us to split
  the code and utilize initialize() and getSetupProcess()
  correctly. This will be done in a following patch.
* The change event now includes the new position. This makes
  it very easy to add this missing feature to the new sidebar.

Also:
* Stop triggering change events when nothing changed. These
  events are expensive. They bubble all the way up to the
  TransclusionModel, and to all linked
  onTransclusionModelChange() handlers.
* Update event documentation to make this more visible.

Bug: T274544
Change-Id: Iafe29f18a6fed14d9c3124c9756aa840886afbbc
2021-07-16 11:29:26 +00:00
jenkins-bot cdf2497983 Merge "Tweaks and cleanups to template parameter search" 2021-07-16 10:47:37 +00:00
jenkins-bot 3858829c19 Merge "Fix template editor showing more than one new sidebar" 2021-07-16 10:18:06 +00:00
Thiemo Kreuz 1164f67f40 Tweaks and cleanups to template parameter search
Notably:
* Include parameter aliases, labels and descriptions in the
  search.
* Don't use a possibly outdated search index, but live data.
* Clear filter when a new checkbox is added.

Bug: T272481
Change-Id: Ie90a803af6178a8bb6de370a0f8e079800d9f8a2
2021-07-16 12:11:13 +02:00
jenkins-bot 6e86365b81 Merge "Add parameter search to sidebar of VE TemplateDialog" 2021-07-16 10:06:15 +00:00
Svantje Lilienthal 066c663864 Add parameter search to sidebar of VE TemplateDialog
Bug: T272481
Change-Id: If044e5d134f1b24f939c4786949e6ca34fb79e1e
2021-07-16 09:48:29 +00:00
jenkins-bot 974db3940f Merge "Show ellipsis when sidebar parameter names are too long" 2021-07-16 08:28:13 +00:00
Translation updater bot e28e09dcbe Localisation updates from https://translatewiki.net.
Change-Id: I56aefb75410d619920c623d4a3520c1d7e3f282a
2021-07-16 08:43:53 +02:00
Andrew Kostka 9ffdd51f04 Show ellipsis when sidebar parameter names are too long
Bug: T285044
Change-Id: I6bf53ec4d6d45888ed7e9ba1d67848e41224de63
2021-07-15 17:35:42 +02:00
jenkins-bot a8ff5f2b41 Merge "Remove trash icons from the content view" 2021-07-15 15:21:57 +00:00
Thiemo Kreuz 8ab2ec25ea Fix template editor showing more than one new sidebar
Bug: T274544
Bug: T286715
Change-Id: I9fe8b53a73b1862eca2d99afb02aa3d532d61918
2021-07-15 15:17:44 +00:00
Andrew Kostka f02c48ea52 Add a message next to undocumented parameters
Bug: T274550
Change-Id: I1af71150239ebc9966cc22e7d28883fbac99fdf1
2021-07-15 14:47:21 +02:00
Andrew Kostka 01d8a8c7a4 Remove trash icons from the content view
Bug: T275761
Change-Id: I8d2c1b8ebdc2e20779d0207b1a2ebe6ce36c54e7
2021-07-15 12:20:45 +02:00
Thiemo Kreuz 766b220f5a Finishing touches to new template editor sidebar
In detail:
* Allow clicks on all elements in the new sidebar. This should
  focus the corresponding element on the right.
* Make all elements in the new sidebar tabbable.
* Fix MWTransclusionOutlineTemplateWidget.createCheckbox() to
  not need a temporary param object any more.
* Rewrite more code in MWTransclusionOutlineTemplateWidget to
  be shorter and easier to read.
* Fix MWTemplateModel.addParameter() to not do way to much
  stuff when a parameter already exists.
* Update code documentation.
* Use more specific, less ambiguous variable and method names.

Bug: T274544
Change-Id: Iaf6f7d1b0f7bf0e9b03eb86d01f3eceadece6fe4
2021-07-15 08:40:35 +00:00
Thiemo Kreuz ff9f8a9e2d Focus template editor elements on click in the new sidebar
Clicks on the left side now focus elements on the right
side.

This patch also simplifies the …ContainerWidget constructor.
The config parameter should only be used for "OOUI things"
that are needed by subclasses and mixins. But the parameters
we have here are not "UI things".

Passing them as config passes them to classes where we don't
know what they do with it. What probably happens is that
some class keeps a reference to the entire config object,
which doesn't have a benefit and possibly blocks garbage
collection.

Bug: T274544
Change-Id: I0c0e4a1ba59dcb43141338ffe939c9c6783e000d
2021-07-15 08:40:28 +00:00
Thiemo Kreuz 198c5dba77 Make button to add undocumented template parameter work
Thanks to the widget now being an actual ButtonElement.

Bug: T274544
Change-Id: I1b0ef28b0aa115a027a07f3ae53c583598483e96
2021-07-15 08:40:20 +00:00
jenkins-bot 11978b968d Merge "Make new template editor sidebar items actual ButtonElements" 2021-07-15 08:39:18 +00:00
Translation updater bot 55dc0b2987 Localisation updates from https://translatewiki.net.
Change-Id: I0b7dfc89c529af6981faac008812269812aef0ca
2021-07-15 08:12:41 +02:00
Thiemo Kreuz eb1f1e28a3 Make new template editor sidebar items actual ButtonElements
Actually reusing this OOUI mixin gives us a lot of well
developed functionality we need anyway. Most notably proper
event management, e.g. click events.

The number of CSS properties we need to override is managable,
I would argue. Let's see:
* Our buttons are not inline-elements, but should use the full
  width.
* No focus-border left and right for the same reason.
* We want much more inner padding.
* We want a stronger hover effect.
* We need to fine-tune the position of the icon. This is
  because of the inner padding.
* Need to get rid of a negative margin that's only relevant
  for inline-buttons.

I currently feel like the benefits are worth living with
slightly more brittle code. Note that we can undo this change
any time because all this is well encapsulated in this new
class.

Bug: T274544
Change-Id: I33f275a958964d49e803e56bf74a6fa961093da1
2021-07-14 13:31:40 +02:00
jenkins-bot 63547fb86e Merge "Reuse generic button widget for elements in the new sidebar" 2021-07-14 09:59:32 +00:00
jenkins-bot 5aca83e954 Merge "Various design tweaks to the new template dialog sidebar" 2021-07-14 08:42:53 +00:00
jenkins-bot f161868e6a Merge "Update new sidebar when moving template parts up/down" 2021-07-14 08:41:32 +00:00
Translation updater bot 5568478b21 Localisation updates from https://translatewiki.net.
Change-Id: Ica3347c63370d347ef4a0f5602762914d673e426
2021-07-14 08:03:13 +02:00
Thiemo Kreuz 170ca9d58a Reuse generic button widget for elements in the new sidebar
This introduces another generic "button-like" class that can
be reused in multiple places in the new sidebar. The main
change in this patch is the "add more information" button
which is now an instance of this new class as well.

This patch also simplifies over-complicated setup code in
related widgets.

Bug: T274544
Change-Id: I0cfe7675d02fdd5c5dc8d9198bb3f4aec9abf397
2021-07-13 17:23:27 +00:00
Thiemo Kreuz 28049425ec Various design tweaks to the new template dialog sidebar
Still far from being finished, but much closer to the mocks
already.

Bug: T274544
Change-Id: I1feee06e43a4b9c10a2d9443b6d816595bead64d
2021-07-13 13:00:37 +00:00
Thiemo Kreuz 31904688df Update new sidebar when moving template parts up/down
The new sidebar now updates accordingly when elements are
moved around.

Bug: T274544
Change-Id: Ic6bc3484c54523aa4edc6b48a843c47059569061
2021-07-13 10:18:20 +02:00
Thiemo Kreuz 226e2657ef More robust debug container for new template editor sitebar
Before, the new sidebar was hacked in a place where it confused
the BookletLayout logic. This became visible when using the
up/down buttons to move elements in the sidebar.

This new container wraps the new and the old sidebar. It also
uses a temporary color to make it easier to see where one ends
and the other starts.

Bug: T274544
Change-Id: I4e5b40b1d1556886fc85cff9e926a02e4888f032
2021-07-13 09:11:57 +02:00