Commit graph

1961 commits

Author SHA1 Message Date
Bartosz Dziewoński b0c0553dc2 ve.init.mw.DesktopArticleTarget.init: Move Vector styles to separate file
Change-Id: Iecf25bf71c1e4fca8964d608082e42ef0c929044
2018-11-06 16:47:31 +00:00
Bartosz Dziewoński c87b010da0 ve.init.mw.DesktopArticleTarget: Edit surface padding and gutter for Minerva
Bug: T208102
Change-Id: I0a43550c938144f79f04dc91c2c742229f939177
2018-11-06 16:47:23 +00:00
Bartosz Dziewoński 1ffdee226c MWTempWikitextEditorWidget: Don't rely on skin to set width for textareas
Bug: T208102
Change-Id: Ic14105556996a74e2ba656cd88571fb94cf4e49b
2018-11-06 16:47:08 +00:00
Bartosz Dziewoński 5996cf15e9 ve.init.mw.DesktopArticleTarget.init: Make multi-tab mode compatible with Minerva
* Make inserting secondary tab work with Minerva's non-standard structure
  of navigation menus
* Distinguish primary and secondary tabs with tiny icons, since Minerva
  hides their text
* Hide section edit link dividers (unnecessary when we use icons)

Bug: T208102
Change-Id: Ieaec60165617e3b423ec58857d6f0a0406e22b1d
2018-11-06 17:45:48 +01:00
Roan Kattouw 0243fb1863 Oversample Schema:Edit events when configured to do so
Respect the config var exported by WikimediaEvents that, if set to true,
forces oversampling. When oversampling, all events are logged even if
they would have been sampled out. The isOversample property is set to
true if the event was oversampled and would not otherwise have been
logged.

Bug: T206543
Depends-On: I5fdf5fdd2dc0d99a0a0d7eb7ab2e3dce4798009b
Change-Id: I314da47d7d250672f1a9b34edeeeb720850f8fac
2018-10-19 22:29:41 +00:00
Roan Kattouw 8d08b032e7 Use Schema:Edit sampling rate config from WikimediaEvents
Instead of hard-coding the 6.25% sampling rate, allow it to be
controlled by the config variable in the WikimediaEvents extension
(which also defines the RL module for the Edit schema).

Also use sampling code from EventLogging so we can configure the
sampling rate as a number, rather than using a hex-digit based strategy.

Bug: T206543
Depends-On: I00383cec62f6c2a0137b329565b0ca84bfbb223f
Change-Id: Ia3e9a0f93d5d3001f222a64f31e82a63db36d7ab
2018-10-17 14:20:32 -07:00
Roan Kattouw d8ceb889b0 trackSubscriber: Use early return for 6.25% sampling
Rather than computing all the data then throwing it away 93.75% of the
time. Also use .charAt() for consistency with WikiEditor.

Change-Id: I6360b5c636e94db3483f542791d158f240c542f8
2018-10-15 15:05:27 -07:00
David Lynch 0a3eda0529 trackSubscriber: log activity events for VisualEditorFeatureUse
This won't really do anything until the patches to ve-core for the activity
events, and WikimediaEvents for the schema land.

Bug: T202148
Change-Id: Ie462a24f66240a1accfd0185c46273e60effbd64
2018-10-11 11:52:14 -05:00
Ed Sanders e176ecceae Move 'done' tool out of static config
Bug: T206132
Change-Id: I3319fc56209cab303448f7abe1e6334c50100947
2018-10-03 22:37:48 +01:00
jenkins-bot 542004dcb9 Merge "Require Parsoid HTML 2.0.0, and handle its <audio> tags" 2018-10-02 20:47:59 +00:00
Ed Sanders d5d23ee4be Require Parsoid HTML 2.0.0, and handle its <audio> tags
Bug: T201081
Depends-On: I6514b9b0a85588c7eaae5e6989789656cfc3253a
Change-Id: I6052dcf3e414d9506ff7ec7a6b5d8f4eeb4a703a
2018-10-02 12:15:45 -07:00
Bartosz Dziewoński 42ebd10090 Correct some doc comments' syntax
I ran Closure Compiler over the codebase just to see what would happen,
and it printed some useful warnings.

Change-Id: I56d40b11e6d1dd7ce68a5e59da511f66e928647f
2018-09-26 14:49:52 +02:00
jenkins-bot f6cea616ef Merge "Remove #ca-edit from required skin elements on edit pages" 2018-09-26 11:27:22 +00:00
Bartosz Dziewoński f67dfea29d Remove #ca-edit from required skin elements on edit pages
I suppose technically you don't need it if you're already on an
?action=edit page, since that will cause the editor to load as well.
At a glance nothing seems to break if it is missing (other than the
fact that there is no way to launch the editor, obviously).

