Commit graph

13359 commits

Author SHA1 Message Date
jenkins-bot c37d6f86e8 Merge "Hide parameter search when there are only 3 params" 2022-01-21 14:18:41 +00:00
jenkins-bot 8fa3a7a4eb Merge "Update the context menu title for multipart templates" 2022-01-21 11:40:58 +00:00
Andrew Kostka d4fff29148 Update the context menu title for multipart templates
Bug: T299495
Change-Id: I082a4e925c15ba5966a575127046e33f2fc3f62a
2022-01-21 11:51:31 +01:00
WMDE-Fisch 6cb0e7477e Hide parameter search when there are only 3 params
The search field is of not much use when there is not really anything
to search. It wastes more space than the actual list of parameters.

Approved by UX, see T298259#7626538.

Bug: T298259
Change-Id: I01784a1c463d8b0b504897b20179719f91597d19
2022-01-21 11:23:49 +01:00
Andrew Kostka 8da9661e11 Add a title to the templates help button
Bug: T299499
Change-Id: Ibb4aca479674668d6c14b8ace037433fa305dc35
2022-01-21 11:11:46 +01:00
jenkins-bot 4015ad1bf5 Merge "Defer creating template parameter widget for 0 parameters" 2022-01-21 08:52:37 +00:00
jenkins-bot dd8d53d19f Merge "Image model: Clear originalWidth/originalHeight attributes when changing source" 2022-01-21 00:27:44 +00:00
Ed Sanders 75edbaad08 Convert ve.init.mw.DesktopArticleTarget.init.css to less
Change-Id: Icab13075903d6fad4007847c2381696d6b98fa96
2022-01-21 00:04:27 +00:00
jenkins-bot 835464802a Merge "Disable edit button while loading template dialog" 2022-01-20 13:50:51 +00:00
jenkins-bot 2cbe4f7d6f Merge "Fix left margin of hide unused and checkboxes" 2022-01-20 13:07:07 +00:00
jenkins-bot 16e188e815 Merge "Defer creating template parameter search when it's not needed" 2022-01-20 12:52:19 +00:00
jenkins-bot d4b354a1ba Merge "Removed left padding in parameter description" 2022-01-20 12:31:34 +00:00
Thiemo Kreuz 8fd1b6d8b8 Defer creating template parameter widget for 0 parameters
From the user's perspective nothing changes. A template without
parameters doesn't show anything. (Technically there was an empty
<div>, but it doesn't do anything.) The moment the first parameter
is added the required sub-widget is created and available from there
on.

This saves loading time and memory, especially when a multi-part
template contains many templates without parameters.

Bug: T298259
Change-Id: Ib1bd2cd0be4fece4acc92e6e5f63133a7986cf81
2022-01-20 12:06:03 +00:00
Svantje Lilienthal adb85f341a Removed left padding in parameter description
Bug: T299518
Change-Id: Iaa7118a111cfbc1856bbe7c1ff6917587ba6c395
2022-01-19 14:40:06 +01:00
WMDE-Fisch 0e4c6104ef Fix left margin of hide unused and checkboxes
The checkboxes are actually indented a bit more than the search box
with this change the extra indentation is applied and the hide
button text is alligned accordingly.

Bug: T298259
Change-Id: I5508ab883c23e7285c023dc127529ffa4dbe58c7
2022-01-19 14:21:37 +01:00
Thiemo Kreuz 66f56f6c88 Defer creating template parameter search when it's not needed
From the user's perspective this is the same as before: When a
template doesn't have any parameters, there is no search field. The
moment the first (undocumented) parameter is added the search field
appears.

This is just delayed now. The widgets are only created the moment
they are actually needed.

This saves loading time and memory, especially in a multi-part
transclusion with many zero-parameter templates.

This also makes it a lot easier to change the minimal number of
parameters from 1 to e.g. 4.

Includes reverting the flexible header composition done in
Ib050e30a50ef965c1524e977d3a600c3ff836774

