Commit graph

19441 commits

Author SHA1 Message Date
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
Bartosz Dziewoński 61a7269261 Update VE core submodule to master (c5804af0a)
New changes:
a035f62f6 Localisation updates from https://translatewiki.net.
c5804af0a Handle Shift+Enter at the start/end of pre nodes too

Bug: T60773
Change-Id: I2fa0bda7ea2a831f62c5df428d0352bb31c4d823
2022-06-27 23:23:38 +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 1e094a8868 Merge "Fix broken error message 'visualeditor-saveerror'" 2022-06-27 19:07:18 +00:00
jenkins-bot 4eac26c3cd Merge "Use $.html to refresh page after save" 2022-06-27 17:53:26 +00:00
Ed Sanders 327bd736c5 Use $.html to refresh page after save
Pre-parsing with $.parseHTML is not required as we
1) no longer modified the DOM before appending
2) trust the HTML coming from the API

Change-Id: If549a0e647ce830d4f5de2bb94c08a895e460667
2022-06-27 17:34:19 +01: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
jenkins-bot 198616cdd1 Merge "Add initial tests for ve.ui.MWTwoPaneTransclusionDialogLayout" 2022-06-27 08:51:43 +00:00
Translation updater bot bf6eecb1e4 Localisation updates from https://translatewiki.net.
Change-Id: I18e3adacec441e1678e5214e9ba9fd42aecbeddd
2022-06-27 08:18:54 +02:00
jenkins-bot 93b18174c1 Merge "Avoid preloading base translation page in editor" 2022-06-26 19:17:17 +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
Umherirrender ab823c0115 Replace deprecated WikiPage::factory
Remove WikiFilePage instance check, isLocal exists also on WikiPage and
newFromTitle never returns null

Bug: T297688
Change-Id: I925771a84afe4402fdb0f201c0b562c7028c44b2
2022-06-24 23:06:39 +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 48863bc5bd Merge "Order transclusion CSS/LESS files alphabetically" 2022-06-24 13:13:41 +00:00
jenkins-bot 958082378b Merge "Merge set handler into two-pane class" 2022-06-24 13:11:21 +00:00
WMDE-Fisch a556661fc7 Order transclusion CSS/LESS files alphabetically
Should have no dependencies on the order in that case.

Change-Id: I9f0dacbc76875f27e6def2b883b0b22bfda6d055
2022-06-24 14:51:17 +02: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
Translation updater bot 28f3e9ac0b Localisation updates from https://translatewiki.net.
Change-Id: Ib564d607b009515524f6b8ae8c8d01c0dae535fb
2022-06-24 09:31:40 +02:00
Bartosz Dziewoński 5e58b97804 Update VE core submodule to master (2a341d152)
New changes:
83024d909 Add unit tests for ve.init.ListStorage
082df611e DummyPlatform: Mock system Storage object as well as SafeStorage wrapper
2a341d152 Localisation updates from https://translatewiki.net.

Change-Id: Id77d0efcebcf3a3a42d404fdc23bde23470ef645
2022-06-23 22:26:26 +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
Translation updater bot 72748f59d5 Localisation updates from https://translatewiki.net.
Change-Id: If0afe0972a3f03b6b07018e4f521082d0bfc38f0
2022-06-23 09:04:29 +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
jenkins-bot 8793ef69b4 Merge "Use SkinTemplateNavigation::Universal" 2022-06-22 22:57:33 +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