Commit graph

848 commits

Author SHA1 Message Date
Roan Kattouw 8470e2c272 Update VE core submodule to master (f8f9728)
New changes:
68e20d4 Create AlignableContextItem to quickly adjust AlignableNodes
0150df2 Update OOjs UI to v0.9.3
b333fd3 FragmentInspector: Execute action on enter, rather than closing with data
2d14f7a Fix webkit column hack
be780eb Don't drop whitespace when removing empty slug paragraphs
cc19787 Split handlesOwnChildren and ignoreChildren
7f1c9a7 Localisation updates from https://translatewiki.net.

Local changes:
Add ignoreChildren to handlesOwnChildren nodes

Change-Id: Id3dc7efae8d30b6551b2fc3104ed00bc86339176
2015-03-20 16:04:15 -07:00
Alex Monk c286511f17 Handle TitleBlacklist errors
Relies on I69cf0a88

Using our own new message because TitleBlacklist's own one includes text that
we can't parse on the client and relies on a parameter we don't get from the
API.

This relies on WikimediaMessages' version of the Edit schema being updated at
the same time.

Change-Id: I4c75369b8b97973b72899bfaecbd5a996a440c68
2015-03-18 21:58:51 +00:00
James D. Forrester 70cff83f68 Update VE core submodule to master (6bd2ea5)
New changes:
44ca3b6 Use store indices in annotate operations
3ebbcce Make range optional in getUsedStoreValuesFromRange
9d03a5e Set originalDomElements whenever a data element is created
4cfffde Simplify annotation hashes
4eeb8bb Add handlers for font annotations
4a6d6f0 Localisation updates from https://translatewiki.net.
05de45e ve.ui.ToolbarDialogTool: Fix documentation
6797d6d Use type from toDataElements when creating annotations
b3a3839 Store reference to DM document in transactions
c073a24 Load special characters in Platform instead of SpecialCharacterDialog

Local changes:
* Add new files to VisualEditor.php
* Re-sort i18n strings in VisualEditor.php
* Re-run extenson.json creation
* Update documentation HTML file
* Update tests for adjacent annotations fix

Change-Id: I7a5e79e68ab8a7aae0e9af42d011943019f7f85f
2015-03-18 12:15:24 -07:00
jenkins-bot ddaee51606 Merge "Insert a new references list immediately, rather than showing a dialog" 2015-03-18 02:28:54 +00:00
Bartosz Dziewoński 44e47a6e8f Insert a new references list immediately, rather than showing a dialog
If a references list node is selected, open the dialog to edit it.
Otherwise just insert the references list for the default group, since
this is what the user wants to do in 99% of cases.

* Replaced the simple 'referencesList' command (which opened the dialog)
  with a custom implementation in ve.ui.MWReferencesListCommand, which
  inserts the references list or opens the dialog like before.
* Removed the ability to insert a references list from
  ve.ui.MWReferencesListDialog, since it should now never open without
  a references list selected. If it does, throw an error.

I considered the behavior of always showing the dialog if there is at
least one references list already in the document, but I think it would
be confusing if the tool behaved differently depending on the state of
the document (rather than merely current selection).

Bug: T71727
Change-Id: Ifbbfa28548de9c0435c5174fb7762079f59bac54
2015-03-17 15:20:22 -07:00
Moriel Schottlender 73356c333a Add general citations dialog
Add a dialog to group the possible citation types and allow the
user to choose the right citation dialog for them.

Depends on Ibf29417 in VE-core; useless without I3d9caef in VE-core.

Bug: T62768
Change-Id: I22a64265475b1b4c94b46c5af196bd08331a05e7
2015-03-16 17:20:38 -07:00
Trevor Parscal 7f529a2aeb Update VE core submodule to master (546dbc9)
New changes:
580ce3c Implement ve.init.Platform static functions using $.client
85a3d4a ve.ui.Context: Fix typo: embedable → embeddable
37ac763 [BREAKING CHANGE] Allow access to surface through window manager
978bc22 Localisation updates from https://translatewiki.net.
c30c3ee Localisation updates from https://translatewiki.net.
533a10a Localisation updates from https://translatewiki.net.
dafeb22 Add directionality classes to window manager

Change-Id: I5150173da691bb51c4419447f5250c21ac41e32a
2015-03-16 16:54:31 -07:00
Roan Kattouw f620111b9e Send Parsoid API request immediately when user clicks edit
Move requestPageData from mw.Target to TargetLoader, call it
in init init, and pass the promise it returns into load()
via activate().

