Commit graph

3420 commits

Author SHA1 Message Date
Andrew Kostka d5b8107902 Use "Add template" label in the sidebar and as the header
Bug: T311107
Change-Id: Ib85c08c5d72e621a7687dc393b2f8d9443f13b06
2022-07-06 10:55:43 +00:00
Thiemo Kreuz 217885013a Refine height calculation of template parameter docs
Instead of using a potentially weird fractional value like 3.2 lets
use the floor(ed) value, e.g. 3. Reasoning: These fractions are not
from text lines but optional margins between some of the lines. These
margins should not be counted.

Also increase the cut point from >=3 to >3. This is much closer to
the original specification that talked about "2 lines plus x
characters". See T273426. These "x characters" are the 3rd line.

Bug: T310775
Change-Id: Ib5d1642d7967593dd5f13e556c6244fc44677af4
2022-07-06 10:40:51 +00:00
Andrew Kostka 08e8581944 Use full dialog width for add template input on mobile
Bug: T311109
Change-Id: I5b6beced37d569689470d19361420bead38d18cb
2022-07-06 11:52:49 +02:00
jenkins-bot 4730987f2c Merge "Remove selection when selected parameter is unchecked" 2022-07-06 08:11:01 +00:00
WMDE-Fisch bc4fcfa04a Remove selection when selected parameter is unchecked
Adjusting some methods to support the usecase.

Bug: T312085
Change-Id: I4b97ab912f9ac0046f72167c3b573ee8e14e58d9
2022-07-05 19:22:36 +02:00
jenkins-bot ea21d8eacc Merge "Restore selection after keyboard parameter navigation" 2022-07-05 13:39:22 +00:00
jenkins-bot a5b9538a6b Merge "Drop unused active state" 2022-07-05 13:16:18 +00:00
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 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
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
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
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 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
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
Adam Wight 2ff0f6d5f2 Move custom buttons into outline controls
Bug: T311296
Change-Id: I5cc45f6a05ca029e319e04e76f6e35bfd5b506a6
2022-06-29 10:08:35 +00:00
jenkins-bot 3018a57a10 Merge "Create new refreshControls function in TwoPane" 2022-06-29 10:06:52 +00:00
Svantje Lilienthal ead1e258d5 Create new refreshControls function in TwoPane
Bug: T311296
Change-Id: I5a06238a7cf58189616f1b812bec74e99ef7922f
2022-06-29 11:44:07 +02:00
WMDE-Fisch 1ec50247f2 Remove deprecated CSS from old add parameter search
We're not implementing a search widget with results anymore. It's
a leftover from the cleanup after feature flags got removed.

Bug: T310859
Change-Id: I9c177ae92a7d3e13a4fff248a6c86f1aab89f82c
2022-06-28 14:37:41 +00:00
WMDE-Fisch ff7eaf5a9b Move MWAddParameterPage styles to own file
Change-Id: I829de89445fd1927209506f5cfbdd9b796953bfe
2022-06-28 14:37:35 +00:00
jenkins-bot fea14dc60b Merge "Remove CSS rule for hiding fieldset icons and lables" 2022-06-28 14:34:59 +00:00
jenkins-bot 4352590e72 Merge "Move MWTemplatePlaceholderPage styles to own file" 2022-06-28 14:32:01 +00:00
jenkins-bot fe532072f6 Merge "Fixes for focusPart" 2022-06-28 13:56:09 +00:00
Adam Wight d138cd04bf Fixes for focusPart
We missed some usages.  Follows up on I5f05bc119dc213d8

Change-Id: Iaecb804300c37d43108a14e8db0068deb58f503c
2022-06-28 15:31:54 +02:00
Adam Wight 8d47e7119c Hide access to outlineSelectWidget
Other classes no longer need this function.

