Commit graph

19531 commits

Author SHA1 Message Date
Adam Wight b275bb33d4 Remove max-width limitation on inputs for mobile skin
All elements should be able to use the full window width.

Bug: T311109
Change-Id: I1e3ca6718a44cbdaa74d0c5bc94d0f475cd5e6bd
2022-07-05 14:02:43 +02:00
Adam Wight 0c87f16057 Shorten text for add buttons
This makes layout easier on small screens.

Bug: T311107
Change-Id: I506ac8ae721cf7b77f20c39b8049455d40d319de
2022-07-05 13:50:47 +02:00
Adam Wight 787d44af66 Restore selection after keyboard parameter navigation
When blurring out of keyboard parameter navigation, the
last-selected parameter will be highlighted again.

Bug: T312017
Change-Id: I8b0fb667b44b324529d4c45c39bf21573517f989
2022-07-05 13:37:38 +02:00
Adam Wight 441ffc5a84 Drop unused active state
`OO.ui.PageLayout.prototype.setActive` explains that the "active"
state only makes sense for a case we don't support, when a booklet
layout is used in non-continuous mode.

Change-Id: Ib5ddd605f29e82ebc85b833ac96b70ff4c95e502
2022-07-05 13:16:31 +02:00
Adam Wight fd002928e2 Always scroll to current page
Most of setPage's side-effects are redundant and can be skipped when
reselecting an item which already the current selection—except for
scrolling, which is useful to perform every time, for example when
clicking on the already-selected sidebar item.

Bug: T294348
Change-Id: I90ba14817e5536ac018eb70102f657f29a29644d
2022-07-05 11:32:02 +02:00
Translation updater bot d7d953aefe Localisation updates from https://translatewiki.net.
Change-Id: I8754be18daa834dddf51905392db7bee5d9fd9ff
2022-07-05 08:39:14 +02:00
Bartosz Dziewoński 56ca592fc3 Update VE core submodule to master (0a909d09a)
New changes:
8db04423a Localisation updates from https://translatewiki.net.
a60817839 Localisation updates from https://translatewiki.net.
88f4bb181 Follow-up I61b477d1f: Only remove native ranges if the are inside the document

Bug: T293661
Bug: T311904
Change-Id: Ie8f4d1c9853a9510f1ce2245a0d32ea630d76579
2022-07-04 16:58:12 +02:00
jenkins-bot dca4e559e7 Merge "Fix broken scroll on sidebar toggle" 2022-07-04 14:33:34 +00:00
jenkins-bot b380f84d42 Merge "Prevent highlighting the first parameter when clicking to remove" 2022-07-04 14:24:17 +00:00
WMDE-Fisch ed4fa49520 Fix broken scroll on sidebar toggle
This was using the currentPage from the StackLayout. It will not
be updated there anymore.

Also removing the line about focus after toggle. We do not want
that anymore afaik.

Bug: T312015
Bug: T289043
Change-Id: I8b6eedd580d49604014118171c6da62849752d53
2022-07-04 16:00:39 +02:00
jenkins-bot 90a5f8aaad Merge "Reuse hard and soft action handlers" 2022-07-04 13:51:38 +00:00
Adam Wight 6c16f93504 Prevent highlighting the first parameter when clicking to remove
Tabbing into the parameter select list should highlight the first
parameter, but focusing a checkbox by clicking it to uncheck should
not trigger this highlighting.

Copied from the superclass method.

Bug: T312014
Change-Id: Ia1fd450bad4861eb2815ca21eae69ee31e40ac08
2022-07-04 15:50:56 +02:00
Svantje Lilienthal 788e21e0a4 Clicking template or parameter name scrolls it to top of dialog
Only works with changes in OOUI core. See https://gerrit.wikimedia.org/r/c/oojs/ui/+/753987

Depends-On: Ie822dc87bc5748985de5637cb35f1940837f64d3
Bug: T299036
Change-Id: Idaccc7c95d67abe14621eabb7725ba07e449ab1e
2022-07-04 15:23:34 +02:00
Esther Akinloose b69c89e378 selenium: Enable all tests
EditPage.activationComplete() was flaky.
We have replaced it with EditPage.toolbar.waitForDisplayed().
We have run all the tests 100 times in a row in CI and it works fine.

