Commit graph

3379 commits

Author SHA1 Message Date
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
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 b4b6940c64 Merge "Minor fixes to template dialog related code documentation" 2022-07-14 07:01:11 +00:00
Thiemo Kreuz 0bf4a4a147 Use named colors in template dialog LESS styles
Change-Id: I935e1bcacfe8bb61fa69da9fa42417c76c8e505a
2022-07-13 17:51:32 +02:00
jenkins-bot 1e0ac6de13 Merge "Use position-sticky() from mediawiki mixin" 2022-07-13 14:21:23 +00:00
WMDE-Fisch a4aa684308 Don't call parent on SelectWidget focus event
This regression from Iaf089f4b271fd853b17c1aa7f5938510ea8f5431.

Not calling the parent here was is essential, because when clicking
the checkboxes this event will trigger the focus of the whole widget.

That's not what we want in this case though. Also it seems we don't
need any of the logic from the parent and can get rid of that
complexity.

Bug: T312855
Bug: T312856
Bug: T312924
Change-Id: Ib3a2eeeb6d519dfa1bb627049f6b3a4708017e86
2022-07-13 15:27:24 +02:00
Thiemo Kreuz 466a73e730 Minor fixes to template dialog related code documentation
Change-Id: I0b5e0ede45578db23ecd5817baf842eb3cc3dbf4
2022-07-12 20:10:02 +02:00
jenkins-bot 55165649c7 Merge "Document some classes touched in the sidebar rewrite" 2022-07-12 13:53:29 +00:00
jenkins-bot 98ec1db594 Merge "Don't set a ParameterPage as next selection after delete" 2022-07-12 13:04:01 +00:00
jenkins-bot 927ca77182 Merge "Safe to call setPage with a null page" 2022-07-12 12:22:25 +00:00
WMDE-Fisch 8aee4e8e70 Use position-sticky() from mediawiki mixin
This will also slightly improve the situation for older Safari
browser by adding a -webkit rule.

Change-Id: I16b065adddd8ffe21936db9794495a891792ce8c
2022-07-12 14:09:01 +02:00
jenkins-bot 7c935f8935 Merge "Use @type instead of @var for JavaScript variable" 2022-07-12 11:57:44 +00:00
Adam Wight 150aad380d Safe to call setPage with a null page
Fixes a bug that crashes the interface when unsetting the focus after
another input was focused, because `page` is undefined in this case.

We were already calling `setPage` to unset focus, so document it.

Bug: T312017
Change-Id: I2926beffe23e0ee822f5690d4791534a5413886a
2022-07-12 13:52:30 +02:00
jenkins-bot 4eebfd2635 Merge "Don't access the stacklayout directly" 2022-07-12 11:36:02 +00:00
WMDE-Fisch 5067a1e216 Don't set a ParameterPage as next selection after delete
This can only happen when deleting the last part of a transclusion,
then we want to set the previous page as selected. This should never
be a parameter though.

Bug: T312221
Change-Id: I06700dcf37f6d4f7dd073f8f2bc1b8b0a17a62c4
2022-07-12 13:35:34 +02:00
jenkins-bot b736727b07 Merge "Use short syntax for transforming one event into another" 2022-07-12 11:28:06 +00:00
WMDE-Fisch 41bb082def Use @type instead of @var for JavaScript variable
Just putting this eslint auto fix out there. No hard feelings, but
a warning that pops up everytime.

Change-Id: I157e0338e5f5a6f27dbbd9ae116da0f922468586
2022-07-12 11:18:27 +00:00
WMDE-Fisch ec522938b8 Scroll parameter items into view when hidden behind sticky
Triggers scroll in all situations where highlighting changes.

Including keyboard navigation.

Bug: T312542
Change-Id: I849f64c5cefe0cac3fde6e848b23b7b0cfc489ce
2022-07-12 10:52:19 +00:00
Adam Wight d77728bd4f Document some classes touched in the sidebar rewrite
Depends-On: I385dca1d95033961d3844e888521750443e49c95
Change-Id: Ic515b41863bcf2ac4daa0272f67e1d30238a4b85
2022-07-12 12:49:31 +02:00
WMDE-Fisch b75082009a Differ between setting and highlighting a parameter
Introducing a set method to have a different state for a set
parameter and a highlighted one in the selection.

Allows us to remove a lot of workarounds for missusing the
highlight state and fixes several issues with these workarounds.

Main implications:
- Keyboard navigation and mouse hover now sets the grey highlight
- If a parameter is set (blue highlight) keyboard navigation returns
  when focusing the SelectWidget
- If nothing is set keyboard navigation starts at the top after focus
- Unchecking a parameter using space will not influence the keyboard
  focus in the list
- Highlighting a parameter with the mouse lets keyboard navigation
  continue from there.