Bug: T310866
Change-Id: I368bd797c31a4ec600cfbee674aebf27210a1ee9
2022-06-28 15:14:34 +02:00
jenkins-bot c29690b1f1 Merge "Move template dialog sidebar container into forked BookletLayout" 2022-06-28 12:56:24 +00:00
jenkins-bot 8a2632a846 Merge "Move last remaining sidebar event handler into forked class" 2022-06-28 12:54:30 +00:00
jenkins-bot 10561120cf Merge "Move sidebar-related event handlers down into BookletLayout fork" 2022-06-28 12:54:28 +00:00
WMDE-Fisch 9a80c32f18 Remove CSS rule for hiding fieldset icons and lables
The original intend of that rule was not clear to me and it seems
it got dragged along for some time. I checked the DOM in the
collapsed state to see where this could even apply in the new
interface and found no other place than the one where we overwrite
it again.

I guess it can go away.

Change-Id: I2886db33c5f06d1c49acc4743c9acc198339de36
2022-06-28 14:24:53 +02:00
WMDE-Fisch ecb00afdab Move MWTemplatePlaceholderPage styles to own file
Change-Id: I5eb98c58a8f429622273fbead492bcca12177aee
2022-06-28 14:10:44 +02:00
jenkins-bot 18924032e2 Merge "Move CSS in MWTransclusionDialog closer together" 2022-06-28 10:05:04 +00:00
Adam Wight 978cefa13b Move template dialog sidebar container into forked BookletLayout
Bug: T310867
Change-Id: I7d2a882b99e4796ecc6594b1cfb638eecd985de2
2022-06-28 12:02:01 +02:00
Adam Wight 2dd9405e38 Move last remaining sidebar event handler into forked class
These are internal to the two-pane layout and sidebar, so the dialog
doesn't need to be involved.

Bug: T310866
Change-Id: I5f05bc119dc213d8e31db62a3808a2fadaf35d99
2022-06-28 11:35:22 +02:00
jenkins-bot a4024d85e0 Merge "Simplify OutlineControls CSS a little more" 2022-06-28 09:29:50 +00:00
Thiemo Kreuz 31d75a1738 Move sidebar-related event handlers down into BookletLayout fork
Bug: T311069
Change-Id: I95fd2637ef4c39f8547e676dcfb5de333d5278e9
2022-06-28 11:27:02 +02:00
jenkins-bot 1ce7340e55 Merge "Remove old code to focus first input" 2022-06-28 09:19:36 +00:00
WMDE-Fisch b04231bc46 Move CSS in MWTransclusionDialog closer together
Change-Id: I96c21479066f806ed1ec40f38a264ba76230d42c
2022-06-28 10:59:56 +02:00
jenkins-bot 51cd862fce Merge "Adding canGoBack to the properties" 2022-06-28 08:55:53 +00:00
Thiemo Kreuz 77ce583167 Simplify OutlineControls CSS a little more
This is a direct follow-up to I7f22e4b. I found that the way the
margins have been arranged became a little more complicated with
I7f22e4b. This patch tries to go back to the – I think – simpler way
it was done before.

It should look the same as before down to the pixel.

Bug: T311223
Change-Id: I2c7789922078fa98f15f0b65de4c0efdf878a13a
2022-06-28 10:50:33 +02:00
WMDE-Fisch bc1e3efa4b Adding canGoBack to the properties
As disussed in Id23d3ac5e1715387c78916adeb8ca5f675005a5c

Change-Id: I1368199a4b709d5634ca6e20f04323a0227065be
2022-06-28 10:35:44 +02:00
Adam Wight d5f2767605 Remove unused parameter to focus
The one usage of this wasn't working.  FIXME: maybe we want to
restore the behavior, to focus the first parameter in the dialog
after opening.

Bug: T310866
Change-Id: Ibe0151fbedb3a9716bb231b5d398c4ae670fd667
2022-06-28 09:54:39 +02:00
jenkins-bot e8ece4da06 Merge "Drop unused "editable" configuration from template dialog" 2022-06-28 07:28:12 +00:00
jenkins-bot 8c94e2b5aa Merge "Move template dialog sidebar clearing to more appropriate place" 2022-06-28 07:13:27 +00:00
Thiemo Kreuz b0ce363e2b Drop unused "editable" configuration from template dialog
This defaults to false. It looks like this default is used in the
MWTemplateDialog base class. However, it also looks like this base
class is never used on it's own. All users we know use the subclass
MWTransclusionDialog where "editable" is true.

