Commit graph

9767 commits

Author SHA1 Message Date
jenkins-bot 8be133fe66 Merge "Reduce code duplication in ve.ui.MWGalleryDialog" 2023-08-08 18:55:30 +00:00
jenkins-bot e2efe5079a Merge "Use different tooltips for ca-edit and ca-ve-edit links" 2023-08-03 15:53:21 +00:00
Dringsim cce52fae65 Use different tooltips for ca-edit and ca-ve-edit links
Bug: T337653
Bug: T341424
Change-Id: I3aa79fec71ca2c40a0ece3ca73dd934cf6c9d5a8
2023-08-02 16:36:54 +00:00
Ed Sanders 85d584930f Simplify definition of textStyle group in toolbar
This makes it easier for 3rd parties to insert extra tools
in sensible places.

Change-Id: I6c8d0c96f53655d8f9ae9f01e5d0e1a1678d29a1
Depends-On: Ib8882fa6319915d291b345a69ab95f362739ad7b
2023-07-31 11:06:18 +00:00
jenkins-bot 16623ac116 Merge "Simplify code for showing "Loading" message in template context" 2023-07-31 10:16:40 +00:00
jenkins-bot 7970346855 Merge "build: Upgrade stylelint-config-wikimedia from 0.15.0 to 0.16.0" 2023-07-26 12:54:43 +00:00
jenkins-bot b9f0764711 Merge "Prevent JS code from changing 'skin-view-edit-local' message to 'skin-view-edit'" 2023-07-17 23:54:53 +00:00
jenkins-bot 4231c7a328 Merge "Use different titles for "Edit" and "Edit source" links (section headings)" 2023-07-17 23:07:44 +00:00
James D. Forrester 325ca8a40a build: Upgrade stylelint-config-wikimedia from 0.15.0 to 0.16.0
Change-Id: I993074948832a50997255bd413192c8fdeaf9edb
2023-07-14 13:02:49 -04:00
David Lynch 7d1e9f3eaf When switching from WikiEditor activate VE *after* notifying WikiEditor
This affects logging behavior -- notifying WikiEditor lets its logging
clean up after itself before the init event for VE fires. This was only
an issue when switching *with* changes, because that path resulted in
the timings being cleared, making future events whose timing depended
on the init event have NaN timings.

(This wasn't an issue before we centralized the logging code into
WikimediaEvents, as before that WikiEditor and VE were maintaining
separate timing registries.)

Bug: T237063
Change-Id: Icdb307fa0ce0d1dac3744e4bab41b3588f14777f
2023-07-13 09:32:55 -05:00
沈澄心 70cb30c2a8 Prevent JS code from changing 'skin-view-edit-local' message to 'skin-view-edit'
Change-Id: I33ab649959226a848e1c57fc7c2b7e95a014e4bd
2023-07-13 02:51:12 +00:00
沈澄心 8523b5a876 Use different titles for "Edit" and "Edit source" links (section headings)
Bug: T337653
Change-Id: I6793d458b7a1573de6752177cab5a9bfae9ffca0
2023-07-13 02:47:50 +00:00
Ed Sanders 3d8315f4c3 Simplify code for showing "Loading" message in template context
Instead of passing a "teardown callback" to a specific dialog,
run the command as usual and clear the loading message once
the dialog has successfully opened.

Change-Id: Icacabb298f1a0d7a587ab8b992759b04ff59c5c3
2023-07-12 11:04:59 +01:00
jenkins-bot 82f72cfeda Merge "Merge mobile and desktop save buttons" 2023-07-11 21:34:17 +00:00
jenkins-bot 067cbd3438 Merge "Fix ContextItem documentation" 2023-07-11 21:32:59 +00:00
jenkins-bot 7ae61934a3 Merge "Remove remains of lossy-switching and discard-switching" 2023-07-11 15:34:52 +00:00
jenkins-bot 5574237f47 Merge "Support '&editintro=…' etc. on subsequent loads via page tabs" 2023-07-11 15:33:30 +00:00
jenkins-bot c4fb50b59f Merge "Support '&editintro=…' etc. on back/forward and VE/NWE switch" 2023-07-11 15:33:26 +00:00
jenkins-bot 93427a6708 Merge "Reload page or redirect when saving an edit creates a temp account" 2023-07-11 15:16:56 +00:00
Bartosz Dziewoński 0dddd98b5f Reload page or redirect when saving an edit creates a temp account
Depends-On: I6cdc014fb39d35ce1f091b53dc3a9c4a3c95f9e9
Bug: T338002
Change-Id: I01e13ce1ebab462eeb0ba3847d4205a88965a127
2023-07-10 19:33:16 +02:00
Ed Sanders 4f90ce2594 Merge mobile and desktop save buttons
Use toolbar groups where appropriate.