Bug: T312647
Bug: T311204
Bug: T312213
Depends-On: I385dca1d95033961d3844e888521750443e49c95
Change-Id: Iaf089f4b271fd853b17c1aa7f5938510ea8f5431
2022-07-12 10:18:56 +00:00
Thiemo Kreuz 6d41da0de7 Use short syntax for transforming one event into another
Change-Id: Id794f2b620edebd6eab71e3380ce1eeffcdc95ef
2022-07-12 11:54:04 +02:00
jenkins-bot a305571b23 Merge "Add grey background when buttons are in focus" 2022-07-09 07:15:16 +00:00
jenkins-bot 086a73804f Merge "Use rgba instead of hex to highlight identical styling" 2022-07-09 07:15:13 +00:00
WMDE-Fisch a0c0465d67 Don't access the stacklayout directly
Bug: T310867
Change-Id: I95cbdee26ead46c2d8803ddb3a9e06304f793407
2022-07-09 05:56:27 +00:00
jenkins-bot 479732f516 Merge "Take parameter list out of tab navigation when empty" 2022-07-08 13:13:26 +00:00
jenkins-bot 47a3e46272 Merge "Lessy-fying OutlineParameterWidget rules" 2022-07-08 12:21:06 +00:00
jenkins-bot ff411966b1 Merge "Lessy-fying OutlineTemplateWidget rules" 2022-07-08 12:21:04 +00:00
jenkins-bot cb7c6e32ee Merge "Fix CSS regression" 2022-07-08 12:19:54 +00:00
Adam Wight fb81938c74 Take parameter list out of tab navigation when empty
This prevents an invisible and unactionable focus target when the
parameter search field doesn't match anything.

Bug: T312547
Change-Id: Ib29913a547cd68649d29e28d921c4c1358bad7b8
2022-07-08 13:59:37 +02:00
WMDE-Fisch 970ab136da Add grey background when buttons are in focus
Bug: T311204
Change-Id: Ife5ed2dc2e772b8a94cbc04cad591acf9f8ebd6e
2022-07-08 13:40:43 +02:00
WMDE-Fisch d3bf14806a Use rgba instead of hex to highlight identical styling
This way it might be a bit more clear that this is actually the
same.

Change-Id: Ifbdfd66f476bf30408685a4af9989bb9ac969b21
2022-07-08 13:39:44 +02:00
WMDE-Fisch ef77373fda Lessy-fying OutlineParameterWidget rules
Change-Id: I9b72752269abd064c859b313ddb1f43ec04f9b71
2022-07-08 13:38:52 +02:00
WMDE-Fisch 0850a205df Lessy-fying OutlineTemplateWidget rules
Also renaming one class for convenience.

Change-Id: I0ef079ca40d061f5f2cde0eafdd04737d63c370f
2022-07-08 13:33:23 +02:00
Adam Wight c1ebaf989c Fix CSS regression
The last checkbox in the entire sidebar should get the extra bottom
margin, but not the last checkbox in each template group.

Follow-up on I1edc5db98d16a4c0de8abd7f705776fb9eb65b97

Change-Id: I4ffade9c053191ce202340edadbd032c67bb39a4
2022-07-08 13:31:22 +02:00
jenkins-bot 55cc3af23d Merge "Don't refocus content pane after removals" 2022-07-08 11:16:25 +00:00
Adam Wight 352dcc6177 Don't refocus content pane after removals
Causes problems when we remove a parameter using the spacebar, for
example.

This partially reverts Id3843b2c7ad6.

Bug: T312524
Bug: T312205
Change-Id: I65d834bc0d2cc649803b536ecc65bdd1fa166a32
2022-07-08 12:23:36 +02:00
WMDE-Fisch ab7bc03b18 Lessy-fying OutlinePartWidget and OutlineButtonWidget rules
Using a certain amount of depth to make sure to override OOUI
specificity.

More can be done in follow ups.

Change-Id: I1edc5db98d16a4c0de8abd7f705776fb9eb65b97
2022-07-08 10:29:57 +02:00
WMDE-Fisch 83c30099ec Move obvious Outline related CSS into own file
Should be a noop. Also moving one rule further up to the set of
similar selectors.

Removing one rule that was disabled for some time now.

Optimizations follow.

Change-Id: I8da70a52c13afd8ac1c3ff43bae63a203c3bf86a
2022-07-07 22:05:09 +02:00
jenkins-bot e635e70cca Merge "No highlight for selected template names" 2022-07-07 15:39:46 +00:00
jenkins-bot 768e8517f8 Merge "Revert "Restore selection after keyboard parameter navigation"" 2022-07-07 15:14:31 +00:00
Andrew Kostka 079a1ce6ff Remove highlighting when typing in a search field
Bug: T311204
Change-Id: I583c02df3def6cfeb347e9b63045b62e1d735e24
2022-07-07 13:40:42 +00:00
Adam Wight a83d37d864 Revert "Restore selection after keyboard parameter navigation"
We don't want to restore selection.  Instead, we'll remove all
parameter selections onFocus, in a later patch.

This reverts commit 787d44af66.

Bug: T312017
Change-Id: Ia1dc8061dfd1813a58befff5adc5c3882b54d8e2
2022-07-07 15:24:11 +02:00
jenkins-bot fd86b7f38d Merge "Autofocus template input field on dialog open" 2022-07-07 13:18:53 +00:00
jenkins-bot e6737b55af Merge "Drop StackLayout" 2022-07-07 13:17:08 +00:00
Andrew Kostka 3f8387af17 Autofocus template input field on dialog open
Bug: T312205
Change-Id: Id3843b2c7ad6b3eb4a11e0c6d288dd69804973f8
2022-07-07 14:26:17 +02:00
Adam Wight 483528affe Drop StackLayout
Gets rid of some unused behaviors that we've already disconnected.
Brings the remaining styling into VE files.

Bug: T312524
Change-Id: Ie94472019ba41124831621c45713861297219594
2022-07-07 13:06:24 +02:00
Svantje Lilienthal e286e11a6c No highlight for selected template names
Bug: T311204
Change-Id: I949ede551b122c365954ef5315103e0749353288
2022-07-07 09:16:05 +00:00