Commit graph

19613 commits

Author SHA1 Message Date
jenkins-bot 0062280c09 Merge "Fix "current page" not being reset when page is removed" 2022-07-20 09:42:41 +00:00
jenkins-bot 017aa1eea9 Merge "Fix sidebar losing focus when unchecking params with space" 2022-07-20 09:40:31 +00:00
Thiemo Kreuz 4782987a7f Rename confusing "isSet" to "active page indicator"
We would love to name this state "selected", but that term is already
used for a template parameter that is checked/used. The idea of "set"
was to have a list of parameters where one is "set". But the word is
confusing. I suggest "active page" because the entire purpose of the
blue selection is to highlight the currently active page (i.e. the
one you currently interact with on the right side of the dialog) in
the sidebar.

Change-Id: I5a16ab4c193ea05c21bb3bf89ada2ef550d8d6bc
2022-07-20 09:38:41 +00:00
jenkins-bot 336a27e05b Merge "Minor fixes and optimizations to ParameterSelectWidget" 2022-07-20 09:35:51 +00:00
Thiemo Kreuz 66029402ee Restructure code finding closest top-level page for readability
I hope this makes it a little more readable. The two steps done in
the loop are mostly independent:
a) Find pages that should be removed.
b) Find next best top-level page when the current one is removed.

