Commit graph

9552 commits

Author SHA1 Message Date
Moriel Schottlender 1fd395e26e Focus the surface after VE is already active
Move the surface focus() call to be done after VE has loaded, to
make sure that the position of the content editable field is at the
top of the page and not -- as happens in Firefox -- after the read
page contents.

Bug: T90420
Change-Id: If91cea42c083d67b1ee6396402c3f607dde70471
2015-03-10 19:22:17 +00:00
jenkins-bot ff31db5314 Merge "Reduce complexity around onbeforeunload handler" 2015-03-10 19:17:34 +00:00
jenkins-bot 07f2992a6a Merge "Do not call Toolbar#initialize twice during editor setup" 2015-03-10 18:16:09 +00:00
Bartosz Dziewoński 11d9c55b07 ve.init.mw.ViewPageTarget: Recalculate toolbar sizes when adding "Save" button
This really should not be necessary.

Depends on I17d22ba6 in OOjs UI.

Bug: T52227
Change-Id: I024dccb0c1cc24dd8390dd44fb7a2d987eef56ea
2015-03-10 17:30:56 +00:00
James D. Forrester b89d09c7b6 Update VE core submodule to master (e85ed49)
New changes:
8925df7 Transaction tests: Assert specific exception messages
6a583b0 ve.dm.Document#buildNodeTree: Throw an exception for unclosed inline nodes
5d6fd2b Localisation updates from https://translatewiki.net.
57baeb1 Use modifier functions keyed by name for queued modifications in TransactionProcessor
04e7b17 Make transaction processing exception-safe
11c4cb7 Add test for heading1->heading2 content branch conversion
aa8fb76 When replacing e.g. heading1 with heading2, use attribute changes
b2db809 Unbreak cursoring inside table cells
2bbde7d [BREAKING CHANGE] ve.utils: Remove ve.getObjectKeys in favour of Object.keys

Change-Id: Iede19c061732ca73d6f97031c3c89345ac02ac58
2015-03-10 09:44:57 -07:00
jenkins-bot 557e0e28ad Remove use of ve.indexOf and ve.getObjectKeys
Change-Id: Icbaa729209605fca8018e4bcbbe29c9ded64e7f2
2015-03-10 17:28:00 +01:00
Bartosz Dziewoński 1dced9e78d Do not call Toolbar#initialize twice during editor setup
Depends on Ib9471bc0 in VisualEditor core. Without that patch
this is actually necessary, because we were removing some event
handlers in the meantime.

Change-Id: I145f1891efd1c91eeb6154e11e96e3fc160e2be3
2015-03-10 14:11:16 +00:00
jenkins-bot fdfc7c6386 Merge "Remove useless ve-ce-mw*Node classes from GCN subclasses" 2015-03-10 12:50:42 +00:00
jenkins-bot eb79687c83 Merge "mw.ViewPageTarget: Hide ve-ce-surface during deactivation" 2015-03-10 09:58:52 +00:00
Timo Tijhof c1accbb61d mw.ViewPageTarget: Cache '#mw-imagepage-content' query
Follows-up eb7b727a53.

Change-Id: If8bed5626ccba9e69d30b770bb2eeed3c6264c7d
2015-03-10 02:53:05 +01:00
Timo Tijhof 77f016ae8f mw.ViewPageTarget: Hide ve-ce-surface during deactivation
While showing the content earlier as soon as possible is nice, the ve-ce-surface
remained visible until toolbar and surface were torn down.

This avoids the split second where the new pageview content *and*
CE surface were visible in the page (this it also messed with the scroll position,
and would temporarily cause a scrollbar to appear).

Bug: T91442
Change-Id: I0a7232cd0264bff28ad66aa328de29d339891aa1
2015-03-10 02:48:24 +01:00
jenkins-bot 581a6a40fa Merge "Update VE core submodule to master (d449684)" 2015-03-09 23:55:23 +00:00
jenkins-bot 7f32ae9b68 Merge "i18n: Change grammar of suppress redirect update message" 2015-03-09 22:10:34 +00: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
Translation updater bot 9901c022b1 Localisation updates from https://translatewiki.net.
Change-Id: I38f78fad3db8cd6cf34ccfd5d1000fa41052cfdd
2015-03-09 22:10:55 +01:00
Moriel Schottlender 4fc02cea6a Use a detached icon in transclusion node
In the case the node is empty and we need an icon, use a separate
icon element that is detached and reattached as needed.

Change-Id: I5bcbe531cb1db1a4ac25ed4a2f462dde08513b7b
2015-03-09 12:05:32 -07:00
Moriel Schottlender be965d1c4f Follow-up I11b9f0ab: Only make icon on transclusions that require it
When deciding to add an icon to a transclusion (specifically, when
it is hidden) do so only if it is justified. Otherwise the
node becomes the icon even when it has information in it, which,
starting from the latest OOjs UI change, also has specific (small)
sizing.