https://codesearch.wmcloud.org/search/?q=%2C%5Cs*ve%5C.ui%5C.MWT(emplate%7Cransclusion)Dialog&files=%5C.js%24

In the process I also remove some comments that literally repeat the
code and don't add any knowledge because of this.

Bug: T310867
Change-Id: Ie245aab80d1e77a8406f5591062e9cf49fd9613f
2022-06-28 09:11:31 +02:00
jenkins-bot e0112df947 Merge "Unhoist variables & remove dead code from BookletLayout fork" 2022-06-28 07:07:36 +00:00
jenkins-bot 5d2d36f9d7 Merge "Remove dead code (not) selecting first template parameter" 2022-06-28 07:03:22 +00:00
jenkins-bot 6641f7da85 Merge "Move .addPromptedParameters() calls to more canonical places" 2022-06-28 06:59:49 +00:00
Thiemo Kreuz 0a5b47eee3 Unhoist variables & remove dead code from BookletLayout fork
Declaring variables only when they are needed makes the code more
readable.

Bug: T310859
Change-Id: I454cc622dc5e83ec2c148d0bf59c62124dbd85e8
2022-06-28 08:52:24 +02:00
Thiemo Kreuz fd0b32fe31 Remove dead code (not) selecting first template parameter
This code was meant to select the first parameter of a template the
moment it is added. It's at least partly broken because it doesn't
consider the so called "prompted" parameters that have been added
just a few lines above. It's a questionable feature anyway. We are
going to refine all focus-related behavior anyway. Let's remove this
broken stuff and reimplement it later (probably in a different place)
when we continue working on this.

The FIXME was added in I720ce1a.

Bug: T311223
Change-Id: I1801efe38387b5e7a1b76417c1e5d7db4e4b96d0
2022-06-28 08:42:59 +02:00
Thiemo Kreuz 76f563c929 Move .addPromptedParameters() calls to more canonical places
This was done in 3 rather "random" places:
1. Whenever a template is manually added. But rather late, after the
   template was added, in an event handler that is about focus
   behavior. It should not continue to manipulate the template that
   was just added.
2. When the dialog opens with a template preloaded by name, as it is
   done from the citation menu.
3. When the dialog is about to finish loading.

This patch fixes 2 issues:
* Get rid of a duplicate call (number 2 and 3) when using the
  citation menu.
* Move number 1 to a place where it's executed much earlier, and
  only when the user clicks "add template" in a template placeholder.
  There is no other way to add a template to an existing transclusion,
  but it's still a more appropriate place I feel.

Bug: T311069
Change-Id: I8a65ad703b95ba2092e9ef73493e9903e96b0dd6
2022-06-28 08:40:24 +02:00
Adam Wight 28bdc0a9fb Remove old code to focus first input
This still works for a dialog with just the template placeholder,
because the page is already chosen as "current" in the stackLayout.

Bug: T310866
Change-Id: Ibc1d33b02d34f70548d9f7365e085847ef0b2a51
2022-06-28 08:27:04 +02:00
WMDE-Fisch f1d4793862 Cleanup CSS for the forked OutlineControls
Includes moving CSS that already moved from the TemplateDialog CSS
file to the DialogLayout LESS file.

Width and height had no effect. Neither on desktop/mobile. I guess
the control's height covers for that. Float could be removed due to
the flex layout.

Some more specific rules could cover for the !important overrides.

Change-Id: I7f22e4be37c8f227845aed97281faefe26241091
2022-06-27 21:10:21 +02:00
jenkins-bot b44132753b Merge "Remove unused resetScroll function" 2022-06-27 15:11:20 +00:00
jenkins-bot d34c95e4ff Merge "Fork OutlineControlsWidget" 2022-06-27 15:02:14 +00:00
Adam Wight bbe0356f43 Remove unused resetScroll function
Also removes some logic that could only be reached when
`this.scrolling` is true.

