Go to file
Timo Tijhof 21f526bffe mw.trackSubscriber: Remove action.init.timing value
In Schema:Edit, all action timing durations (ready, loaded, saveAttempt etc.)
are defined as "time since the editor was initialised", which is internally
stored as the timestamp for the "init" action.

The 'init' action itself does not have a timing duratation, but the Edit schema
has a special case for it, definining it as "time since the page was loaded".

In actually, it isn't actually implemented as "time since the page loaded",
and I suspect that as such, this value is probably not used by EventLogging
consumers of the Edit schema. Or, it might be used, but doesn't represent
what the consumers think it does.

Presently, it uses the init time now() - mediaWikiLoadStart, which basically
means the time between the random point at which MediaWiki core JavaScript
finished executing which is quite variable in practice due to the race between
<script async> and browssing parsing/rendering of HTML. That is by design,
and is also why mediaWikiLoadStart is undocumented and internal, and actually
in the process of being removed.

After many iterations on this patch to try and approximate an alternative to
this undocumented variable, I came up with an alternative approach with DLynch
at the Hackathon, which is to simply not record this one timing value, but
preserve the behaviour of all the other timing values exactly as-is.

That is, keep the behaviour of storing `now()` as "init" when the editor
activates, and keep the behaviour of substracting "init" from all other action
times, but only don't report "init" itself to EventLogging (given its value
would be 0, which isn't useful).

Bug: T160315
Change-Id: I778234efe40dde8ff30333339335be1c3910a4e0
2018-05-31 18:27:12 +00:00
.jsduck Update VE core submodule to master (d214a66aa) 2018-05-23 09:01:07 -07:00
bin updateSubmodule: Put list in topo (merged), not written, order 2018-05-10 08:51:37 -07:00
build Use Tool.$link.focus() for highlighting now OOUI styles :focus 2018-05-02 12:52:17 +01:00
i18n Localisation updates from https://translatewiki.net. 2018-05-30 22:24:54 +02:00
images Merge "Re-crush beta feature SVG screenshots" 2018-02-08 12:18:28 +00:00
includes Merge "ApiVisualEditor: Defensively check that query prop revisions returns arrays" 2018-05-30 22:03:35 +00:00
lib Update VE core submodule to master (73e80ba80) 2018-05-29 08:40:20 -07:00
maintenance doc: Document all public and protected PHP functions 2018-03-28 12:50:44 -07:00
modules mw.trackSubscriber: Remove action.init.timing value 2018-05-31 18:27:12 +00:00
screenshots Add screenshots grunt task for taking documentation screenshots 2016-06-27 12:19:35 +01:00
.eslintrc.json mw.DesktopArticleTarget: Use require() for mw.page.watch 2017-05-24 21:17:02 +00:00
.gitignore Add .idea to .gitignore 2017-01-27 13:16:58 +01:00
.gitmodules Use submodule for VisualEditor core 2013-12-20 09:18:41 +00:00
.gitreview .gitreview: swapping defaultbranch for track 2016-10-25 10:58:48 +02:00
.mailmap Update AUTHORS.txt for the last couple of years' work 2018-01-03 11:51:37 -08:00
.phpcs.xml doc: Document all public and protected PHP functions 2018-03-28 12:50:44 -07:00
.rubocop.yml build: Bump Ruby cruft to avoid security warnings for old rubocop 2017-11-28 12:09:20 -08:00
.rubocop_todo.yml build: Bump Ruby cruft to avoid security warnings for old rubocop 2017-11-28 12:09:20 -08:00
.stylelintrc.json Update VE core submodule to master (6111ca575) 2017-08-21 11:28:34 -07:00
AUTHORS.txt Update AUTHORS.txt for the last couple of years' work 2018-01-03 11:51:37 -08:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 20.0.0 2018-05-25 23:18:11 +00:00
CONTRIBUTING.md Update link to contributing guidelines 2017-08-21 18:22:35 -04:00
extension.json Merge "ce.MWWikitextSurface: ask on paste about wikitext conversion" 2018-05-24 17:21:07 +00:00
Gemfile build: Use commons_upload v1.2.1 Ruby gem for language screenshots 2018-03-15 17:32:47 +01:00
Gemfile.lock build: Use commons_upload v1.2.1 Ruby gem for language screenshots 2018-03-15 17:32:47 +01:00
Gruntfile.js build: Follow-up 99d3320573: Drop babel-polyfill, never used 2018-04-25 12:59:50 -07:00
jsduck.json Update VE core submodule to master (7a8829509) 2017-08-31 11:39:36 -07:00
LICENSE.txt doc: Bump copyright year 2018-01-03 17:45:07 +00:00
package.json build: Introduce eslint-plugin-qunit 2018-05-30 21:04:02 +01:00
Rakefile build: npm/rake entry point for screenshots upload 2018-03-07 23:23:30 +01:00
README.md README: Add devDependencies badge 2014-09-16 13:39:31 -07:00
VisualEditor.i18n.alias.php Rebaser: Add more aliases for special page 2018-05-02 12:02:11 +01:00
VisualEditor.php doc: Document all public and protected PHP functions 2018-03-28 12:50:44 -07:00

devDependency Status

VisualEditor

VisualEditor provides a visual editor for wiki pages. It is written in JavaScript and runs in a web browser.

It uses the Parsoid parser to convert wikitext documents to annotated HTML which the VisualEditor is able to load, modify and emit back to Parsoid at which point it is converted back into wikitext.

For more information about these projects, check out the VisualEditor and Parsoid pages on mediawiki.

Developing and installing

For information on installing VisualEditor on a local wiki, please see https://www.mediawiki.org/wiki/Extension:VisualEditor

For information about running tests and contributing code to VisualEditor, see CONTRIBUTING.md. Patch submissions are reviewed and managed with Gerrit. There is also API documentation available for the VisualEditor.