Bug: T90372
Change-Id: I828b8474e5a76b3d0d7d08735b4d865c29d2f820
2015-03-16 08:56:42 -07:00
Kunal Mehta aeaffaaf28 Unset $wgVisualEditorResourceTemplate after usage, it's not a real global
This should also prevent it from showing up in extension.json

Change-Id: Ifa730211acf0f828d2a63ede20f2ecc15af6cbd9
2015-03-15 17:45:14 -07:00
Roan Kattouw d371014e5d Load RL modules in one load.php request, rather than in two stages
This introduces TargetLoader, which manages plugins and RL modules
in a slightly more generic fashion so that Targets themselves don't
have to. This allows us to load all RL modules in one load.php
request, rather than first loading ViewPageTarget which then
loads the other modules.

TargetLoader loads in the bottom queue, so it will be loaded
as part of the main load.php request, but in VPT.init.js we
still have to wait for it with using() because it might not
have arrived yet. This also degrades gracefully on cached pages
where TargetLoader isn't in the bottom queue: it'll be loaded
as a separate request instead, which is suboptimal but no
worse that what we were doing before.

Right now TargetLoader is small enough that it could also be in
the top queue, but in the future we want to add things like
the action=visualeditor API request to it, and mw.Api is
relatively big.

Note: this also makes a breaking change to the plugin API:
plugin callbacks no longer receive the target instance
as a parameter, as they're now executed before the target
has been constructed rather than after. In the long term,
if we want to give plugins access to the target instance,
we could give them the target promise somehow. For now,
I've killed this feature because nothing used it and
the change from a direct object reference to a promise
would have been a breaking change anyway.

Also fixed incorrect documentation index for ve.init.mw.ViewPageTarget.init.

Bug: T53569
Change-Id: Ibfa6abbeaf872ae2aadc6ed9d5beba7473ea441a
2015-03-15 03:43:05 +01:00
James D. Forrester 4f92739310 Update VE core submodule to master (792b450)
New changes:
681804e Only call execCommand() on the surface in Firefox
c9ed5d8 Include editing-core icon pack
792b450 Update OOjs UI to v0.9.2

Change-Id: If75e4993b8c9c7134a69bc5fbffb335beacd8b9e
2015-03-12 17:06:28 -07:00
James D. Forrester 993c7ecfe5 Update VE core submodule to master (89b0629)
New changes:
94d3aff [BREAKING CHANGE] ve.utils: Remove ve.indexOf in favour of Array#indexOf
d6dac30 Provide the jquery.client library
5a7276b Follow-up d6dac30a097: fix typo in github URL
d5db4bd Add jquery.client as a base library
5cdd049 Only set a data URI src on inline slugs in Firefox
83edb7f Use equalDomElements in onCopy tests
9a1825a Ignore linebreaks after <!DOCTYPE>s
a077291 Add rowspan and colspan to list of corrupted attributes
6fd56dd Move selection sub-classes to sub-folder
f828889 Convert spaces to tab indentation
ca82723 Add merged cells table to converter examples
5f5d1b0 Add unit tests for ve.dm.Selection sub-classes
ea5515e Fix unbalanced transaction when removing to/from the edge of an inline node
24fe910 Stop bogus emits from handleLinearDelete
f1354ec Update OOjs UI to v0.9.1
1d09278 Localisation updates from https://translatewiki.net.
cf0787d Follow-up 94d3aff4f0c7: fix fatal for classes with .static.matchTagNames unset

Local changes:
Updates to VisualEditor.php and re-generation of extension.json.

Change-Id: Ib1a4521d17ec1c327c9ab5659d7b237ef4397c92
2015-03-12 14:25:56 -07:00
Moriel Schottlender bbb5c84149 Remove MWTransclusionMetaNode
Since all transclusion nodes can be interacted with (including the
'hidden' ones,) there is no need for MWTransclusionMetaNodes.

Change-Id: I23d37e3d82029b7475ec68ebb04883c7e05370cc
2015-03-12 13:12:32 -07:00
Alex Monk b396bc4af0 Use new SkinEditSectionLinks hook instead of DoEditSectionLink
So we don't overwrite stuff other extensions do and duplicate core code.

Depends on I5a7a2370

Change-Id: I83122694525fe124df914209e281c560ba9d12b7
2015-03-10 12:36:04 -07:00
jenkins-bot ba7db69583 Merge "MWParameterPage: Show the field's example if it exists" 2015-03-09 21:34:27 +00:00
Moriel Schottlender 530f5c05f5 MWParameterPage: Show the field's example if it exists
Also appending both the default value and the example value to the
field description. The input placeholder will show the default
value, the example value, or nothing.