Bug: T310866
Change-Id: Id60cfd9d72fd0e38872f58386ea0f0b64a268214
2022-06-27 14:50:00 +00:00
Adam Wight 6de61ccf77 Fork OutlineControlsWidget
Bug: T311223
Change-Id: Id2f9fc89c607c8001e8b150add1ffbcaa318993a
2022-06-27 16:46:11 +02:00
Adam Wight b1a12aeaab Simplify focusing a parameter
We can use setPage, thereby removing a dependency on the
OutlineSelectWidget.

Bug: T310866
Change-Id: If097c9218fe56e63d9c003b10789c94513c20c93
2022-06-27 13:36:46 +02:00
Adam Wight 33d9f9958b Remove findClosestPage logic
This causes one small behavior change: when deleting one of several
wikitext transclusions or a part following a template without
parameters, the selection would previously be set to the *previous*
part, and now it's the *next* part.  This is arguably more consistent
with the behavior when removing eg. templates with parameters, after
which the next part is selected.

Doesn't affect removing parameters.

TODO: We might want to restore the already-broken behavior to focus
the first parameter of a newly-inserted template.

Bug: T310866
Change-Id: Ic5f47e31512d1a3949caf60613bd05b9a3bdf478
2022-06-27 13:36:44 +02:00
jenkins-bot 36e534719c Merge "Remove unused events from forked BookletLayout" 2022-06-27 08:58:39 +00:00
Andrew Kostka 54f4b47794 Add initial tests for ve.ui.MWTwoPaneTransclusionDialogLayout
Bug: T311116
Change-Id: Ie4e1f9f203055f68add6fea0cf04b03215a32942
2022-06-26 17:15:11 +02:00
Thiemo Kreuz 8788077754 Move template dialog sidebar clearing to more appropriate place
This place is much better in so far that it much more obviously gives
us the guarantee that the sidebar and the content pane are always in
sync.

Bug: T311069
Change-Id: I01a7914fcba5d573abb957d0e34fa895874bd94e
2022-06-24 15:24:58 +02:00
jenkins-bot 958082378b Merge "Merge set handler into two-pane class" 2022-06-24 13:11:21 +00:00
jenkins-bot 2fd536469b Merge "Reduce barely used "autoFocus" code in template dialog" 2022-06-24 12:47:07 +00:00
jenkins-bot 5d1486fadf Merge "Merge some CSS rules into the layout less file" 2022-06-24 12:37:52 +00:00
jenkins-bot e54d380992 Merge "Remove newSidbar CSS and merge CSS rules" 2022-06-24 12:32:20 +00:00
Adam Wight 32a14d888b Merge set handler into two-pane class
Bug: T311069
Change-Id: I4cb7e63349904588bb27541d176378aa874d0a63
2022-06-24 12:32:16 +00:00
Thiemo Kreuz 5201c03d04 Reduce barely used "autoFocus" code in template dialog
According to my test one of the two places where this property was
used is impossible to reach with the property set to false. This is
the one I remove in this patch.

This also removes a related method that is entirely unused.

Bug: T310867
Change-Id: I9579a5d894d60560cec77dad7f1e796f8dfca06f
2022-06-24 14:01:57 +02:00
WMDE-Fisch a80f662cfb Merge some CSS rules into the layout less file
Includes adding a less file for minerva layout rules. To make best
use of the less shortcuts and avoid duplication, some selectors
have been slightly changed. Outcome should still be identical.

Change-Id: I92179ecf6045c938cace0e7e809b7ad4cf035727
2022-06-24 13:50:59 +02:00
WMDE-Fisch c295a731ec Remove newSidbar CSS and merge CSS rules
In some cases ve-ui-mwTransclusionDialog-newSidebar could just removed
when there are specific enough classes present so that we can be
sure to not overwrite rules outside our use case.

e.g with the new ve-ui-mwTwoPaneTransclusionDialogLayout-stackLayout

