Commit graph

13722 commits

Author SHA1 Message Date
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 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
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
Bartosz Dziewoński 2239f3cc20 Do not grey out page title while loading on Vector 2022
Follow-up to Idae6755c90eacaab1a9daa88c6e28850d427810c. These styles
still used #content instead of the new way of specifying the target
container.

Extra cleanup:
* Don't apply custom styles to #firstHeading when it's outside of
  the target container
* Remove unnecessary rule (it was added in 6d8fbd8221 to support
  an absolutely-positioned loading toolbar, but it is no longer
  positioned that way)

Bug: T310839
Depends-On: Idb2a743c93316786d6d36e1989cf6620a6092281
Change-Id: Ib5e8f98eacf763e360fae79337d3f2733b1a101b
2022-06-23 17:32:30 +00: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
Jan Drewniak a3e28fa0bf Rename data-ve-target-container attribute to data-mw-ve-target-container
This data attribute, used to give skins the ability to position VE on the
page, should be prefixed with `data-mw` to prevent it being inserted on
the page by user generated content.

Bug: T310197
Change-Id: Ia6f87535f11ccc7aadb26b7dd9e1ac8a867c377c
2022-06-23 10:49:07 -04:00
jenkins-bot 8fb649e979 Merge "Drop unused "continuous" configuration" 2022-06-23 12:29:57 +00:00
jenkins-bot e7e0b0bcc2 Merge "Remove unused return value from addPromptedParameters() method" 2022-06-23 12:27:46 +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
Thiemo Kreuz a38762f90c Remove unused return value from addPromptedParameters() method
Bug: T310859
Change-Id: I192cfcf3f603d7599d3600a1a575ed789ae1fa67
2022-06-23 13:57:18 +02: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 6fffc1ac2a Merge "Introduce data-ve-target-container as a skin-customizable VE target" 2022-06-23 00:09:59 +00:00
Jan Drewniak 2e42a46654 Introduce data-ve-target-container as a skin-customizable VE target
Defines an HTML attribute, `data-ve-target-container` that gives skins
the ability to choose which element they want to act as VE's target.

This attribute addresses a need in the Vector 2022 skin, where the
default selector, `#content` was no longer suitable to act as VE's
content container and more flexible approach was needed, so that the
skin itself could define which element VE should use.

This selector falls back to `#content` as was the case previously.

Additional change:
Update modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-vector.less
to account for the planned change to retain line between tabs and
toolbar in new layout.

Bug: T310197
Change-Id: Idae6755c90eacaab1a9daa88c6e28850d427810c
2022-06-22 20:18:12 +00: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
jenkins-bot df597c81e1 Merge "Different margins for different last elements in the templates dialog sidebar" 2022-06-20 14:57:52 +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 579b9896ae Merge "DesktopArticleTarget: Fix fade-in of toolbar tools" 2022-06-20 12:32:10 +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