Bug: T310772
Change-Id: I321b4114ca03ebd02a79d8bd3863ea0e68494dc2
2022-07-04 12:22:38 +00:00
Adam Wight c2e111239b Reuse hard and soft action handlers
New sidebar events take a `soft` parameter allowing reuse between
"hard" and "soft" selection and parameter add.  The "hard" variant
causes a content-pane focus.

Bug: T311987
Change-Id: Ic49718840ae56eb4cfab01ce964a2fbc2d8db63b
2022-07-04 13:42:34 +02:00
Adam Wight 14deb729a4 Rewrite handlers using canonical setPage
More idempotent approach to state change, using a common function
that has all the side-effects.

Bug: T311987
Change-Id: I13e64ff5262295a60c28572855cfe36da7c3ff41
2022-07-04 13:41:19 +02:00
Adam Wight 8448f513a4 Two-pane layout setPage has all the desired side-effects
This becomes the canonical method to call when we want to update the
template dialog to select a new item.

Bug: T311987
Change-Id: Ie7880bfde41b77f0e6367cc8e3a78edb299391ce
2022-07-04 13:31:06 +02:00
Adam Wight 0c4716aaaf Replace event wiring for stackLayout.set with explicit call
Call the handler directly.  This avoids the `set` event handling for
add and remove parameters, causing minor behavior changes:

Moves the "reselect" logic after removing pages, from StackLayout to
the two-pane layout class.

Bug: T311987
Change-Id: I46454d184d4718bed45caf9f41487364611f1f44
2022-07-04 13:26:56 +02:00
Adam Wight a104d0c888 Use local state rather than stackLayout.currentItem
Bug: T311987
Change-Id: I62ddc013ae255bcbaf3478c7f0949238245988e6
2022-07-04 10:40:35 +02:00
Adam Wight 3e2d594148 Minor doc updates
Change-Id: I87156e203c131545c463bfa2307b2d8f7c5507ca
2022-07-04 10:40:02 +02:00
Translation updater bot bfea60d921 Localisation updates from https://translatewiki.net.
Change-Id: I4c66ef05e3b5629afa6b7d5ac010335354f18e7d
2022-07-04 08:23:09 +02:00
jenkins-bot b902ad7882 Merge "Gallery image: Hide more attributes when diffing" 2022-07-01 22:33:56 +00:00
jenkins-bot e2ecb537e9 Merge "Gallery image: Use thumbUrl if src is not set (new images)" 2022-07-01 22:33:54 +00:00
WMDE-Fisch 4371c4fde2 Adding lines in doc comments
Change-Id: Ie9a8ae32b4fdf476ad607f805c91357d824474a4
2022-07-01 16:25:40 +02:00
Ed Sanders d1effc5c16 Gallery image: Hide more attributes when diffing
Only 'altText' should be described, everything else
is computed or, in the case of `resource`, results in
nodes being incomparable.

Change-Id: I586b67a0cfa30fae10a86fe3791f7e532c0ed754
2022-07-01 13:14:49 +01:00
Ed Sanders ce9619618b Gallery image: Use thumbUrl if src is not set (new images)
Bug: T310623
Change-Id: I5ded2dcf1864e0cb4a3df64b3b8bc873f7a35fe7
2022-07-01 13:14:03 +01:00
Adam Wight 1653815e8c Rename event to be descriptive, not prescriptive
Events should be named based on what happened, not what the
side-effect will be.