Bug: T179427
Change-Id: I3c221ded302702b881857930da5dc41630680c02
2018-09-25 20:39:12 +02:00
jenkins-bot a4d73025e3 Merge "Turn off CSS transforms after toolbar has been opened" 2018-09-24 16:38:00 +00:00
jenkins-bot 5e1c0030a4 Merge "Update comment" 2018-09-24 15:36:58 +00:00
Ed Sanders 78a3c0dfb6 Provide platform when tracking mwedit.ready for tempWikitextEditor
Bug: T205241
Change-Id: Icf77ad9028e7e87c0189ef2b4cad5dbea20cb2f1
2018-09-24 16:03:55 +01:00
Ed Sanders 253e7e6c59 Update comment
Change-Id: Ie6b2b3512fb9e31014040c3cd0f9c75d7330ccbe
2018-09-24 12:41:58 +01:00
jenkins-bot ae037e77ca Merge "Use mw.Title.isTalkNamespace" 2018-09-18 15:00:34 +00:00
Bartosz Dziewoński 165fe4ad45 ve.init.mw.MobileArticleTarget: Simplify margin/padding for debug bar
Requires I28278449512ed1e5e8c4ac6ae390334a26d1bad6 in
mediawiki/skins/MinervaNeue to be merged at the same time.
There should be no visual change if both are merged.

Change-Id: Ia13f758a6870be2e6c89fd11f2ee3544ac61a1d7
2018-09-17 21:47:46 +00:00
Bartosz Dziewoński 5badbfed10 ve.init.MWVESwitchConfirmDialog: Fix gap above dropdown on MonoBook
In WikimediaUI theme, the height of the toolbar is defined with
'padding-top', but in Apex theme, it is defined with 'height'.
Set both properties to make this work with both themes.

Remove unused styles for the dropdown. It is now positioned by OOUI
(since T192505). This should have been done at the same time as
e1635fdc52.

Bug: T194120
Change-Id: I9cac0c9458ae8cc26c5f056bb26686f8ad50c493
2018-09-17 22:22:48 +02:00
Bartosz Dziewoński 14777e89ad ve.init.mw.MobileArticleTarget: Fix keyboard shortcuts to be hidden
This should have been done at the same time as
e1635fdc52.

Bug: T203659
Change-Id: I4aef8f5755b2e3dece33125ec9d354e58985c525
2018-09-17 22:18:32 +02:00
Ed Sanders 3c8bb3801e Turn off CSS transforms after toolbar has been opened
Leaving this property applied seemingly triggers strange
rendering bugs in Safari.

Bug: T202935
Change-Id: I65e742918c3670b99cf05efb4722a0c23a9347f5
2018-09-14 13:48:07 +01:00
Ed Sanders 917645eb27 Use mw.Title.isTalkNamespace
Depends-On: Ie57243bac1aa5e23bc8b1c027bcb1b83090ee433
Change-Id: I303401ff34425831cb3c32d25df635aefa5b5926
2018-09-14 13:37:17 +01:00
Ed Sanders 7eb836adbc Update VE core submodule to master (7420443fe)
New changes:
a273ba69c [BREAKING CHANGE] Implement a SourceConverter

Local changes:
* Use SourceConverter
* Handle `this.doc` being a string in source mode now

Bug: T203114
Bug: T203156
Change-Id: I7bce7b57668e0c1dd511803a54178ae69694a86d
2018-09-14 11:42:34 +01:00
Bartosz Dziewoński bb5762a0b2 ve.init.mw.DesktopArticleTarget: Handle deactivate on namespace tab when it's a talk namespace
Turns out, talk namespaces are special.

Bug: T204194
Change-Id: Ie9af128edd5874075098f8593e01595da863102d
2018-09-13 11:04:47 +02:00
jenkins-bot df253967e1 Merge "DesktopArticleTarget.init: Pass platform to ve.track directly" 2018-09-12 14:20:43 +00:00
David Lynch 627128f1ae DesktopArticleTarget.init: Pass platform to ve.track directly
ve.track tries to guess the platform, but it needs a loaded Target to do so,
and init happens before that.

Also, log a warning when this happens, in case it comes up again.

Bug: T203618
Change-Id: I35fa58a42cd247e01f3717c9ab3a10d8ea93a484
2018-09-06 10:52:46 -05:00
Ed Sanders 6396fad416 Release editWarning unload event when switching from old wikitext to VE
Bug: T202587
Change-Id: I81ff882e0e4ccf0b26d73be5f55cbf2da0d97a47
2018-09-06 14:13:55 +01:00
jenkins-bot 4dafa321a9 Merge "Cleanup setEditorPreference: Always return promises, never deferreds." 2018-09-04 16:25:45 +00:00
Ed Sanders 8ac5a03a05 Cleanup setEditorPreference: Always return promises, never deferreds.
Change-Id: I59a5fdc29ee64abe422610da835e6f089ad7267a
2018-09-04 13:45:52 +01:00
jenkins-bot 3f55b7432e Merge "Fix: Apply placeholder colour style to first child, not parent" 2018-09-03 15:06:51 +00:00
Ed Sanders ed047b6cdd Fix: Apply placeholder colour style to first child, not parent
This ensures any colour applied to branch nodes is overridden.