Bug: T298259
Change-Id: Ied7541d8d5c0b478a439dd31ce072e634287f181
2022-01-19 11:23:34 +01:00
jenkins-bot 770884f14f Merge "Make sidebar header and search field sticky during scroll" 2022-01-18 12:55:11 +00:00
Thiemo Kreuz 33a2f21589 Disable edit button while loading template dialog
Bug: T297773
Change-Id: I51fc0af4c3b29fd0801fc06a1dc07ad3fd7f1da3
2022-01-18 12:29:27 +00:00
jenkins-bot b4e3c3b1e5 Merge "Add mobile specific styling for TemplatePage" 2022-01-17 17:14:00 +00:00
Ed Sanders 2dd810da85 Image model: Clear originalWidth/originalHeight attributes when changing source
Bug: T269035
Change-Id: I52e5e7fd46ce86a2190b9ef5484898f741105646
2022-01-17 15:32:30 +00:00
Adam Wight a244f510c4 Make sidebar header and search field sticky during scroll
The search field will stay at the top of the window while scrolling a
single template.  In multi-part transclusions, the header will also
be sticky.

Hides the template header in single-part transclusions.

Bug: T298618
Change-Id: Ib050e30a50ef965c1524e977d3a600c3ff836774
2022-01-17 16:09:54 +01:00
jenkins-bot 8d119a4356 Merge "Re-duplicate deduplicated TemplateStyles" 2022-01-16 00:24:31 +00:00
Bartosz Dziewoński 005a8d24ef Re-duplicate deduplicated TemplateStyles
Bug: T287675
Bug: T299251
Change-Id: I7711c30131cb441f84b3e2137983f0ba2a50b46f
2022-01-14 21:35:11 +00:00
jenkins-bot 2819958a8a Merge "Add button to sidebar to hide/show unused fields" 2022-01-14 11:35:19 +00:00
WMDE-Fisch 20435b319c Add button to sidebar to hide/show unused fields
Bug: T298259
Change-Id: I8e5091b97dfb19eba981b2a919b82b6f14823990
2022-01-14 11:09:04 +00:00
jenkins-bot 1150891885 Merge "Include TemplatePage styling on mobile" 2022-01-14 11:07:59 +00:00
Andrew Kostka 2e7d4dabd1 Fix positioning of the "add parameter" button on mobile
Bug: T292749
Change-Id: I8c73189fcb94541087c6d44fbe7a82d14f9c3483
2022-01-13 15:18:40 +01:00
Andrew Kostka 914d9f7aaf Add mobile specific styling for TemplatePage
Bug: T292746
Change-Id: I3f2bc156d3f1be6e78b3a5d257c0cc484a65611c
2022-01-13 14:42:41 +01:00
Andrew Kostka 8c07926d4b Include TemplatePage styling on mobile
Bug: T292746
Change-Id: I52dcc8b489598ea8a892ad6c049c20d40f410d5b
2022-01-13 14:03:02 +01:00
Adam Wight 587ba4c662 Confirm before closing template dialog
Reuse the back button confirmation dialog for the close button.  The
condition is slightly different: need confirmation if there are any
manually-entered values for any parameter AND the user has edited
the template in this session.

The "reset" action was synthetic, only used internally and not
connected to buttons or menus.  Canonically, action='' is the close
action for OOUI.

Bug: T297792
Change-Id: I4ff644c7ab24ed9ba1a4c27d762563c5d6771cfc
2022-01-12 10:47:21 +01:00
jenkins-bot 1dbfad3503 Merge "Reuse touched-content logic" 2022-01-12 08:34:09 +00:00
Ed Sanders c0f3fc3a78 Pass visibleSection & visibleSectionOffset to target
* Find the first section below the top of the viewport
  (usually visible) and measure its offset.
* After loading the editor, ensure this heading is still
  at the same position on the page.

Bug: T296910
Change-Id: I9a05ea74ba3c19a4a91ddc1bc0afe311851c53e6
2022-01-11 20:39:27 +00:00
jenkins-bot e1b9e6a98e Merge "Watchlist API update: Call correct method" 2022-01-11 18:41:49 +00:00
Ed Sanders aea22d546e Watchlist API update: Call correct method
We changed the arguments, but not the function name.