Change-Id: I521c92fc645a392077e6cc90f55557c4cea3cb11
2015-03-09 17:54:55 +00:00
James D. Forrester cabf2d9ab3 Update VE core submodule to master (d449684)
New changes:
e98b4ab build: Bump various devDependencies
910af78 jsduck: Set --processes=0 to fix warnings-exit-nonzero
ed29114 Factor attribute setting code into ElementLinearData
143d3ff Move ve.dm.Document#spliceMetadata to dm.MetaLinearData
9ca7a70 Remove unused variables in dm.TransactionProcessor#applyAnnotations
a4847a3 Remove unnecessary support for nesting annotation and replace operations
c451a3c Queue linear model modifications in TransactionProcessor
98b253d Followup 11f507a98f62: also restore rowspan and colspan on TableCellNodes
dbecd01 Fix margins of indicators in table context

Change-Id: If137035b36a47eef5d8f16a3e0ef8c93542f7b19
2015-03-09 09:19:06 -07:00
Roan Kattouw 6648f94982 Remove useless ve-ce-mw*Node classes from GCN subclasses
Since GCN aggressively modifies this.$element, these classes
didn't survive for very long, and they weren't being used
anyway.

Change-Id: I6e9827499374941fbded983956c57cc250d957c8
2015-03-09 12:05:30 +01:00
Translation updater bot b982ec4a77 Localisation updates from https://translatewiki.net.
Change-Id: Iba1d7414b1c8fd1e3215fb965ff849553c24ecf6
2015-03-08 21:50:54 +01:00
Jamison Lofthouse 6b4608c7f3 i18n: Change grammar of suppress redirect update message
Changed the message of the update redirect message that is found in the page settings popup to something that is grammatically correct.

Change-Id: I71eaa143274742ebc19720f5a1b72008025d69e3
2015-03-08 01:28:09 +00:00
Timo Tijhof 9fd753e7a7 build: Enforce disallowMixedSpacesAndTabs jscs rule
Also, fix @returns comments (should be @return) and remove unnecessary
@method comments from the documentation.

Change-Id: Icd303626ac745c7ab5bff164f9b8cac276de1523
2015-03-07 16:49:30 +00:00
James D. Forrester 5db66faea9 build: Update jscs to latest
Change-Id: Ic1193d5557e0a3468c16896767888e8a593671e0
2015-03-07 04:05:44 +00:00
jenkins-bot 26a7e990fa Merge "Update VE core submodule to master (300b89a)" 2015-03-06 20:13:07 +00:00
jenkins-bot cdee219127 Merge "Add composer entry point for phpcs and linting" 2015-03-06 16:51:20 +00:00
Kunal Mehta 5ffdabd2db Add composer entry point for phpcs and linting
Bug: T90943
Change-Id: I0a95ef0f12149aaccdc3e7383c99b694a9dce990
2015-03-06 08:44:30 -08:00
jenkins-bot cce90e48e4 Merge "ve.ui.MWLinkTargetInputWidget: Fix documentation" 2015-03-06 11:21:54 +00:00
jenkins-bot b63b7ab744 Merge "ve.init.mw.ViewPageTarget: Use mw.Api#postWithToken for setting hidebetawelcome pref" 2015-03-06 11:21:52 +00:00
jenkins-bot a79d587125 Merge "ve.init.mw.Target: Don't go into infinite recursion on API errors" 2015-03-06 11:20:13 +00:00
Bartosz Dziewoński 4c22083d07 ve.ui.MWLinkTargetInputWidget: Fix documentation
This function was not returning a jqXHR for a long time. It's usually
a mw.Api promise, but might be something else.

Change-Id: I59975cc9dfbea70e5ae666fcc9915f10bd199e4d
2015-03-06 11:14:34 +00:00
Bartosz Dziewoński d5bf7e9e9e ve.init.mw.ViewPageTarget: Use mw.Api#postWithToken for setting hidebetawelcome pref
We can't use it for saving because we need to display a warning if
the user's identity changed.

Change-Id: I05919e407cd19d96c506671020bcdb95f3e2acaf
2015-03-06 11:11:03 +00:00
Bartosz Dziewoński 1656d3495e ve.init.mw.Target: Don't go into infinite recursion on API errors
The #tryWithPreparedCacheKey method was assuming that the request
could only fail because of invalid cache key. It can also fail because
of a bad token, and probably for a number of other reasons.

So only retry only once, and then fail. If it's a 'badtoken' error
during save, the caller will handle it and retry with a working token.
If it's something else, who knows, but we don't go into infinite loop
at least.