Note that this will also remove some right padding on descriptions
where it seems that it was applied for no reason.

Bug: T310859
Change-Id: I6612fe1cb2ea6bd75e9bc3e6f4d6d8d0c4addc63
2022-06-23 17:42:24 +02:00
jenkins-bot 8fb649e979 Merge "Drop unused "continuous" configuration" 2022-06-23 12:29:57 +00:00
jenkins-bot 65170a656a Merge "Push ownership of the sidebar down into the two-pane layout" 2022-06-23 12:20:12 +00:00
Adam Wight 9f04a2516e Drop unused "continuous" configuration
Bug: T310867
Change-Id: I6773f657d2ad08bb9cdfb1fe2d480fee1d175412
2022-06-23 12:12:05 +00:00
jenkins-bot a536a66799 Merge "Never attach outlineSelectWidget to the DOM" 2022-06-23 11:24:21 +00:00
Adam Wight 90179c48ed Push ownership of the sidebar down into the two-pane layout
Leaves a reference in the TemplateDialog so that we can slowly
migrate the many usages.

Makes no other changes to how the sidebar is managed (yet!).

Bug: T311069
Change-Id: I45403cd32e3adbe357ebad7bbc851f60d92751e5
2022-06-23 11:22:08 +00:00
jenkins-bot b14f3a5965 Merge "Remove duplicate "add parameters" method from template dialog" 2022-06-23 11:17:12 +00:00
Thiemo Kreuz 8eb5cd3815 Remove unused events from forked BookletLayout
The only event in use is "set". The others are never used. Which makes
sense. The driver for everything related to adding or removing parts
is the model. This widget is at the receiving end.

Bug: T310867
Change-Id: I4ef7e59ff05cb02aca59b76fdffa4f1fced76e33
2022-06-23 12:55:28 +02:00
Adam Wight b39bb342ec Never attach outlineSelectWidget to the DOM
Bug: T310867
Bug: T310866
Change-Id: I8e3a12693bbe9f91a171484a03316c9d4c94a2be
2022-06-23 10:50:51 +00:00
Thiemo Kreuz 8854d03552 Inline template parameter id to page name connection
It's never used in a different way. A lot of other code depends
heavily on this fact. Let's hard-code it.

Bug: T310859
Change-Id: I65bbaea47341d74b49ce447c896eb2340f730e17
2022-06-23 12:24:08 +02:00
Thiemo Kreuz 14ba08d406 Remove duplicate "add parameters" method from template dialog
The method in the model (where it belongs) was added via Iaf28035 in
2016. The other via I073c585 in 2014.

Bug: T310859
Change-Id: Idea322aec175600e3055a859ca987afc1fe6dd8c
2022-06-23 12:11:12 +02:00
Adam Wight 004adeef80 Switch to forked BookletLayout
Bug: T310865
Change-Id: If6fcac589fcafffd46beba0b7ea6a6bfb6c0061c
2022-06-23 10:33:12 +02:00
jenkins-bot 7010803d0f Merge "Remove CSS applied to .ve-ui-mwTransclusionDialog" 2022-06-22 13:51:34 +00:00
jenkins-bot 9a53083ad9 Merge "Revert workaround for oojs when removing selected item" 2022-06-22 12:15:37 +00:00
Adam Wight 8788e3174d Revert workaround for oojs when removing selected item
This hasn't been necessary since ooui-js Id9cf086771, it was to prevent the
BookletLayout from scrolling to the top when removing the currently
selected item.

Reverts I0c1fddfa32b76621a9f1328c8173f0158386aee8

Change-Id: I5752fb273d0e2a3f0e7b6a044e69d68dc3e4b657
2022-06-22 11:57:21 +00:00
Adam Wight 15ef2dc3c6 Remove inaccessible ARIA annotation from old sidebar
This was added via I3b792ff. It's about the old sidebar which isn't
accessible any more.