Related to TemplateData change I9e2d66a805e25 but works without.

Bug: T53049
Change-Id: I4e5e57546f6d3c22e778ba061a5344ddee085c17
2015-03-09 14:25:18 -07:00
jenkins-bot 432384096e Merge "Add an icon to hidden templates" 2015-03-05 22:38:47 +00:00
Moriel Schottlender 2ae9fa6b29 Add an icon to hidden templates
Check if, after being fully rendered, a template is effectively
empty. If it is, add an icon and style to it so it displays for
the user and is clickable.

Bug: T51806
Change-Id: I11b9f0aba3398a3deb3e755051366e174a28e586
2015-03-04 10:30:50 -08:00
Matthias Mullie 63b5de3a83 Correct jquery.uls dependencies
ve.init.mw.Platform.js, ve.init.sa.Platform.js & ve.ui.MWLanguagesPage.js
use $.uls, but nothing in the ext.visualEditor.core module does.

Change-Id: I0b3d8c2b25694e29c86b91d7df7875f1be24fb2d
2015-03-04 18:00:07 +00:00
Ed Sanders 94fe054257 Update VE core submodule to master (a65ad7c)
New changes:
a65ad7c Move special character inserter to toolbar dialog manager

… and add it to the toolbar as a terminal option.

Change-Id: I35834d866a13c5dea7f5a520c63b8a99451fcf6d
2015-03-03 18:20:13 -08:00
James D. Forrester 0096c37fae VisualEditor.php: Warn people to use extension.json instead
Change-Id: I28f06581fae91d950c08c9bfc63779df6d60d4ad
2015-03-03 13:32:12 -08:00
James D. Forrester bddd84b1e9 Promote the Language tool Beta Feature to always-on status
No complaints in over nine months. Time to just make this available.

Change-Id: I601699573c0d50384720e5a1f0098c7f780de8cf
2015-03-01 17:15:48 -08:00
Trevor Parscal 34da7d56b8 Update VE core submodule to master (2e1a0bb)
New changes:
04a5947 Localisation updates from https://translatewiki.net.
dd4691b Update OOjs to v1.1.5
2e1a0bb Context refactor

Local changes:
Add context item support for references, citations, templates and links

Change-Id: I5d488ecbf9768dc63de6e545505dbfd5eb84cc61
2015-02-27 18:21:13 -05:00
jenkins-bot 2659aa632b Merge "Fix a few silly RL module dependencies" 2015-02-24 01:47:28 +00:00
Roan Kattouw aa51e6fa59 Fix a few silly RL module dependencies
* jquery.placeholder: Wasn't being used at all, removed
* rangefix: Only used in ce.Surface, moved to the module that contains ce.Surface

Change-Id: Idea65687752a9fd31e4ad7594181e402d26b579d
2015-02-23 17:37:42 -08:00
Ed Sanders d73e9d6a84 Update VE core submodule to master (e6a37e2)
New changes:
822236c Simplify slug behaviour

Local changes:
Add Vector-specific rules for slug animation

Change-Id: I812f6f8afc8733aae245f3606302f032e5e54675
2015-02-23 17:18:40 -08:00
Roan Kattouw 2e0c051a37 Load mw.feedback on demand
It depends on jQuery UI so it pulls in a bunch of things
that we can do without while loading VE.

