Commit graph

13996 commits

Author SHA1 Message Date
Thiemo Kreuz 1926ab7b05 Code cleanup in ExpandableContentElement
This is split off from the unfinished patch I039d6f6. This only moves
existing code around, makes use of chaining and such to make code
more compact and hopefully more readable. Methods are renamed to
reflect better what they actually do. No behavior should change.

Change-Id: I3ba538c8c77ad4455bf0f0aa821ca14feadef7cc
2022-08-15 08:40:11 +00:00
jenkins-bot 254b14f3bf Merge "Chain scroll calls instead of just calling after each other" 2022-08-15 07:50:49 +00:00
jenkins-bot ba00286b13 Merge "Pass empty string to unused argument of pushState/replaceState" 2022-08-12 15:56:24 +00:00
Thiemo Kreuz 89ace728a4 Chain scroll calls instead of just calling after each other
Change-Id: I420fbd29ab79d6f2e1e9ef02bc3c99050126c3c8
2022-08-11 15:35:45 +00:00
jenkins-bot 54d0268847 Merge "Do not show incompatible skin warning when page is not editable" 2022-08-11 13:43:54 +00:00
Gergő Tisza c697a6d2da
Do not show incompatible skin warning when page is not editable
Bug: T314952
Change-Id: Ie09f2ab5a8ae05cdd95ba1acbe02e978c002f8d6
2022-08-10 23:07:39 -07:00
Bartosz Dziewoński d36d467a82 ve.ui.MWTargetWidget: Suppress the stacking context established by .vector-body
Bug: T314230
Change-Id: I742f0435f279689dbdac8e811a8aeab00cc9086b
2022-08-11 01:47:19 +02:00
Ed Sanders 686ef07ed3 Pass empty string to unused argument of pushState/replaceState
Per https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
this argument is treated as unused in all the browsers we support.

Change-Id: I83d3e2e8d9d2defa49e7a832f78bfc29f15da719
2022-08-09 13:37:34 +01:00
jenkins-bot 95774e4f2a Merge "Also log EditAttemptStep events via Metrics Platform" 2022-08-06 05:09:24 +00:00
jenkins-bot f842d6fa97 Merge "Rename value state variable" 2022-08-05 09:23:08 +00:00
WMDE-Fisch c66e700469 Rename value state variable
Is more intuitive like that.

Change-Id: Ib36d6fa1bce9a564f5b9a1c027f2573a5775d2c5
2022-08-05 10:07:18 +02:00
WMDE-Fisch 6cfa2e7dd0 Fix typos
Change-Id: Iaa7bf09877f32f7c19217103773657a8d8a81d16
2022-08-05 10:00:54 +02:00
Adam Wight 63c625f261 Remove unused config parameter from forked ControlsWidget
Split from I8eb279f.

Bug: T311296
Change-Id: I1739af4ca3c92a3aab08c61be8f665d2d3997f7c
2022-08-04 20:14:41 +02:00
jenkins-bot e857ded358 Merge "Streamline button margin calculation for outline parts" 2022-08-04 13:05:18 +00:00
WMDE-Fisch 7f4645bbe0 Streamline button margin calculation for outline parts
Generally the default button margin on the parts is 24px. The only
exception are the placeholder and wikitext when they are the last
parts in the outline.

Bug: T312644
Change-Id: Ie513bf1c022b2696cc92aacbbca59ddf6e55043e
2022-08-03 13:09:51 +02:00
jenkins-bot e50c0af860 Merge "Show "no parameters" message only when there are no parameters" 2022-08-03 09:43:50 +00:00
Thiemo Kreuz cdf9a59278 Tweak the hard coded top scroll padding for the parameter list
In Iebfe2e2 we already tweaked this by 1px. Turns out this was not
enough in all relevant situations. I still get random scroll events
just because I move the mouse around. Setting: Firefox, 120% zoom,
multi-part transclusion.

Bug: T312926
Change-Id: I475c1ef029e9721cc663881e40547730389cd26d
2022-08-03 11:15:32 +02:00
jenkins-bot f3f1e9c402 Merge "Tweaks to focus/scrolling code relative to sticky header" 2022-08-03 08:09:47 +00:00
jenkins-bot 13e5ae6997 Merge "Tighten conditions for incompatible skin warnings" 2022-08-02 11:42:24 +00:00
Thiemo Kreuz 5eb1193670 Tweaks to focus/scrolling code relative to sticky header
* Rename method because it turns out it is not only about the sticky
  header, but also relevant when there is no header.