Change-Id: If4e0d157f04ba741ed4cf891e4183fe351d537b8
2023-07-10 17:06:58 +01:00
Ed Sanders 2a1076e295 Fix ContextItem documentation
* Be more specific about the type of context which a
  context item belongs to.
* Make grammar clearer.

Change-Id: Ic480411cead80a1651c61ce9841dfbdc24a7b915
2023-07-10 14:32:12 +01:00
jenkins-bot 6a2b36bc16 Merge "Drop visualeditor-beta-warning from help menu" 2023-07-08 00:43:18 +00:00
jenkins-bot 76ed447217 Merge "Convert MWPopupTool into MWHelpListToolGroup" 2023-07-08 00:19:14 +00:00
jenkins-bot 329faab1e9 Merge "MobileArticleTarget teardown behavior is upstreamed to MobileFrontend" 2023-07-07 23:49:57 +00:00
Ed Sanders 0f33f7193f Drop visualeditor-beta-warning from help menu
Bug: T341350
Change-Id: I69b886e7681281057c92ddb4175de2998512f0ed
2023-07-07 15:54:15 +01:00
thiemowmde 60409599f5 Reduce code duplication in ve.ui.MWGalleryDialog
Change-Id: I7e3f831b9abd8834cc55460e579261cbf9d5fcff
2023-07-07 10:25:55 +02:00
Ed Sanders d7d344035c Add tag when content added, according to EditCheck heuristic
Bug: T333714
Change-Id: Id806e6d4d856aead4af98d43078c534d4d46c7f0
2023-07-03 14:43:14 +01:00
Ed Sanders ea03287908 Convert MWPopupTool into MWHelpListToolGroup
The popup contains three buttons, one of which already exists
in core as a tool. By converting them all to tools we can reduce
some duplication, and better integrate with other features
that use the tool factory, such as HelpCompletionAction.

Bug: T339153
Change-Id: I81d217bc1ab9a1a6a9bf7c7ad588c2a3216b10db
2023-07-01 11:10:53 +01:00
jenkins-bot 55b04b8820 Merge "Replace the last use of mediawiki.Uri" 2023-06-30 19:57:45 +00:00
jenkins-bot 1d6a748fed Merge "Revert "Revert "Targets: Use align:'after' instead of actionGroups""" 2023-06-30 18:05:44 +00:00
jenkins-bot 19904571b8 Merge "Replace ve-ce-surface-enabled with ve-ce-surface" 2023-06-29 19:32:36 +00:00
Bartosz Dziewoński bbda4fc160 Revert "Revert "Targets: Use align:'after' instead of actionGroups""
This reverts commit e2b5e2a1bb.
It should be safe to re-attempt this now.

Bug: T339317
Change-Id: Ia4ebb11ca162a4e6d985076ea2d2dd914d04fc1d
2023-06-29 18:17:01 +00:00
Ed Sanders d857750e12 Make better use of toolbar groups
Bug: T340751
Depends-On: Ie7ca24cbcd95baa082b3b1cb907354f6da21d93c
Change-Id: Ibcc81c90bc9ba6c5fd012c512daf861973b03b2e
2023-06-29 16:58:38 +00:00
David Lynch 14b32181ea MobileArticleTarget teardown behavior is upstreamed to MobileFrontend
Bug: T334263
Depends-On: If1ad6e88cf595ef3d3e54d41c00f0b79704be043
Change-Id: Idb95bfd2b71f5967396a1f36636b0a155dec2fb2
2023-06-29 09:54:03 -05:00
jenkins-bot 312b1c08ec Merge "Unwrap headings in lists (and <blockquote>) when pasting external HTML" 2023-06-27 18:18:16 +00:00
Sam Wilson c5040810c7 Switch back to oo-ui-element-hidden from mw-diff-element-hidden
Using the OOUI class name is an established pattern outside of
OOUI widgets, so it's easier to stick with it for the diff page
hiding and showing (switching to and from inline/table diffs, etc.).

Depends-On: I805b6b71d8e137eaa3e000b15455557df42af838
Bug: T324759
Change-Id: I0300b40d4e79319592bfc1f57912460f65c7051c
2023-06-26 17:54:46 +00:00
jenkins-bot f22f0d4c68 Merge "React to hooks that are fired when inline switch is present" 2023-06-26 05:29:44 +00:00
hmonroy 4a028f1336 React to hooks that are fired when inline switch is present
React to hooks fired by core when the inline diff type switch is
present. VE needs to be able to disable the inline switch
when 'visual' mode is selected and enable the switch when 'wikitext'
mode is selected. When the 'wikitext' mode is selected and there is an
inline switch, the interface needs to show the diff type format previously
selected.