Change-Id: I600253fb206a31ef5851865e733b66c336d5014d
2022-07-20 09:25:09 +00:00
Thiemo Kreuz aaa47fdab3 Fix "current page" not being reset when page is removed
This does not have much of an effect, but can cause visual glitches
in rare situations. One goes like this: Use the keyboard and tab key
to navigate to a list of parameters in the template dialog. Press
space to enable the checkbox. The parameter gets a blue background
(= it's now the active a.k.a. "set" item). Press space again. Blue
disappears, as it should. Press space again. Blue is now missing.

Bug: T312213
Change-Id: I3071ec4d0a05e3505ec5216acc5a97b8eaf6f5d5
2022-07-20 09:22:39 +00:00
Thiemo Kreuz 74bffc5d0d Fix sidebar losing focus when unchecking params with space
1. Before, removePages() was calling setPage() with null. This makes
sense for removed top-level parts because these are really removed
from both sides of the dialog. Template parameters are never removed.
Only unchecked (and removed from the right side of the dialog, but
this is not what this code is about). When I navigate a parameter
list and uncheck a parameter I need the focus and highlighting to
stay.

2. We have a dedicated method when a parameter is unchecked. This
can check if the removed parameter is also the selected one (called
"set" in this code) and can reset this state. Without losing the
highlighting or anything else.

Bug: T312213
Change-Id: Ibb717ca49cae805617ebee196937c79daa72f1c1
2022-07-20 09:19:59 +00:00
Translation updater bot da2c04abb7 Localisation updates from https://translatewiki.net.
Change-Id: Iad665489aa8418e345f8f4cf1a69cc85c1abd64a
2022-07-20 08:28:37 +02:00
Bartosz Dziewoński 43ce20b726 Remove "unrecoverable" errors from the save dialog
There are many errors that are temporary in some way, and treating
them as unrecoverable is a poor experience.

Even for errors that really are unrecoverable, our interface works
poorly, because you need to hide the error message first to do
anything else, and you need to close the dialog to see it again.

This distinction is not really helpful, let's get rid of it.

Bug: T307330
Change-Id: I9680cc416da5b27881aeb3502f506dcb5d4bb71f
2022-07-19 21:46:30 +02:00
Thiemo Kreuz e2cce0dd3d Minor fixes and optimizations to ParameterSelectWidget
Optimization: Don't search for a checkbox that represents a not yet
named parameter placeholder. There is never one.

Fix: Store null, not undefined.

Bug: T312213
Change-Id: I395008f15d13133ad456d0a77571b7aa1c7a7fc9
2022-07-19 16:36:30 +02:00
Thiemo Kreuz 7156cd693e Remove duplicate selection code from template dialog sidebar
Steps to reproduce:
* Set a breakpoint or debug.log() at the start of
  TransclusionOutlineWidget.setSelectionByPageName()
* Edit a multi-part template.
* Use the keyboard to navigate to a template name in the sidebar.
* Press space.

This is currently triggered twice. Let's get rid of the more obscure
one. It was introduced as part of Ic4ee673. I don't really know why.

Bug: T313207
Change-Id: I3ddc072f5d42c17249abc82026e0bf1a4be1dc6e
2022-07-19 13:06:44 +02:00
Thiemo Kreuz 60b69c575e Use generic "outline item selected" event for top-level parts
This also means we have to move the declaration/documentation of the
event up one level into the generic "part" widget.

Change-Id: I1b803201f8955b58136ee7f37c04c01edcd47395
2022-07-19 11:05:32 +00:00
Thiemo Kreuz ee7a398ffc Rename specific "parameter selected" event to be more generic
The code that receives this event does not need to know that the
source is a "parameter". It's just some "item" in the sidebar. The
idea is to reuse the event for both top-level parts as well as
parameters. This will be done in the next patch.

Change-Id: I858040f5adf8e156b6013caaa527b3237b7bac0f
2022-07-19 11:05:18 +00:00
Thiemo Kreuz 10691ec44a Template dialog: Fix oval help button
In my tests this issue was only visible with the Minerva skin.

Bug: T310762
Change-Id: Idf1a5d11fb9ea5d874574f8176c1bd4a66e63892
2022-07-19 13:01:43 +02:00
Translation updater bot 29cace0be3 Localisation updates from https://translatewiki.net.
Change-Id: I8c4dc5ef4fb727d1397fc355a2e6f4173b89d391
2022-07-19 08:17:46 +02:00
jenkins-bot f23bd2706c Merge "Remove temporary compat for $wgVectorTitleAboveTabs = false" 2022-07-18 16:59:05 +00:00
Bartosz Dziewoński c2900af71e Remove temporary compat for $wgVectorTitleAboveTabs = false
The configuration option has been removed in
Ib35c6bfa5493f7dc81b63c42e7fedb8f1e47226b.

Change-Id: I1392cab0f6916c47cade833c10036adec2c9d4dd
2022-07-18 17:41:20 +02:00
Ed Sanders 33546466eb Add 'vector-body' hack to TargetWidgets
Bug: T313221
Change-Id: I06366d4601342435b70d311742ee985e01b0477b
2022-07-18 14:12:10 +01:00
Thiemo Kreuz 2bdd2b4fb9 Template dialog sidebar: Skip glitchy jQuery animation
What I found is a single `$container.animate( animations )` that's
responsible for the misbehavior described in T312768.

This method is called from a few places. I think none of these places
benefits from making this an animation. This is often more distracting
than helpful, especially when navigating with the keyboard.

Bug: T312768
Change-Id: I90a80d6ae8c1b47ee22297d2520255cad890b90e
2022-07-18 14:05:54 +02:00
jenkins-bot 684a69c17e Merge "Unhighlight parameter on blur" 2022-07-18 11:47:08 +00:00
jenkins-bot 458264a505 Merge "Merge redundant sidebar selection events in two-pane layout" 2022-07-18 11:38:27 +00:00
jenkins-bot 39dd216650 Merge "Remove/fix obsolete code trying to un-highlight parameters" 2022-07-18 11:37:22 +00:00
jenkins-bot 411a5d0208 Merge "Move debounce check from outline into part widget class" 2022-07-18 11:36:30 +00:00
Thiemo Kreuz 569ad3d538 Remove/fix obsolete code trying to un-highlight parameters
Fix setParameter() and let it (un)highlight parameters independent
from a selection (called "set" here).

Bug: T312925
Change-Id: Ie4e9ba94659f4f70160193ca6bec804f8a4473e4
2022-07-18 13:04:42 +02:00
Adam Wight 42cbde12a8 Unhighlight parameter on blur
Bug: T312925
Change-Id: I5de5dbb5e0f9f2ae1eb8e5f2c07317cda50680ea
2022-07-18 12:59:23 +02:00
Thiemo Kreuz 58c19747da Move debounce check from outline into part widget class
This just moves code to an – in my opinion – more appropriate place.
Here we can't forget it.

Change-Id: I8fff83b1586fc14d762b324e5443611370470983
2022-07-18 12:48:45 +02:00
jenkins-bot 0cd660ab39 Merge "Remove comments from two-pane layout that don't add information" 2022-07-18 10:47:31 +00:00
jenkins-bot 55b4c86802 Merge "Exit loop in onStackLayoutFocus earlier" 2022-07-18 10:04:11 +00:00
jenkins-bot eaca5e8ad0 Merge "Simplify interface to remove pages" 2022-07-18 09:55:18 +00:00
Thiemo Kreuz 83261578b6 Remove comments from two-pane layout that don't add information
These comments just repeat what the code says. Most of them are
copied from OOUI. Some talk about BookletLayout – a class name we
don't use any more.

Change-Id: I7ce354dfe059657395103ffef767eb8f6d37bfb7
2022-07-18 09:36:37 +00:00
Translation updater bot fc85f06dd1 Localisation updates from https://translatewiki.net.
Change-Id: Id75506d4b41ba26ad25fa5de5c3861808a0ad975
2022-07-18 08:16:01 +02:00
Adam Wight 2759752a0a Simplify interface to remove pages
Makes some things easier, some harder—not sure if this is a helpful
patch.

Change-Id: If56e9b2fbc1796cd637aaeececec779d31a7921f
2022-07-18 05:31:42 +00:00
Bartosz Dziewoński 979b382d2b Update VE core submodule to master (1800c35de)
New changes:
14ab5f36c Localisation updates from https://translatewiki.net.
ffde59c5f build: Replace automatic 'grunt-svgmin' with manual 'svgo' script
6294cc572 Re-crush SVGs now we're on SVGO 2.x not 1.x
42e35e898 Visual diff: Use mix-blend-mode to improve opacity hacks for content in highlighted areas

Bug: T311903
Bug: T312013
Change-Id: I0428ca6038459087d6c6f79e20ffeaa32659c3db
2022-07-16 19:18:02 +02:00
jenkins-bot 6f16d02c0c Merge "Wikitext mode: Use action=parse for preview" 2022-07-16 16:54:30 +00:00
Thiemo Kreuz b7fb9e873f Merge redundant sidebar selection events in two-pane layout
Note how the two-pane layout was already handling the two events
identical:

 sidebarPartSelected: 'onSidebarItemSelected',
 templateParameterSelected: 'onSidebarItemSelected'

We move this knowledge up one level into the sidebar. Both actions
now trigger the same event.

This implies that we are now using the event formerly known as
"sidebarPartSelected" to act on both top-level parts as well as
parameters. We reflect this by renaming it to "sidebarItemSelected".

Change-Id: I9a2c95f91f05de7312d38ec4c8b360141a0c447d
2022-07-15 16:21:04 +00:00
jenkins-bot 1a4bb6c5e4 Merge "Rename misleading templateParameterAdded event" 2022-07-15 14:55:09 +00:00
jenkins-bot 7ef5edf209 Merge "Rename misleading templateParameterSelectionChanged event" 2022-07-15 14:53:20 +00:00
Thiemo Kreuz 6e18ce647e Exit loop in onStackLayoutFocus earlier
The optimization removed in this patch is done twice. The effect is
that the loop does not end when it finds a match but the match happens
to be the current page.

This doesn't change anything. It's really only about performance.

Change-Id: I5c2de101eb2f14f814f00cf7eacf46b70346f4c8
2022-07-15 15:27:03 +02:00
Thiemo Kreuz 3f938d3c4f Rename misleading templateParameterAdded event
This is not only fired when a parameter is added. It's also fired
when pressing spacebar on a parameter that already exists.

Change-Id: I245aa9f5938eb38c3a3f224a4d642d57068cf23b
2022-07-15 14:26:41 +02:00
Thiemo Kreuz d57210c1c0 Rename misleading templateParameterSelectionChanged event
This is not only fired when a parameter is checked or unchecked.
It's also not only fired when another parameter in the parameter
SelectWidget is selected. It's always fired just because the
spacebar is pressed. This is so we can scroll that parameter into
view.

Change-Id: Id621405b7ca3116cd4a06f474e49776d0830dccc
2022-07-15 14:19:19 +02:00
Thiemo Kreuz 647b5aa8e9 Remove non-helpful 1px hack from template dialog sidebar
This line was added as part of I0229b63. While what the comment says
is still true to some degree, the line stopped being helpful when
we introduced sticky headers. When scrolling the sidebar for a
multi-part template with many parameters the sticky header jumps up
and down by this 1 pixel.

TL;DR: This is one of these hacks where it's better to remove it and
look for a better solution when we notice the original issue again.

Bug: T312768
Change-Id: I2fedea4e1d4d6c95c74a63c522821a6ebc2ee2b2
2022-07-15 13:00:40 +02:00
jenkins-bot 6baefa1190 Merge "Adapt bottom margin of last element in content pane of template dialog" 2022-07-15 07:51:48 +00:00
Translation updater bot 3081c2f09d Localisation updates from https://translatewiki.net.
Change-Id: I00b6762101fb8aea78c0f8872367a51e98f6a387
2022-07-15 08:48:25 +02:00
Ed Sanders 2644c84cda Increase default debounce of live extension inspector/dialog to 1000ms
250ms gaps are pretty common when typing at a normal speed, resulting
in a lot of (often expensive) API requests (e.g. T312319). For most
use cases this level of responsiveness in the preview is not necessary.

Change-Id: I6504567d4da02a66171ee35a9c4fd35c85136909
2022-07-14 17:14:37 +01:00
Svantje Lilienthal 6d31ca5b3f Adapt bottom margin of last element in content pane of template dialog
Bug: T312923
Change-Id: I9068053900915cc5838eeb1e96c48f6b8fff0936
2022-07-14 15:56:47 +02:00
Svantje Lilienthal 36d817dfcd Only move content pane element to top when sidebar element is clicked
This patch contains a small cleanup that moves the scrollIntoView into onSidebarItemSelected.
Since all other places already have a focus call, scrollIntoView is not needed there.

Bug: T312850
Change-Id: I1a3cb3905faea2bd8a6bf8dc4cfd748813e1c875
2022-07-14 15:32:14 +02:00
jenkins-bot fc70c924e5 Merge "Localisation updates from https://translatewiki.net." 2022-07-14 07:03:36 +00:00
jenkins-bot b4b6940c64 Merge "Minor fixes to template dialog related code documentation" 2022-07-14 07:01:11 +00:00
Translation updater bot 6440b62341 Localisation updates from https://translatewiki.net.
Change-Id: I1c2233043ecfa7a2ad9374f2d1009d4c03b9cdcb
2022-07-14 08:49:10 +02:00
Bartosz Dziewoński 54714ab7fc Update VE core submodule to master (38470f11e)
New changes:
bc81b354e Update OOUI to v0.44.1
38470f11e Revert "WindowManager: Simplify teardown"

Change-Id: I4468b8278c7fa546d31d9f9092a2b99dadae256a
2022-07-13 21:08:07 +02:00