* Move some code to more appropriate places.
* Use 0 as documented in OOUI, not null.
* Set the padding back to 0 when the sticky header is not visible.
  As of now this is an unreachable state because the filters never go
  away after they have been made visible. Still this code was always
  written with this possibility in mind to make it future-proof.
* Performance optimization for the boolean "show filters?" check.

Bug: T312926
Change-Id: Iaba08ccd8bf00360fd26f9268d5be43df4f4fbd8
2022-08-02 11:41:23 +00:00
Thiemo Kreuz 0b28414dff Restore scrolling parameters into view with(out) sticky header
This is a partial revert of Ide45141. Now the scrolling always
happens (again), but properly considers the presence of the sticky
header. It was also not correctly initialized on construction time.

This is a candidate for a backport. The patch is intentionally as
small as possible because of this. Code cleanup will be done in a
later patch.

Bug: T312926
Change-Id: I06425b42566bfb2087846636055ee75e98a05029
2022-08-02 12:29:06 +02:00
Thiemo Kreuz b9376f5990 Show "no parameters" message only when there are no parameters
The message was also shown when a documented template appears as
part of a multi-part transclusion but with zero parameters being
used. You see the filters in this case and can click "show all".
The message is just wrong in this situation.

Bug: T312926
Change-Id: I8d26ceec483e05fd1f69013e506fa1eb4e4c29ed
2022-08-02 11:48:45 +02:00
Thiemo Kreuz 800461efac Scroll below sticky header only if sticky header is present
Bug: T312926
Change-Id: Ide45141f0a21b782f8674ecbed9ee512de985661
2022-08-01 15:37:33 +02:00
jenkins-bot 2f555569ea Merge "Tweak the hard coded top scroll padding for the parameter list" 2022-08-01 13:05:03 +00:00
WMDE-Fisch 8ae4d291df Tweak the hard coded top scroll padding for the parameter list
Currently the sticky size is exactly 114px. With 115px you also can
see an auto scroll effect on multi part transclusions when you hit
that 1px sweat spot at the top of the list.

Bug: T312926
Change-Id: Iebfe2e2c6360c650755cd985157949a26a5287a4
2022-08-01 14:07:31 +02:00
jenkins-bot a1bd30f35d Merge "Simplify partly redundant findFirstSelectedItem implementation" 2022-08-01 11:45:08 +00:00
Thiemo Kreuz d01d1e78c2 Simplify partly redundant findFirstSelectedItem implementation
Introduced via Ibc56abf. But the OOUI SelectWidget does have some
methods for this already.

This patch also updates some @mixins documentation.

Bug: T302965
Change-Id: Iffbb44d41586786a2165f8d7916f94a52ad19122
2022-08-01 11:07:29 +00:00
jenkins-bot ee760ee2a6 Merge "Fix forgotten "setPage" property because of merge conflict" 2022-08-01 09:37:40 +00:00
Thiemo Kreuz cdb9766752 Fix forgotten "setPage" property because of merge conflict
The rename in I5a16ab4 was done the exact same time a new usage was
introduced via Ibb717ca. Neither patch shows a conflict. Still there
is one.

I remove the extra `|| null` line because it is just not needed. We
don't need to set the property to null when it was already null.

Bug: T312213
Change-Id: Id3f025786c9412e8c1946434113c41356da08098
2022-08-01 09:42:25 +02:00
Bartosz Dziewoński b5cdd70508 Tighten conditions for incompatible skin warnings
Previously we could log a warning if the user had the editor enabled,
but the page did not support being edited as wikitext.