Failing in a way that will be handled is weird because 8e48f945 changed
the signatures of the promises, but not the functions that use them.
This must be fixed later.

Bug: T91158
Change-Id: I103cf888d339b44e3fd4fe2376edf5e37ce4157f
2015-03-06 02:47:47 +01:00
James D. Forrester 679b29cbf4 Update VE core submodule to master (300b89a)
New changes:
300b89a Follow-up Id9e657f12: Don't add moreTextStyle to the same group as it breaks downstream

Change-Id: Ie1373765e0836c6e9c85fd68efb5489f8be18416
2015-03-05 16:19:36 -08:00
James D. Forrester 19eacc8fe1 Follow-up I11b9f0ab: Make the MWTransclusionNode icon a fixed size
Change-Id: Ib4fd9abbd36c59c5bc5e0b5378793f9d57c0568f
2015-03-05 23:48:04 +00:00
James D. Forrester 2c689a4790 Follow-up I5918367: Add new classes to jsduck.json
No idea how this passed the first time…

Change-Id: I690d10f4f69c657bc58f989c545905649f97add8
2015-03-05 15:43:24 -08:00
James D. Forrester 9d0bb8f56e Update VE core submodule to master (9fb4bdb)
New changes:
266b558 Fix typo in direction calculation
6469b5b Update OOjs UI to v0.9.0
f98bb5c ve.ce.CommentNode: Specify 'background-size' override
4358560 Localisation updates from https://translatewiki.net.
cba6ffe Fold text style dropdown into basic text style bar in toolbar

Change-Id: I59183674ad2cfab2ef62bbd4d4acd105735aa293
2015-03-05 14:57:20 -08:00
Timo Tijhof 5813d53271 Update JSDuck config to standard jsduck.json
Also
* This way we don't need to pass the --config=jsduck.config.json
  parameter but can run plain 'jsduck' in Jenkins. Allowing it
  to use the standard job template for testing.

* Move processes=0 to jsduck.json.
  Workaround for https://github.com/senchalabs/jsduck/issues/525

* Use standard ' - Documentation' suffix, which makes the first
  part of the title render in bold (similar to how we do in OOjs
  and OOjs UI already).

Change-Id: I6c9c7a1f29df0a72dc8cd0d37a83aaef23068062
2015-03-05 23:51:53 +01:00
jenkins-bot 432384096e Merge "Add an icon to hidden templates" 2015-03-05 22:38:47 +00:00
Translation updater bot 16f7de1e04 Localisation updates from https://translatewiki.net.
Change-Id: I6b844d3548e64a696f772acc20062b70f676fded
2015-03-05 22:30:14 +01:00
Amir E. Aharoni adb4b2106a [BrowserTest] Update Ruby gems
The latest version of selenium-webdriver is needed to work with Firefox 36.

Change-Id: If00700141527fc5d0c1779bd186a71039c8063e4
2015-03-05 10:51:19 +00:00
jenkins-bot 56b95f2fac Merge "Update VE core submodule to master (79004c9)" 2015-03-04 19:20:23 +00:00
jenkins-bot 1a40f3c048 Merge "Add a threshold to 'read more' calculation in media dialog info" 2015-03-04 19:15:01 +00:00
Moriel Schottlender 06f29f343a Add a threshold to 'read more' calculation in media dialog info
When calculating whether to show the 'read more' button on fields
that are configured 'descriptions', use a threshold to check if
the height is enough to be shown.

Bug: T87265
Change-Id: I0601e4fa92cb58903641a146500cf560bc029425
2015-03-04 11:04:53 -08:00
James D. Forrester ba45620da9 Update VE core submodule to master (79004c9)
New changes:
b66e48d Use the inspector's previousSelection for context positioning

Change-Id: I7855519f5ad806ace2304ed6e1f5458363ffb440
2015-03-04 10:49:32 -08: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
jenkins-bot 0ea0691ad7 Merge "Correct jquery.uls dependencies" 2015-03-04 18:05:36 +00: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
James D. Forrester 32613d204d Update VE core submodule to master (7dcd5e8)
New changes:
61e1646 Resolve URLs in LinkContextItem
91d1814 Handle optional parameters correctly in table selection
c2810ce Fix up selection if we cursor into or next to a table node
11f507a Don't call .addClass() in CE nodes' setup handlers

Change-Id: Iad402ddab1ca8b736c79589e4724882a41eaa6e1
2015-03-04 09:48:35 -08:00
Roan Kattouw ec2bff5535 Resolve URLs in MWInternalLinkContextItem
Exactly the same change as Ifee722a7f60.
Because we have such excellent code reuse, or something.

Bug: T85622
Change-Id: I18bd5d3923771b6ff149aa589bb2fa23beecf4f5
2015-03-04 17:17:06 +01:00