Bug: T311069
Change-Id: I29919285255a84bd58aa06ee1b2816d25a8112a6
2022-06-22 13:44:23 +02:00
Thiemo Kreuz efc50591c1 Inline private helper functions in MWTransclusionNode
Change-Id: Ie14ad29e214f3440f60a7e13ed660fff85c7c448
2022-06-22 10:43:11 +00:00
WMDE-Fisch 8f80f1189e Remove CSS applied to .ve-ui-mwTransclusionDialog
This class was (accidentally?) removed in 2014 so the styles had
no effect since then. I decided on removing the code that was
unused for 8years. - Alternativly the class could be re-added but
I'm not sure if it makes sense.

See I4b2ba31bed5c4f80940623702d635cacd19e0a66 where this got lost.

Change-Id: Ifcbfc4273e41c08431c6f5b0ca2f2b6d25c34edd
2022-06-22 12:06:04 +02:00
jenkins-bot 1ba1bc76f4 Merge "Remove dead code in MWTemplatePage" 2022-06-22 06:29:47 +00:00
WMDE-Fisch 11f5f6cb59 Remove dead code in MWTemplatePage
Bug: T310859
Change-Id: Ie55d82fb6f3be0b90b8f42aecdd761624b94afca
2022-06-22 00:20:00 +00:00
Thiemo Kreuz a04d56b6a6 Remove some "pocSidebar" related pieces from template dialog
This is a direct follow up for what was done in I83bbb48.

Bug: T310868
Change-Id: Icd9ed2e8f93b269d0d2d8b0fcfae4febab5e45de
2022-06-21 15:50:23 +00:00
jenkins-bot 63090845b6 Merge "Remove dead code in MWTemplateDialog" 2022-06-21 14:52:16 +00:00
jenkins-bot b2bd7516f1 Merge "Remove dead code in MWTransclusionDialog" 2022-06-21 14:49:18 +00:00
WMDE-Fisch ac2e91d1f9 Remove dead code in MWTemplateDialog
Bug: T310859
Change-Id: I04dc450ceb3751e68dc2179a865f45b19a350b43
2022-06-21 16:31:04 +02:00
WMDE-Fisch 8535fa72ab Remove dead code in MWTransclusionDialog
Removing CSS will go into a follow up.

Bug: T310859
Change-Id: I05a0c12ab98ca428aca64181469d8c9cf6311f03
2022-06-21 14:22:47 +02:00
Adam Wight 9f2c8f0928 Copy BookletLayout implementation from ooui-js 0.44.0
Bring over the ES and Less implementation from ooui-js and rename to
fit it into the VE hierarchy, but don't make any other substantial
changes.

Inlines the wikimediaui-themed styles, ignoring apex styles, and
hardcodes the Less constants.

Bug: T310865
Change-Id: Id43dafdf11c5df0d7d78112e5f62a8599bdbc879
2022-06-21 11:06:44 +02:00
jenkins-bot 5bf86bc26d Merge "Rename template dialog pocSidebar" 2022-06-20 15:04:22 +00:00
Svantje Lilienthal a5831da808 Rename template dialog pocSidebar
Bug: T310868
Change-Id: I83bbb480163532ff56ba6a3a36322d107c737cac
2022-06-20 16:12:50 +02:00
Svantje Lilienthal 7df465971f Different margins for different last elements in the templates dialog sidebar
Bug: T309584
Change-Id: Ife9f1b29f6ba5e61371286cdc53d0dc9196c7cb8
2022-06-20 13:36:54 +00:00
jenkins-bot 8e46912b1b Merge "Fixing css in case the last element has text or checkboxes" 2022-06-20 11:50:56 +00:00
Svantje Lilienthal 3d2d747e50 Fixing css in case the last element has text or checkboxes
Bug: T309584
Change-Id: Id47c5c3e0699d45612d7bd641753afdbf831ce1f
2022-06-20 12:25:10 +02:00
jenkins-bot 9d3ebeba60 Merge "Remove invisible stuff from BookletLayout OutlineItems" 2022-06-20 10:09:10 +00:00
jenkins-bot db6852c1a5 Merge "Bold parameters that contain some value" 2022-06-20 10:04:57 +00:00
Thiemo Kreuz d5857c20f5 Remove invisible stuff from BookletLayout OutlineItems
Technically the old BookletLayout sidebar is still there. But it's
never visible, effectively dead, and meant to be removed. This patch
just empties the OutlineItems of all template dialog related pages
without actually disabling the old sidebar.