Change-Id: I563db48181e1db79ca22ef2ba1e25d5186976110
2022-07-01 12:42:23 +02:00
Adam Wight d93e35a0d1 Reconnect "soft select" event
Bug: T311296
Bug: T311711
Change-Id: Ic4ee673d339ec0b4b5f54f3d7a878e3ab03f7113
2022-07-01 12:30:01 +02:00
jenkins-bot fe8dd8f604 Merge "Use short style to wire event reemission" 2022-07-01 07:57:03 +00:00
jenkins-bot 22c402356a Merge "Remove set event with no listeners" 2022-07-01 07:57:01 +00:00
jenkins-bot 0c49b144d9 Merge "Fix gray highlighting for parameters" 2022-07-01 07:24:53 +00:00
Translation updater bot 11f48d1e1a Localisation updates from https://translatewiki.net.
Change-Id: I4fe9881134214b767ebe364a2a20d0ba969df1fd
2022-07-01 08:54:02 +02:00
Adam Wight d592c75623 Use short style to wire event reemission
Change-Id: Id39ecc8e96627a228c8da91628f769cab42f71bd
2022-06-30 15:55:17 +02:00
Adam Wight 68e2f6279a Remove set event with no listeners
Change-Id: I4bdabf0129b65d76281f9f18b92ba202bb9840d3
2022-06-30 15:55:17 +02:00
jenkins-bot 80344da282 Merge "Select parameters like templates" 2022-06-30 13:54:50 +00:00
Andrew Kostka 9821f860e8 Fix gray highlighting for parameters
Bug: T311204
Change-Id: Iff4c5deff67c74496fe98fa3ee58b97ff9a7c847
2022-06-30 15:20:14 +02:00
Svantje Lilienthal b4ed246db2 Re-add refreshControls to TwoPaneDialog
809881 removed one refreshControl too many

Bug: T311296
Change-Id: I72eb03e3db948213117a94d86d79401448759342
2022-06-30 14:31:13 +02:00
Adam Wight aa7501a8e3 Select parameters like templates
Bug: T311204
Change-Id: I61294087963f4659f065f011a2cac350cfd35dda
2022-06-30 14:23:41 +02:00
jenkins-bot a9ac3052db Merge "Rely on selection changed event for updating controls" 2022-06-30 08:18:35 +00:00
jenkins-bot 7570742468 Merge "Calculate controls using sidebar selection" 2022-06-30 08:00:15 +00:00
jenkins-bot df26e6f9c3 Merge "Template dialog controls default to disabled" 2022-06-30 07:28:48 +00:00
Adam Wight 7d023e2dce Rely on selection changed event for updating controls
This event makes other calls redundant because it's always sent from
setPage and onReplacePart.

Bug: T311296
Change-Id: If214a713ed7299320d499c3e5687eda013fe0aab
2022-06-30 08:55:38 +02:00
Adam Wight 699c73893d Calculate controls using sidebar selection
In an important use case (spacebar selection of sidebar parts), the
content pane selection isn't updated.  This patch switches to read
the sidebar selection rather than the content pane selection.

Bug: T311296
Change-Id: I684a9edf04b6615cc840bbb89e8c1d03a0ab8e94
2022-06-30 08:53:15 +02:00
Adam Wight d32303587e Template dialog controls default to disabled
If nothing has been selected, the action buttons should be
initialized in a disabled state.

Bug: T311608
Change-Id: I32fee0d73f6e13e09dc421c944df73b79e0260bb
2022-06-30 07:55:25 +02:00
Thiemo Kreuz 5077780216 Remove all BookletLayout OutlineItem code
No longer need to manage the connection between outline items and
content pane pages.

Bug: T310866
Change-Id: I8dae7efa18e97ce5e1c84d963f1a32f09dd7e7cb
2022-06-30 05:29:46 +00:00
Adam Wight d6ebbf0ea3 Remove outlineSelectWidget (old sidebar)
It seems that the controls widget was the only side-effect we still
needed for maintaining existing behavior.

Bug: T310866
Change-Id: I507dacef4e56946b836b0fca31effce611260aec
2022-06-29 17:08:51 +02:00
Thiemo Kreuz 767a928a23 Move remove button toggle code to more appropriate place
This patch does a few closely related things:
* Replace a direct dialog → sidebar access with dialog → layout →
  sidebar.
* Move the misplaced removeButton.toggle() to a more appropriate
  place.

Bug: T311069
Change-Id: I5a2802aab587a6f7de4681bce4e9961a064ef8ee
2022-06-29 16:31:25 +02:00
jenkins-bot 5720489b3a Merge "Remove unused code and properties from forked ControlsWidget" 2022-06-29 10:45:02 +00:00
Thiemo Kreuz 269770fe76 Remove unused code and properties from forked ControlsWidget
Bug: T311296
Change-Id: I8eb279f05901ace48cf9cc70ac8ce0ee6e9b40e1
2022-06-29 10:26:26 +00:00
Adam Wight 3326eb7240 Drop unused chainable signatures
Change-Id: If0de666db6004f08fbd3a08a0414b66184bb95a0
2022-06-29 10:09:10 +00:00