Change-Id: Ic7b36f666ead57bc62aa6e40e148821ea267ee80
2022-01-11 18:21:12 +00:00
jenkins-bot 9b659687c7 Merge "Introduce ArticleTarget#afterSurfaceReady" 2022-01-11 18:11:50 +00:00
jenkins-bot 4f9f14f383 Merge "Replace confirmation overlay with a popup dialog" 2022-01-11 17:59:48 +00:00
Adam Wight 28e706b3dd Reuse touched-content logic
Without changing behavior, consolidate the logic for detecting
whether the editor has made changes to the template.  This is
responsible for enabling and disabling the "Apply changes" button.

Change-Id: Ic4755b13f30fb738a7cb1eebaddef0435ea61d34
2022-01-11 17:39:22 +00:00
Adam Wight cbe2fd634f Replace confirmation overlay with a popup dialog
Currently, the insert template dialog includes a back button in the
upper corner.  Confirmation of abandoning unsaved changes was
accomplished in an overlay panel.  This patch rewrites as a dialog
and updates the on-screen text.

Bug: T297792
Change-Id: Ifa2ff97c9284609ee2a784f455789c56a762ba50
2022-01-11 18:37:29 +01:00
jenkins-bot 83d1211ef6 Merge "Give getUniquePartId method a better name" 2022-01-11 13:31:10 +00:00
Ed Sanders 6c471c5b1e Introduce ArticleTarget#afterSurfaceReady
This method should be called once the surface is visible
and ready to be focused.

Change-Id: I43a1d9cabd59181d2beab8f4a29700d031903c22
2022-01-11 03:33:04 +00:00
Ed Sanders 93df71af77 ArticleTarget#scrollToHeading fixes
* Use this.getElementWindow
* Use this.surface.padding to avoid race condition
  when the toolbar hasn't fully rendered yet.

Change-Id: I055b1d9458d73e435ede6096941a3e72c9c1ce74
2022-01-11 03:32:52 +00:00
jenkins-bot b92f414e23 Merge "Use new wikipage.watchlistChange hook" 2022-01-10 22:42:17 +00:00
Ed Sanders 3800daf354 Use new wikipage.watchlistChange hook
Bug: T294254
Depends-On: I88af8585e8fc75f77ebef867d267199aeb2c6592
Change-Id: I60400124976093060b3b5478c6d7d9e6844cc217
2022-01-10 23:16:41 +01:00
jenkins-bot ccb74dc828 Merge "Enforce formatversion=2 in template search" 2022-01-10 12:57:05 +00:00
jenkins-bot 8886773548 Merge "DiffPage: Only set user pref on 'choose' event" 2022-01-08 01:33:31 +00:00
jenkins-bot 67aad36acb Merge "DiffPage.init: Move and rename some vars" 2022-01-08 01:33:29 +00:00
jenkins-bot 451555ac64 Merge "Tests: Fix unbalanced HTML" 2022-01-08 00:26:53 +00:00
Ed Sanders 40a50cac4a DiffPage: Only set user pref on 'choose' event
This prevents your preference being changed if you just
followed a link with a diffmode parameter.

Change-Id: I755563bde285e95c0367119d49a40e1dd3c5e178
2022-01-06 16:48:02 +00:00
Ed Sanders 302303de46 DiffPage.init: Move and rename some vars
Change-Id: Ibcef23650e6c77d9142055e9e7357ce095ba3b49
2022-01-06 16:47:35 +00:00
Thiemo Kreuz 579cdaa145 Enforce formatversion=2 in template search
This is guaranteed via ve.init.mw.Target.getContentApi(). But the
ContentTranslation extension replaces this, and does not set a
formatversion. See e.g. SectionTranslationTarget.getContentApi().

Bug: T298599
Change-Id: I8768cae3153e9cbc29a8796ec21ef249f80471ed
2022-01-05 12:49:44 +01:00