Note this partly reverts Ie57f462.

Bug: T310859
Bug: T310866
Change-Id: Ic0b7d703f369045ed342426563f8eeb3e47046db
2022-06-20 09:31:53 +00:00
jenkins-bot 1962bf6dda Merge "Remove dead code in MWTemplatePlaceholderPage" 2022-06-20 08:53:46 +00:00
WMDE-Fisch 6396b030d5 Remove dead code in MWTemplatePlaceholderPage
Bug: T310859
Change-Id: I04de9c4bd3828e8769136d5776037e927ba7b4ab
2022-06-20 10:30:31 +02:00
jenkins-bot 30bd135a94 Merge "Remove small pieces of dead code from MWParameterPage" 2022-06-20 08:29:38 +00:00
WMDE-Fisch 5dd32ea95d Bold parameters that contain some value
Value changes are triggerd and tracked from the parameter page and
change events will be forwared to the outline, if they are relevant.

Initial value is read from the model.

Bug: T308730
Change-Id: I0a3b0faf40aee44889404dcce31d850714360580
2022-06-20 10:27:59 +02:00
jenkins-bot 92feea3068 Merge "Remove dead code in MWTransclusionContentPage" 2022-06-20 08:24:49 +00:00
jenkins-bot c28d3aee70 Merge "Limit template dialog back button to 1 of 3 entry points" 2022-06-20 08:08:43 +00:00
jenkins-bot 30b775e6a2 Merge "Adjust margins in template dialog sidebar" 2022-06-20 07:51:17 +00:00
Thiemo Kreuz b53c38f411 Remove small pieces of dead code from MWParameterPage
Small pieces we forgot to remove in Ie57f462.

Bug: T310859
Change-Id: I29afb65456c4a0a6f482fcdd56785bf6232c0470
2022-06-20 09:49:00 +02:00
Thiemo Kreuz 6458c346d8 Limit template dialog back button to 1 of 3 entry points
There are 3 ways to enter the dialog:
* Editing an existing template.
* Start empty.
* Start with a known template name.

The back button should only ever appear in one of the three modes.

The last mode is the one that's used in the Cite dialog.

Bug: T310602
Change-Id: Id23d3ac5e1715387c78916adeb8ca5f675005a5c
2022-06-20 07:46:03 +00:00
WMDE-Fisch bf2f40e8d4 Remove dead code in MWTransclusionContentPage
The outline item is only used by the new sidebar for the move and
remove flags it seems.

Bug: T310859
Change-Id: Ia74e5b0e3dbf81e745137b181ed34a4d48dac42c
2022-06-17 16:46:30 +02:00
WMDE-Fisch 3273b7e5bd Remove dead code in MWParameterPage
Parameters do not have an "OutlineItem" anymore so the code for
that was completely removed.

Bug: T310859
Change-Id: Ie57f462b8fda4505b99ee5bc9d788908d18d9c64
2022-06-17 12:25:40 +02:00
Thiemo Kreuz 218ac78960 Remove obsolete "search for a parameter" page and widgets
… as well as messages, CSS, and icons that are now unused.

Bug: T310859
Change-Id: I1a2797728788cf1a86299414c1430ded0b362d4e
2022-06-17 10:23:00 +02:00
Thiemo Kreuz 1a2bb91310 Stop using deprecated "ParameterPlaceholderPage" class name
Removing a class name that's going to be deleted from places where
it's not strictly needed, e.g. comments.

Bug: T307188
Change-Id: Ifb14695d05510d2c0e25623afa99c4e84af3aaf9
2022-06-16 18:09:26 +02:00
jenkins-bot a4846c4844 Merge "Adjust margin in mobile template dialog" 2022-06-16 12:52:13 +00:00