This does mean there's a network delay while we load
mw.feedback (if it's not in localStorage cache already),
so after the user clicks "Leave feedback", nothing happens
for a little bit until the code arrives and the feedback
dialog appears. There is no spinner or anything during this
time; we may possibly want to add one.

Change-Id: Ie4dd9efcfff238fefad2783e22575ffd3fc648e7
2015-02-24 00:30:03 +00:00
James D. Forrester f59cd38eb3 Update VE core submodule to master (2eaf5c9)
New changes:
2e75a9b newFromDocumentInsertion: Also remap store indexes in internalList data
f04b980 Transaction#newFromDocumentInsertion: Add some more tests
60d051c ve.ce.FocusableNode: Ignore children of elements using CSS column-count in Chrome
1089125 [BrowserTest] Update Gemfile.lock
3f376f5 [BrowserTest] Define Rubocop LineLength as 100
ee63e73 Work around Firefox bug allowing cursor in cE=false
505369a Unify data transfer handlers for paste and drop

Change-Id: I5e9c3bdf45610cd4a46de7af9bec78fa1847c23c
2015-02-23 12:54:32 -08:00
James D. Forrester a3d2516479 Blacklist Safari versions 6 and below; whitelist 7+
Change-Id: Ie21b15c0e591c0df0793fd58b550728150ed0999
2015-02-20 09:51:05 -08:00
James D. Forrester fc92e5aaf8 Update VE core submodule to master (a7cd696)
New changes:
181561b Support generic data transfer handlers
ecdb379 Only replace selection when we know it has changed
afb37fd Remove some errant references to MediaWiki/Parsoid that don't belong
82f57e0 Update OOjs UI to v0.8.0
489ff8a Simplify AlignableNode by inheriting from ClassAttributeNode
bac7e30 Try html/plain text drop if no file handlers found

Change-Id: Id75692418c331191ea638128fe835350e334837d
2015-02-19 17:44:15 -08:00
Roan Kattouw 888b5eb889 Add dependency on ext.ve.mw in ext.ve.mwreference
MWReferenceDialog uses ve.init.mw.Target in its setup code,
so it needs this dependency. Otherwise the tests fail intermittently;
usually only when loading from localStorage for some reason.

Change-Id: I6c0f66263e2cf6ffcf926fefaac4de1e53eac130
2015-02-19 17:44:15 -08:00
Ori Livneh 7e6eba0fe8 Add a warning about $wgVisualEditorPluginModules race condition
Warn developers not to delist a plugin module and remove it in a single
deployment, since the relevant cache layers are not synchronized, making a race
condition possible. See I627a0d5d8 for an example.

Change-Id: I488bafa08a5eab6b40fa73bb5ca031fb5a6aa9ed
2015-02-19 15:30:26 -08:00
Roan Kattouw 9a4c192c44 Update VE core submodule to master (f86c97c)
New changes:
e325520 Create APIResultsProvider and APIResultsQueue and add tests
4ead645 Make newFromAnnotation test construct doc2 from data, not HTML
804fb17 Remove useless getDataElementFromDomElement / getDomElementsFromDataElement tests
c2fc6a0 DomFromModelTest: Call modify() on the document, not the data
1535331 Inline ve.ce.View#renderAttributes

Local changes:
Update modify callbacks to work on document instead of data.

Change-Id: Ia875d11627adc38f78dd5010f9ab03e8b083b448
2015-02-16 11:44:34 -08:00
Moriel Schottlender a3973145d5 Display image uploader and artist correctly in the media dialog
Add the display for the actual uploader, and change the label
for the artist to "Artist" for differentiating the two roles.

Bug: T88835
Change-Id: Ie939572e7c1240321556f6f81ed9e67d792a339d
2015-02-11 11:14:43 -08:00
James D. Forrester 1ffddc0d5b Update VE core submodule to master (c6dee65)
New changes:
7484fc6 Fix center alignment of alignable nodes
8b97cb2 Mix alignable into block images
dec17f2 ve.utils: Apply whitelist in setDomAttributes() attribute removal
f9919de Add attribute transformation for color attribute
7a2e278 Make CSS classes in alignable configurable
5b7f97b Handle showHandles smartness in AlignableNode
5a89e10 Emit position event before window transition, not after
6138c67 demo: Switch mode back to VE when changing page
167b3ed demo: Switch mode back to VE when changing language
2d8c3e7 Native leftarrow and rightarrow
aa2c7c5 build: Bump various devDependencies
1a7480a Add table styles for block images and move to init.sa
048a394 Avoid jQuery in ve.dm.BlockImageNode.static.toDataElement
894fcfa Localisation updates from https://translatewiki.net.

Change-Id: Id5e034b3bba6405b6b70e52d6f8926388743c2ce
2015-02-10 16:34:39 -08:00
Ed Sanders d6818c558d Use ve.ui.AlignWidget in media dialog
Change-Id: I70579971a22c5bfee1e373b57ba7fe24a46ef406
2015-02-10 10:49:53 +00:00
Moriel Schottlender aa9eb95455 Refactor MWMediaSearchWidget to use a queue and providers
Change the media search widget to work with resource queues and
providers. Create providers based on the user's filerepo settings
and aggregate their responses with the media queue. Stop asking
for more results from providers that are depleted.

Also fixes a rather nasty infinite-loop bug where the API returns
only very few images, and the UI keeps asking for more.

Bug: T78161
Bug: T88764
Change-Id: I65aed3446cd1f056476c56e6e04522c70e49e595
2015-02-06 16:45:56 -08:00
Kunal Mehta 55d9e76188 Add extension.json
Needs Iff1523b86f754ca in mediawiki/core to work properly.

Bug: T87992
Change-Id: I869873eef6d19fdaee75201b87d8c4a8d4d05f3f
2015-02-02 16:31:00 -08:00
James D. Forrester 9e8374bc71 Update VE core submodule to master (8218942)
New changes:
49ccab7 Localisation updates from https://translatewiki.net.
2a9dd3b Update OOjs UI to v0.6.4
bdcc3c5 Follow-up 6fc57d41: Update build results with grunt
960ee07 build: Fail in CI if there are resultant changes
ae85883 Rename file drop to data transfer
f8a530a Update OOjs UI to v0.6.5
9e6b090 Provide Platform#getConfig and shortcut ve#config
8218942 Localisation updates from https://translatewiki.net.

Change-Id: I1825668073aae66d33317ce31a6e2e179046ee1a
2015-02-02 14:14:39 -08:00
jenkins-bot d5f7bac940 Merge "Combine imageinfo requests" 2015-02-02 19:32:00 +00:00
Alex Monk 7876cc957a Combine imageinfo requests
By generalising LinkCache into ApiBatchQueue to request them all centrally

Bug: T75822
Change-Id: I097311ec2487bb1ae9f5d927c2c13c274ba716f9
2015-01-30 17:20:04 -08:00
jenkins-bot 7ff36511e4 Merge "Update VE core submodule to master (f2d7711)" 2015-01-31 00:59:28 +00:00
Ed Sanders e68eba2687 Update VE core submodule to master (f2d7711)
New changes:
4bb50c3 Localisation updates from https://translatewiki.net.
b7a5b87 dm.InternalList: Use DOM methods instead of jQuery .html()
5b09c9b Localisation updates from https://translatewiki.net.
b709d19 Add generic support of alignable nodes
a1f6c3d Localisation updates from https://translatewiki.net.
c29675a Add find next/previous to command help dialog
1e0b1ed Localisation updates from https://translatewiki.net.
7c76542 Don't render rowspan="1" colspan="1" for every table cell
99eb069 Show a message when an invalid regex is inputted in F&R

Local changes:
Bump command help height for new find next/prev commands

Change-Id: I0196775e499132262ba80acdbf1afc26ef4e8c77
2015-01-30 16:12:24 -08:00
This, that and the other ca9f22bac3 Implement ChangeTagsListActive hook
This allows users to visit Special:Tags or use the API to see
which change tags are still in active use.

The ChangeTagsListActive hook was introduced to core in
I77f476c8d0f32c80f720aa2c5e66869c81faa282

Change-Id: I18d921617ccd5eb19068bd4e4a202dabd73a3a17
2015-01-29 15:02:37 +11:00
jenkins-bot e9d770ed11 Merge "MWMediaDialog: Add contextual help for controls" 2015-01-28 23:42:01 +00:00
James D. Forrester 9f574bc96b Update VE core submodule to master (e56f537)
New changes:
3122891 Add keyboard commands for find next/replace
6b2969c Localisation updates from https://translatewiki.net.
65c1419 Fix resizeable CSS layers
6fc57d4 Don't use .hide() in ve.ui.Context constructor
7bbfc4e Re-implement ve.ce.ResizableNode#showHandles using CSS
3e004f6 Localisation updates from https://translatewiki.net.
a926617 ce.GeneratedContentNode: Import DOM elements into target document early

Change-Id: I45ce461da1a650c75e5bc1a24b4c38fafe456f9e
2015-01-26 10:38:02 -08:00
Alex Monk 34e4c6a51b Check for venotify on page load, not when VPT is created
Not sure what could have broken this or when. Or if it ever worked to be honest...

Bug: T58921
Change-Id: I069b5ccb4a78a6790e5791354402503676faa7fa
2015-01-22 23:50:02 +00:00
James D. Forrester d8f342a640 MWMediaDialog: Add contextual help for controls
Bug: T53798
Bug: T75731
Change-Id: Ideae0052c366a8c4e03285270569e5c5ca608ad8
2015-01-20 15:53:31 -08:00
jenkins-bot d7c80d4cf2 Merge "MWMediaDialog: Make the dialog bigger when searching for media to insert" 2015-01-20 19:52:11 +00:00
jenkins-bot 9db4e1ffd9 Merge "Don't load OOjs UI i18n strings as core does this already" 2015-01-20 16:54:31 +00:00