Commit graph

63 commits

Author SHA1 Message Date
Kunal Mehta 3d7d4f85ad Set $wgWikiEditorFeatures in extension.json
We can do this now using a merge strategy of "array_plus_2d".

Change-Id: Ib1536633424bad46ff7861bc145025418af0286a
2015-09-24 21:20:40 -07:00
Alex Monk 28f1197000 Bump Schema:Edit to revision 13457736
Bug: T111421
Change-Id: Ib5fc6004482b7324fc52acd7d28ad2b1529e55a3
2015-09-04 01:50:30 +01:00
This, that and the other 52d3e279a1 Replace hidesig module with a more robust implementation
Per T42972, the current hidesig implementation is broken, and only
hides the signature button in namespace 0 regardless of the value of
$wgContentNamespaces.

Seeing as the old implementation of hidesig was broken, I don't really
think backward compatibility with old configurations is a useful
concern here. In particular, hiding of the signature button is no longer
able to be configured in Special:Preferences (why such a trivial pref was
ever able to be exposed to users, I don't know).

Bug: T59727
Change-Id: I596fd435bc9be8c37da43177c1bea90ebff0b2fe
2015-08-05 13:59:00 +10:00
Derk-Jan Hartman e71796a9fd Remove reference to non-existing module
The ext.wikiEditor.init module was removed in 596a790d.

Change-Id: Iaed58f621bc02326630559a389cd1021408e418d
2015-06-24 23:16:32 +00:00
James D. Forrester ab9dbac995 Reduce 'Edit' EventLogging schema sampling rate to 6.25% (1/16th)
Bug: T103036
Change-Id: Ib437c2542f9f6ed4d333047383ff66e637b5065e
2015-06-18 16:39:29 -07:00
Kunal Mehta 8a1920907c Actually allow people to override $wgWikiEditorFeatures
Change-Id: Ie38ddd4bb474026c592ba1678a19636fc9a20055
2015-05-23 11:00:30 +02:00
Kunal Mehta 9de4e8cc00 Empty PHP entry point in favor of extension.json
Extension registration currently doesn't support merging 2d arrays
(T99257), so set it as an explicit global for now in a callback.

Change-Id: If7604a7ed8ec0f940c4a4d2988fcecc383303e1d
2015-05-19 20:48:10 -07:00
Roan Kattouw bfae89b9e0 Follow-up cc5ca3a2f6: now that we sample client-side, send all editingStatsIds to the client
If the server-generated editingStatsId was sampled out, we never sent
it to the client. This made this code confusing and difficult to test,
but it also caused a bug: the client-generated editingStatsId
(for when the user presses back) has no place to go in that case,
and gets dropped on the floor.

Bug: T95919
Change-Id: I05adb7116f1a8b91a9e54dfa70c745f12d7fbf3c
2015-05-01 16:06:15 -07:00
Roan Kattouw 7719b8275f Only trust POSTed stats IDs
editingStatsId shouldn't be carried over in GET requests.

Change-Id: I67fbcd85169f37a175838e3ef1f5d3a7ae5217a9
2015-04-19 16:31:10 -07:00
Alex Monk d317164aeb Collect only 25% of WikiEditor events
By checking the first character of our session ID (which is just a random
hex digit)

Bug: T93201
Change-Id: If1f7e7c4da6c3f37533a6feba56ff6422f5b9750
2015-04-14 11:48:25 +01:00
Kunal Mehta 05545443d3 Use __DIR__
Change-Id: I20b054c9e0ddf4ccbafb7642a04c315e18d2b8d4
2015-03-25 16:23:36 -07:00
Kunal Mehta 59e7d9546f Remove unused code, pass phpcs
* No features have a 'configurations' setting, nor can I see any
client-side code looking for any. Was triggering phpcs because of
the 'global $$configuration;' line, which didn't start with "$wg".
* Remove unused selenium tests that were also triggering phpcs.
* Add composer.lock and vendor/ to .gitignore

Change-Id: If06a08b6a7c232ac69f9dff569ffa3e1c93ff0c5
2015-03-25 15:27:10 -07:00
Alex Monk e19968d4e1 Fix WebRequest::getVal calls for instrumentation
As it actually defaults to either null or (string)$default, not $default.
So therefore getVal( 'key', false ) will never return false, even if 'key' is
not set.

Change-Id: Ibe6beae9d2c4a19ff59d1035564f17373298529d
2015-03-18 19:40:30 +00:00
Fomafix d16dfb0ad5 Style code
* Fix errors and warnings from phpcs.
* Add commas at end of lines for arrays in PHP.
* Add space between // and comment.
* Add space between ) and {.
* Use tabs instead of spaces for indenting.
* Break lines in PHP with more than 100 characters.
* Remove double spaces and spaces at end of line.
* Remove spaces before comma.
* Fix some typos.

Change-Id: I9c014bdfa9832fa6a20d0190fe2fc668983d0fb9
2015-03-14 15:49:04 +00:00
Alex Monk 1f1ec7d4b8 Don't try to log a boolean for page.revid
It won't work.

Change-Id: I9f1a34dcdada5cd33a212ed6cb01750ccfa7abfe
2015-03-13 23:44:05 +00:00
Alex Monk 6f5c181d6c Fix name of editingSessionId
Oops.

Change-Id: I332c49c3a0c4529c20ff7d5ffe5336054349340f
2015-03-13 23:19:12 +00:00
Alex Monk 1096e18a55 Default user.editCount to 0 in the Edit schema
Otherwise it will fail to validate for anonymous users (getEditCount returns null)
as it is a required field

Change-Id: I3d438cfde172b2598955773c4c22fc2d4a502f16
2015-03-13 23:13:10 +00:00
Alex Monk 74da530f2d Schema:Edit instrumentation
Depends on Ib8612626

Bug: T88027
Change-Id: I67f1000d23cb257df29d5d4be8ae85764458e6c1
2015-03-10 14:56:45 +01:00
jenkins-bot ea569a993a Merge "Remove previewDialog" 2014-12-05 13:03:26 +00:00
Derk-Jan Hartman 360419f397 Remove previewDialog
This was never launched, and is no longer working either.

Change-Id: Ic49e84b8a91da701673949a8d441c788a4feaa22
2014-11-30 20:25:22 +01:00
Alexander Jones 55c6e1271f Add QUnit test for ext.wikiEditor.toolbar
This patch replaces the manually operated test module for ext.wikiEditor.toolbar
with one based on QUnit. The new test suite uncovered a bug with the removeFromToolbar
API function in jquery.wikiEditor.toolbar, which prevented the removal of select buttons
from the toolbar. This issue has also been fixed in this commit. .jshintrc was updated
to ignore the new QUnit global.

Bug: T39485
Change-Id: Icef3debcffa484a8d78628bcd9da0892b750bb40
2014-11-29 14:12:26 -06:00
Yuri Astrakhan 0636505d61 Declared missing var, fixed php doc & spelling, spacing
Change-Id: I7a60eeb224cc0e1c013f59df42fc4a7805df8a5b
2014-09-21 22:50:01 -04:00
Derk-Jan Hartman dbbb722210 Only add WikiEditor for content model WikiText
Together with solving bug 29908, this makes the presence of the
toolbar consistent. It is added to pages handling wikitext.

Note that we provide the CodeEditor on all JS/CSS/Lua pages.

Bug: 24713
Bug: 24041
Change-Id: Iaa6b9a6c511380ed1669d8b95cba4a3ddc6f9ab6
2014-07-28 23:12:39 +00:00
Derk-Jan Hartman f0505e6dee Prevent style jumping in WikiEditor
Add a new styles module. This module makes sure that the textarea is
already properly styled (jumping lineheight bug) before we start the
JS. Also hide the toolbar before it's styles have finished loading, so
you don't see it being constructed on the fly. Move inline styling for
the old toolbar into this stylesheet as well.

Bug: 47708
Change-Id: I40bec0a24dbd295db301e7faefb93d8991981acb
2014-05-06 15:03:01 +02:00
Derk-Jan Hartman e53521b32b WikiEditor: Remove unmaintained template editor modules
Change-Id: I47119d6cfdde4b40ff5b07be0c7d327b80598142
2014-04-03 17:11:10 +02:00
Derk-Jan Hartman 9bb94e8319 WikiEditor: Remove old unmaintained ToC module
Change-Id: I0f53a68e50fc950d7f407ee81b2bf0d81ef4948d
2014-04-03 17:02:32 +02:00
TMg 3c0aa26a0d Renaming the "Beta" label to "Editor"
The WikiEditor is the default since a long time now. It does not
make much sense to still call it "Beta". This depends on my other
change to the core preferences because of the new word that needs
to be translated.

Depends on I429c8125b8db789d2756d61249f6cf1fa7f2f51c.

Change-Id: Id8b9a47a9d83dc1acdec46cb6e993deac33cc066
2013-05-26 10:27:26 +00:00
Ori Livneh 61205be62a Remove ClickTracking calls
ClickTracking is deprecated; the config var gating this behavior is set
to false; the data is going to /dev/null; no one is interested in
analyzing it. I think it's dead, Jim.

Change-Id: I71ea8c174e5e38b28f128ccd380ed2a25ad50606
2013-03-27 13:41:05 -07:00
Eranroz d0654ef864 (bug 24172) Adding dialog for file, (bug 24114) localize REDIRECT
Fix for bug 24172, by extending the wikieditor with a file
dialog (like the table and link dialog) for adding files with exended
syntax.
The added syntax is localised. This also fixes bug 24114, and the redirect
button now adds localised magic word.

Change-Id: I5950b530ab8c55aeba4b579cc80ce863f228d373
2012-07-27 00:59:23 -07:00
Trevor Parscal 96052d0d97 (bug 34885) Fixes issue where old toolbar was killed, even when the new toolbar was incompatible
Instead of wiping the old toolbar out on the server side we now just wrap the old toolbar in a div that has an inline style that prevents it from being displayed. This is only done when the toolbar is enabled. When the toolbar code runs on the client, if the toolbar ends up being incompatible, the old toolbar's wrapping div is shown. This avoids the side-effect of the old toolbar showing up momentarily while the new toolbar loads. It's a dirty hack, but we explored this extensively and it's the least evil way we could come up with that worked consistently.

Change-Id: I6fefadea4dbd01b96a0b95c50bc9ef526144dc3c
2012-04-17 15:19:20 -07:00
Catrope 336036a6b2 Revert toolbar preferences saga
This is still broken in production right now: the preference message is
missing and disabling the preference doesn't disable the toolbar.
Reverting this because it just doesn't work right now.

This reverts the following commits:

4234c5ddc7 "Fix syntax error in I1adc6b99fa3e1980d4ce3c565b5f193bcbceb526"
00eee72543 "modified as per bug 35879"
00eee72543 "(bug 30796) Dropping preferences for toolbar"

Change-Id: I882a6e0c0cc70f9afecb49746f3db01eab8808dc
2012-04-16 15:20:50 -07:00
nischay nahata 00eee72543 modified as per bug 35879
Re-added the preference for toolbar I had removed by mistake in change 4339
made global=false and user=true for toolbar,as it was before my changes

for dialogs global=true and user=false is retained as now the user cannot
control dialogs in preferences and it is always on

Patchset 3 (Roan): enable WikiEditor preference by default

Change-Id: I1adc6b99fa3e1980d4ce3c565b5f193bcbceb526
2012-04-16 11:18:43 -07:00
nischay nahata 8d01d341be (bug 30796) Dropping preferences for toolbar
sets global=true for dialog preferences and removes corresponding messages
from i18n file

Change-Id: I877c94544ebae34e69a4034cde52c763cc44503c
2012-04-05 22:50:44 +05:30
Roan Kattouw f26acc15c7 Add a configuration variable for disabling tracking clicks on the toolbar buttons 2012-02-23 22:29:37 +00:00
Sam Reed 924908c22f Followup r111796, always return true 2012-02-22 23:07:11 +00:00
Benny Situ 0609dffdf3 fix for bug34431 - Disable the old toolbar if the new toolbar is enabled 2012-02-17 22:13:11 +00:00
Sam Reed 8262e1db9a Remove trailing whitespace
Fix documentation

Remove unused global
2012-01-31 20:19:22 +00:00
Siebrand Mazeland cc71ec5354 * bump version to 0.3.1
* stylize.php
2011-09-13 08:56:32 +00:00
Jan Paul Posma 4c8f157f1a Fixes bug 28149 (but with default to true) 2011-04-22 12:10:18 +00:00
Roan Kattouw 534309c1d5 (bug 27515) Reintroduce JS variables wgVectorEnabledModules and wgWikiEditorEnabledModules for backwards compatibility 2011-03-13 10:55:33 +00:00
Roan Kattouw 24330513f7 Followup r83734 (ResourceLoaderGetConfigVars instead of MakeGlobalVariablesScript in Vector): do the same for WikiEditor 2011-03-13 10:51:45 +00:00
Michael Dale db52f1ea53 follow up to r83723 ( remove the add-media-wizard gadget ) 2011-03-11 23:01:01 +00:00
Jan Paul Posma 9d6f6e3526 1. Re-introduces check if the browser supports the dialogs, which was removed for no apparent reason in r74276.
2. Makes the isEnabled function public, to allow other extensions to use the same configuration settings as WikiEditor.
2011-02-25 00:01:57 +00:00
Roan Kattouw 9920653411 WikiEditor: Make sure that the toolbar is enabled before loading dialogs. Should fix bug 27471 2011-02-17 22:44:29 +00:00
Sam Reed 8935a98313 Remove assignment in conditional
Fixup method parameter documentation
2011-01-23 09:46:07 +00:00
Tim Starling 81f292841c Updated extensions for r77011:
* I left MwEmbed alone since it was scary.
* I left the half-completed commented-out ResourceLoader code in Maps as it was
* PrefSwitch was apparently broken, with a typo in remoteBasePath.
* ClickTracking and ProofreadPage now demostrate two different styles of multi-module registration. Choose which one you prefer.
* SemanticMediaWiki/SMW.hooks.php became empty and was deleted.
* Tested using a special script that includes extension setup files and checks $wgResourceModules for correctness.
2010-11-19 13:59:34 +00:00
Roan Kattouw 947fe69c27 (bug 25339) Allow specifying separate base paths for local and remote paths in ResourceLoaderFileModule::__construct(). Extensions can use this to properly point the resource loader to their resources in a way that doesn't depend on the extensions/ directory being a subdirectory of phase3/ on the filesystem and that respects $wgExtensionAssetsPath. Also converted all extensions using ResourceLoader to use this approach, except MWEmbed which uses way more indirection building its module registrations than I can deal with after midnight.
What actually happens here
* Add $localBasePath, $remoteBasePath params to the FileModule constructor, defaulting to $IP and $wgScriptPath respectively
* Add getLocalPath() and getRemotePath(), which use this information to build a proper FS or URL path for a file
* Make readScriptFiles() non-static so it can use these functions
* Run every single file path we use through either getLocalPath() or getRemotePath() as appropriate
** Except file dependencies, these are already prefixed. Our inability to give them special treatment caused bugs earlier
* Kill prefixFilePathList() and resolveFilePath(), no longer needed
2010-10-27 22:22:10 +00:00
Trevor Parscal 543776c990 * ResourceLoaderModule.php - added basePath argument to ResourceLoaderFileModule::__construct to help make module definitions be less repeditive.
* Vector.hooks.php, WikiEditor.hooks.php - implemented new basePath argument for ResourceLoaderFileModule::__construct
2010-10-07 23:31:30 +00:00
Trevor Parscal cb6ff96431 Got more dialogs working again 2010-10-04 21:08:41 +00:00
Trevor Parscal 0a71513db4 * Introduced the concept of context extensions
* Abstracted the requirements concept being used to hack in the iframe as a context extension requirement
* Removed some hardcoding for iframe stuff
* Moved about 60k of JavaScript code out of the main wikiEditor script, and into an iframe only context extension.
2010-10-04 20:12:30 +00:00