Bug: T312632
Bug: T314171
Change-Id: I647cb057ed44c155b4eba1b728d6908f8a7abb69
2022-07-30 15:35:47 +02:00
Andrew Kostka dc91a39f8b Use the same styling for add template and add parameter buttons
Bug: T314052
Change-Id: I62d4e282b0e8f0a32e37e144db358144224119f1
2022-07-28 16:24:15 +02:00
jenkins-bot 6422e69821 Merge "Minor code cleanups in forked BookletLayout and related" 2022-07-28 12:59:10 +00:00
jenkins-bot 13c2a24f6c Merge "Prefer adding parameter to currently focussed template" 2022-07-28 11:34:38 +00:00
jenkins-bot 52c155f43f Merge "Fix "null is not a string" error in event logging code" 2022-07-28 10:41:15 +00:00
Thiemo Kreuz 741dbe5ccf Minor code cleanups in forked BookletLayout and related
E.g. renaming variables and moving code around. No functional change.

Change-Id: I39e76356c62a0d1bcdf1d20bc8215f09604ad07d
2022-07-27 16:04:27 +02:00
jenkins-bot f67033a82d Merge "Log incompatible skin warnings" 2022-07-27 12:47:01 +00:00
jenkins-bot 94268009c9 Merge "Remove dead code, deleting parameters is not possible" 2022-07-27 09:41:51 +00:00
Thiemo Kreuz b085d6cf24 Prefer adding parameter to currently focussed template
Instead of the template that's currently selected. That's confusing,
e.g. when you click one of the search fields, search for a parameter,
can't fine it, and press ctrl+shift+d to add an undocumented
parameter. Or you navigate the list of parameters with the cursor
keys, can't find the parameter you are looking for, and press
ctrl+shift+d to add it.

Still falls back to the selection when the focus is outside of the
sidebar.

We suggest to merge this before UX review, and review it later in
demo time. It's easy to undo if necessary.

Bug: T313388
Change-Id: I9848dd0af4fe821526dafc18bbd7cb1ab0e68cfc
2022-07-27 09:17:23 +02:00
Gergő Tisza 591796df12
Log incompatible skin warnings
Log a client error when VisualEditor cannot load because of an
incompatible skin (which is not supposed to happen in practice).

Bug: T312632
Change-Id: I2ccfaa584d7a05e10170a66d446bd4e476dcc775
2022-07-26 17:51:30 -07:00
jenkins-bot 1d34b069ad Merge "ve.init.mw.Target: Use mw.libs.ve.targetSaver.getHtml in getWikitextFragment" 2022-07-27 00:07:35 +00:00
jenkins-bot e06cdeadb1 Merge "ve.ui.MWGalleryDialog: Fix "Alternative text" not being readonly sometimes" 2022-07-26 20:26:17 +00:00
jenkins-bot f7d9da3317 Merge "Start altText as null to avoid empty alt for new gallery images" 2022-07-26 20:00:52 +00:00
jenkins-bot 7e55a99917 Merge "Add a checkbox to use the image caption as the alt text for galleries" 2022-07-26 20:00:48 +00:00
Bartosz Dziewoński d2f7796744 ve.ui.MWGalleryDialog: Fix "Alternative text" not being readonly sometimes
Depending on the order in which this code executed, sometimes the
dialog initialization would overwrite the readonly state set by item
initialization.

They should simply all check both conditions.

Change-Id: I6a18f1e074f118423438c017b3e4e34e75579e5d
2022-07-26 21:50:19 +02:00
jenkins-bot c595901528 Merge "Tab to first template parameter in list, not to the selection" 2022-07-26 14:45:04 +00:00
jenkins-bot 20f255d0f9 Merge "Fix filtering not clearing "currently selected page" state" 2022-07-26 14:36:02 +00:00
jenkins-bot 4997f3d41d Merge "Move getters for the currently selected part to two-pane layout" 2022-07-26 12:30:41 +00:00
Thiemo Kreuz d922c12957 Remove dead code, deleting parameters is not possible
This code was for when the dialog had a trash can icon for every
parameter, and parameters could actually be deleted. It's unreachable
now.

We missed this when removing the old workflow.

Change-Id: Ic94df506ea84009a1e1863a4e9847a70498df448
2022-07-26 13:21:39 +02:00
jenkins-bot 72b3a31571 Merge "Fix Ctrl+D and Ctrl+Shift+Y hotkeys to add parts" 2022-07-26 09:23:50 +00:00
jenkins-bot 2185393d96 Merge "Fix Ctrl+Shift+D hotkey to add undocumented parameters" 2022-07-26 09:20:48 +00:00