Change-Id: Ib6f5d2509021ba0ba085050bc1fe993e7d887b3e
2018-08-31 16:59:54 +01:00
Ed Sanders 22f3075b52 Fix typo in mw.Target#setupSurface
Bug: T203213
Change-Id: I38eda4aac48b3363c6211e225b8f0cadf6b40853
2018-08-31 13:16:21 +01:00
jenkins-bot 919f74f10b Merge "Don't wait for surface to blur before hiding pageToolbar" 2018-08-29 01:58:14 +00:00
Ed Sanders eea7b93895 Don't wait for surface to blur before hiding pageToolbar
Bug: T202986
Change-Id: Ia25dd7aab7c72f6888fab1fcec0185fe0b4111b5
2018-08-28 12:08:09 +00:00
jenkins-bot c09c9a408a Merge "Update VE core submodule to master (e69a4a07c)" 2018-08-25 22:13:19 +00:00
Ed Sanders 7bf56a3bd4 Update VE core submodule to master (e69a4a07c)
New changes:
3b62827b8 Remove negative margin from mobile context action buttons
694705894 Implement a simple notification system to fill in for mw.notify
461283560 Validate history start when applying/unapplying change

Bug: T202514
Change-Id: I203dc5101bc31988df2d3986da4300a318e5e889
2018-08-25 18:08:48 +01:00
Ed Sanders e67f870922 Fixup Ie40baad: Avoid triggering surfaceReady when adding dummy surface
Change-Id: I01f77633a11c6c5b8d484836940ea10b975c7a9e
2018-08-25 18:06:37 +01:00
jenkins-bot 99485b7cbb Merge "Cleanup: Get rid of surfaceReady callback" 2018-08-25 13:48:37 +00:00
Ed Sanders 07e05c7954 Cleanup: Get rid of surfaceReady callback
Just call the method after surface init.

Also move all the post-dm building code into
an #addSurface override.

Change-Id: Ie40baadfa6cd826a92f8fb7d928f4d995286f69f
2018-08-25 14:04:00 +01:00
Ed Sanders 8f49bb391a WelcomeDialog: Check at least one editor is available
Bug: T201928
Change-Id: Ibac6cf921fdc3daba2d671d9bd668fa7bcb9e7a2
2018-08-23 14:21:40 +01:00
David Lynch 26f6429702 TemplateStyles support
MWTransclusionNode will preserve TemplateData <style> in its generated content.

Disable TemplateStyles stylesheets in the original page content, and reenable
them when the surface deactivates.

Remaining TODO: if multiple copies of a template with deduplicated styles are
on the page, and the one containing the actual <style> is removed, all will
lose their styling.

Bug: T197563
Change-Id: Ibd8939eef7d8eb532719f4ee0ce200600449ef81
Depends-On: Ia9f2afcdba5456238e3ef444c202c9b0c78838bf
2018-08-22 17:03:27 +00:00
jenkins-bot 9498b6a72b Merge "Export to page using action=submit" 2018-08-19 12:02:48 +00:00
Ed Sanders cb10316a7b Export to page using action=submit
Change-Id: I0d719905203d24a545d9b7dcea5bb9d032f10a76
2018-08-19 11:25:17 +00:00
Thalia 4a1d52ccb3 Show signatures in NWE visual diff
Parse document with pre-save transform for the diff.

Bug: T184166
Change-Id: Iffc9ed8ba88dcb55bef73f1708118663b0c38068
2018-08-16 21:45:28 +01:00
jenkins-bot 2270987788 Merge "ve.init.mw.MobileArticleTarget: Tweak toolbar items' height" 2018-08-14 17:03:48 +00:00
jenkins-bot 2b43a24eea Merge "ve.init.mw.ArticleTarget: Skip prompt when switching to VE from NWE section editing if unchanged" 2018-08-14 16:09:49 +00:00
Bartosz Dziewoński 835b68db2a ve.init.mw.MobileArticleTarget: Tweak toolbar items' height
This padding needs to come out to an exact integer pixel value (14px),
otherwise things are off by less than a pixel and look ugly: F24664180

1em = 16px
0.875em = (14/16)em = 14px

Bug: T190596
Change-Id: Ieb292ed14e0b9205d15254667e97613fbf339260
2018-08-14 07:12:51 +02:00
Bartosz Dziewoński a387778ac3 ve.init.mw.ArticleTarget: Skip prompt when switching to VE from NWE section editing if unchanged
Bug: T136267
Change-Id: I30eae20baca2e16fa5f710485eab213edd5c4a08
2018-08-10 18:07:59 +00:00