Toggle using new `mw-diff-element-hidden` class that is used by core so
that there's no clashes when hidding and showing the diffs.

Bug: T331589
Depends-On: Ie6a48e495f2bb299d8b984e7c40363d534c7915b
Change-Id: I4f790370dbfeb521f3b61c4d604245f77094abe9
2023-06-26 04:20:16 +00:00
Bartosz Dziewoński 34c6d3e1a3 Remove remains of lossy-switching and discard-switching
After the demise of RESTBase we are always able to switch from
wikitext to visual mode with changes, and we no longer need to
support these two poor experiences.

Bug: T339871
Bug: T339872
Change-Id: I2be4068447b21e16c87db0e56d6422ea64ba4708
2023-06-25 09:16:45 +00:00
Bartosz Dziewoński 5a792b6558 ApiVisualEditorEdit: Allow not returning the new revision content
Sometimes we call this API and then reload the page (or navigate to
another URL), without using the page content it returns. Save some
work and some data transfer and don't generate it in those cases.

Change-Id: Ic5fac61f3ef9b2dfce6ff757f1d414a9f41f217d
2023-06-22 21:08:15 +00:00
jenkins-bot 68265fcd14 Merge "Use new helpers to show the post-edit message" 2023-06-22 15:33:28 +00:00
Ed Sanders 94fb927242 Replace ve-ce-surface-enabled with ve-ce-surface
The former is deprecated, and not required here.

Bug: T340124
Change-Id: I874b40bd8288763aeba8946ce40cecfd27e47c1b
2023-06-22 16:26:47 +01:00
Bartosz Dziewoński dd509c1072 Use new helpers to show the post-edit message
Undo some changes from 95454e710f1b619f7c538bc1dc88f238409719ca,
as this functionality is now provided by the core code.

Depends-On: I1c9020b2efb2785279f5c09539a49208a310ccf7
Depends-On: Ifeffcf214719f0d5c1371dc7d51a410fb313c978
Bug: T338003
Change-Id: I90a618897699c844f9c558bbeb4d1563f8050fe3
2023-06-22 13:51:59 +00:00
Bartosz Dziewoński ac8f8791f1 Don't show edit notices popup after switching VE/NWE
The user has already seen the notices, and getting hit with yet
another popup doesn't feel nice.

Bug: T169179
Change-Id: I421e42d32cb67ea210644b705e9c6e5af74e75ee
2023-06-22 13:42:25 +00:00
jenkins-bot 1f76a0e8f7 Merge "Make "add undocumented parameter" hotkey ctrl+shift+d work much better" 2023-06-21 19:52:11 +00:00
Bartosz Dziewoński eedafae69e Support '&editintro=…' etc. on subsequent loads via page tabs
Before this change DesktopArticleTarget's history management was not
working correctly because .currentUrl was not being updated on every
activation, and we worked around this problem by activating it in a
different way on subsequent loads in DesktopArticleTarget.init.

Fix the first bug by updating .currentUrl whenever we activate it,
and remove the guards around the normal way of activating it, which
fixes the parsing of 'editintro' parameter.

Bug: T56029
Change-Id: Ifd6af60cdf1d2c87536017b316ab8da1f5133400
2023-06-21 13:35:43 +00:00
Bartosz Dziewoński bcabb774ab Support '&editintro=…' etc. on back/forward and VE/NWE switch
The edit intro message is now shown again when closing/opening
the editor using the back/forward browser navigation,
and it is preserved when switching between VE and NWE.

Bug: T56029
Change-Id: I12083926341a6d3ba4c7a9f84736cddc7f2ac0fa
2023-06-21 15:35:06 +02:00
Bartosz Dziewoński 2b8c3edab2 Replace the last use of mediawiki.Uri
Depends-On: Ia95a27c7d7ebc9e4779f82598152145f02993b29
Change-Id: I8736111c4ec3cf9a9480df2efbdf080b5d72d514
2023-06-21 15:35:06 +02:00
Bartosz Dziewoński a35698fea5 Fix '&editintro=…' not working on Vector with some settings
In Vector the edit tab links have an extra <span> inside, and so
we couldn't find the parameters in the <a> href, because we were
actually looking at the <span>.

It worked in cases where we override the edit tab labels, since
we trample over the spans, e.g. in multi-tab mode.

Bug: T56029
Change-Id: I96935490418d7c3be4d417aaa71cb6e9608fd77f
2023-06-21 13:08:05 +00:00