Commit graph

7322 commits

Author SHA1 Message Date
cmcmahon 0ff3cf3436 [browser test] Transclusion test now uses API for test page
Also re-enabled for Chrome

Change-Id: Ibeaa993413178148d1ee6601d27c30e61e82bcb2
2014-05-09 09:48:22 -07:00
Timo Tijhof 7dae6496b3 mw.ViewPageTarget: Get rid of FOUC on edit section brackets
We don't have a FOUC on the appearing of the 'edit' link. That
one is handled quite intelligently:
* Via the stylesheet that is also loaded in noscript mode, its
  (hidden) appearance is already predetermined. So as soon as
  those elements are seen by the browser they style correctly
  for users without JavaScript (display: none).
* This same stylesheet also hides it for users with JavaScript
  but where VE is not available (e.g. due to browser support).
  While ve-not-available is added very early on (before
  document ready), it could in theory cause a short FOUC, but
  that's okay. We simply don't know that VE isn't supported
  until then. We optimise for the common case (JavaScript
  enabled, VE available), while still ensuring that it is
  always hidden in noscript, and is hidden as soon as possible
  when VE turns out not to be available.

For some reason, one small detail (the little bit of whitespace
added inside the brackets), was left out of this and was
implemented by adding the class 'mw-editsection-expanded' to them
from a document ready handler.

* First step, get rid of the script that adds this class and
  use ve-available instead. That means they're styled
  correctly much earlier (we add the class to <html> before
  document ready). This can still cause a brief FOUC, though
  in most cases they're correct from the start.

* Step two, make brackets expand by default for script users,
  and let ve-not-available reset it. This way, like with edit tabs,
  a FOUC will never happen for ve-available. And even for
  ve-not-available, a FOUC is rare since we add it before
  document ready via <html> look-ahead styling.

There was still a brief reflow jump because of negative margins
between two paint events. One was undoing the other at a later
time. These negative margins are a remnant of when we were doing
animations (follows-up I4b9c47fd65a70). They were added to reduce
reflows and content shift, but were now actually causing them.

Removed "padding-right" from mw-editsection, and negative margin
from the brackets.

Also:

* Don't add inline 'style="direction: ltr;"' on every single
  editsection throughout the DOM. This was the only operation we
  were doing unconditionally. While I doubt the need of it in
  general, we can at least allow MediaWiki to do it right, and
  only add the override if needed. This saves quite a few DOM
  operations.

Change-Id: I7a729edc2cd4a66ebc0ad6935ffd02cb9b948bff
2014-05-09 12:20:24 +02:00
jenkins-bot ad1d9d1b63 Merge "Cache image scalable promises by filename" 2014-05-09 09:19:27 +00:00
Moriel Schottlender 97bc12a421 Cache image scalable promises by filename
Make sure that each API request per file is delivered once. If the
file appears more than once on the page, the API request for
scalable details will be sent once and cached so there aren't
multiple API requests per image.

Change-Id: I68507a8ceb31b77dbf33d1074939ce6219cf076e
2014-05-09 11:17:06 +02:00
kaldari dc596bf31b Moving citation tool code in API module into its own function
This should slightly improve the readability and modularity of the
code.

Change-Id: Ie4dcbeca550129c2fcea69f011d0297f334ea235
2014-05-09 08:56:40 +00:00
Translation updater bot 2d10c47f7d Localisation updates from https://translatewiki.net.
Change-Id: I28e59b0ea33c8037b18e55c69fe63db2bb709718
2014-05-08 20:49:45 +00:00
cmcmahon a367ee5fa9 [browser test] References test has own page now
Also re-enabled for Chrome

Change-Id: If61848d24d9133fef514ef5c360d6d90f943abaa
2014-05-08 13:11:23 -07:00
cmcmahon 9882e67605 [browser test] Don't select link text in test
Avoid bug 64655

Change-Id: Id7d241e1ccb1591027a42c29478c2855dfd5813c
2014-05-08 12:46:30 -07:00
cmcmahon cbc2fcbd28 [browser test] Media has its own test page
Also figured out that send_keys(") is the way to "click"
in the VE ContentEditable div

Change-Id: Ib2654a6026023f4c802eee72565d6b51731cb86e
2014-05-08 12:29:02 -07:00
Moriel Schottlender bf1574f888 Add MobileSurface to .docs/eg-iframe.html
Change-Id: Id3b84ac20f81be470e541d5e45f6dd93cfcb9c8c
2014-05-08 02:25:22 -04:00
cmcmahon c416e78dcf [browser test] Indent outdent test now uses the API
And re-enabled for Chrome also

Change-Id: I8e4182d25f238c987a6c47088bb302ad33d9cec6
2014-05-07 14:36:05 -07:00
jenkins-bot 8805d5427b Merge "[browser test] Refactor Headings test to use the API" 2014-05-07 20:45:35 +00:00
jenkins-bot 5ef8131510 Merge "ve.ui.MWMediaResultWidget: Use .on() instead of .error()" 2014-05-07 20:42:33 +00:00
cmcmahon b62359f6f6 [browser test] Refactor Headings test to use the API
Re-enable this to run on Chrome also

Change-Id: Ia73778be44629a27a0ee4e3cde94f7fe2c2bf46e
2014-05-07 13:27:39 -07:00
Translation updater bot 70d7fb7e6b Localisation updates from https://translatewiki.net.
Change-Id: Id13dd8c7e44a8796d651cde18bf6f644a20e45d2
2014-05-07 20:02:41 +00:00
Timo Tijhof 9455e1f3ab ve.ui.MWMediaResultWidget: Use .on() instead of .error()
> JQMIGRATE: jQuery.fn.error() is deprecated.

While at it, also avoid using the overloaded .load(). It has
quite a few different signatures (one of them is to load $.ajax
by url and replace the contents of the element, completely
unrelated), and calling .on() directly is quicker as well.

Change-Id: I139b0c603577b5a0102d2ff679bd86b792830e3e
2014-05-07 20:35:19 +02:00
cmcmahon 54fd7c9184 [browser test] Links test to use API for target page
Note that I reported Bug 64655 for Chrome but upon refactoring
this test I find the buggy behavior now in Firefox but Chrome
is fine.  Browsers are weird, and the Links inspector is too.

Change-Id: Ibd90a33bb43342dc1d7410d621f01875e1c177bf
2014-05-07 11:34:11 -07:00
jenkins-bot 610f41e06a Merge "[browser test] template workflow changed somewhat" 2014-05-06 23:58:03 +00:00
cmcmahon 98f955e395 [browser test] template workflow changed somewhat
possibly WIP

These changes make the test pass, still thinking about whether we
should test the workflow changes, which are cognitively different
than before

Change-Id: I85955836f0eeedcb55e7a5260101339d2f73d2e6
2014-05-06 16:07:03 -07:00
jenkins-bot 0496bd8450 Merge "Fix watch list" 2014-05-06 23:06:12 +00:00
jenkins-bot 74faf0d2de Merge "[browser test] Refactor markup test to use API" 2014-05-06 22:14:04 +00:00
Ed Sanders 6ec688f5b0 Fix watch list
Change-Id: I1f6715911ec15502b732cff7db0a33efa609b814
2014-05-06 23:12:39 +01:00
James D. Forrester bd2d1eb689 Update VE core submodule to master (f855dbb)
New changes:
b69a7f3 Update OOjs UI to v0.1.0-pre (7d2507b267)
94fd162 Localisation updates from https://translatewiki.net.
f631a8f Fix Dialog support on mobile

Change-Id: Ifcc88c95e65994c2047b01fe7485d4b9a4c4b52c
2014-05-06 13:18:36 -07:00
Translation updater bot 35b5d8d71d Localisation updates from https://translatewiki.net.
Change-Id: I1a6f062eb4ad48f9f09f3c0bbdac75e468ae6e68
2014-05-06 19:55:10 +00:00
cmcmahon 90cfcb78c1 [browser test] Refactor markup test to use API
Moved "Given I go to" step out of bullets_steps
and into shared_steps since two tests now use it.

Change-Id: I354c15ddd86c9b921db7105e746239fdced2e520
2014-05-06 10:33:02 -07:00
Timo Tijhof ad2fdfb66b ve.init.mw.ViewPageTarget: Actually animate the toolbar during setup
There was a slideDown() call, but this didn't do anything since
toolbars are visible and in the DOM by default.

As a temporary hack, hide it synchronously after creation and
then do the slideDown still.

This could ever so briefly cause a flash, though that didn't
happen in my testing.

This makes the experience smoother when we initialise the surface.
In particular the moment where we swap #bodyContent for our Surface
(which should look visually almost identical), before this change
it was still a bit of a flash since the Surface version has a
toolbar on top, and thus instead of swapping smoothly, we hide
content and show a similar piece of content that has an incompatible
offset from the top.

Bug: 64751
Change-Id: Id94974ba71fd887ce494d7b2b16ec62d43b18575
2014-05-06 02:43:37 +00:00
cmcmahon 1a16b5aa9e [browser test] refactor bullets test to use API etc.
Get rid of all hard-coded values for both the target page
and also the text on the target page, which is now all set
in the .feature file.

Note that we're deconstructing the @make_selectable hook
by doing this. @make_selectable may become obsolete when
all the tests are refactored to use APIPage

Change-Id: Iad1b160d9d0274effb8504f276bd4816932d299c
2014-05-05 21:44:53 +00:00
Roan Kattouw 0bcab80d2a Stop explicitly setting autoFocus to true now that it defaults to true.
Change-Id: I8544cf83d8665848b8da8a7e2bbef9f8518e23ef
2014-05-05 14:18:12 -07:00
James D. Forrester 03e4e6528f Update VE core submodule to master (cc6e87c)
New changes:
52a5c2c Localisation updates from https://translatewiki.net.
10fd54b Localisation updates from https://translatewiki.net.
30c1a3d generateDocs.sh: Simplify
e2cb3c1 Localisation updates from https://translatewiki.net.
cc6e87c Fix command help for CTRL+1-6 on mac

Change-Id: I12787f3f38467dce10458342ac0d586902575d02
2014-05-05 14:12:31 -07:00
James D. Forrester 0d18b3a060 Follow-up I54d2cf7f05: More s/parameter/field/g
Change-Id: I592c299f62dbec3479c4ed95a43359bb7c2f91d4
2014-05-05 13:29:40 -07:00
Translation updater bot 2b3e19b0e7 Localisation updates from https://translatewiki.net.
Change-Id: I5ca99ad25312a4b5270c4662376be1539b8b166e
2014-05-05 20:21:09 +00:00
jenkins-bot 5e4ab8bafe Merge "Enable references on mobile" 2014-05-05 20:10:32 +00:00
jenkins-bot bebbb6ab40 Merge "Label parameters as 'fields'; in the 'add' button, call it 'more information'" 2014-05-05 19:40:57 +00:00
James D. Forrester cb48491e42 Label parameters as 'fields'; in the 'add' button, call it 'more information'
Change-Id: I54d2cf7f0564ba989ca8e80747ed17e6f0483ad2
2014-05-05 12:26:28 -07:00
jenkins-bot 65ed605741 Merge "Generate PHP VE edit section with correct parameter, vesection" 2014-05-05 17:58:56 +00:00
James D. Forrester 087d49e4a4 Point language Beta Feature links to the right messages
These were erroneously:

* visualeditor-preference-experimental-info-link and
* visualeditor-preference-experimental-discussion-link;

should have been:

* visualeditor-preference-language-info-link and
* visualeditor-preference-language-discussion-link.

Whoops.

Change-Id: Ic2780c1d7a0fb5bc5673d1d3a7277661fd759bb3
2014-05-05 09:22:51 -07:00
Matthew Flaschen e5f79c81b9 Generate PHP VE edit section with correct parameter, vesection
Bug: 52566
Change-Id: I504c44dbe9bf953acf17508788b7b60d099aa04e
2014-05-04 23:04:35 -04:00
Translation updater bot f5080d69d1 Localisation updates from https://translatewiki.net.
Change-Id: I0e5220323390c07e592f2839c7299e05e293a2a7
2014-05-04 20:09:48 +00:00
jenkins-bot 13a7023dd6 Merge "generateDocs.sh: Simplify" 2014-05-04 02:43:08 +00:00
Translation updater bot 1ed9e43d5a Localisation updates from https://translatewiki.net.
Change-Id: I36e25f906c6e57dcd25819f40361eb412976c529
2014-05-03 20:01:43 +00:00
Timo Tijhof d6478ec548 generateDocs.sh: Simplify
* Make more like mediawiki-core's mwjsduckgen.
  - Use bash set -e to have the script abort early when any
    part of it fails (especially the jsduck command).
  - Since it will abort early, we don't need the 'test' for the
    symlink. If jsduck succeeded, it will have re-created the
    docs directory and thus not have the symlink yet.
  - Don't "cd" into anything from the script, simply use absolute
    paths instead. Both jsduck and ln support this.

Change-Id: I03c02d590e0f696c78da87ff638bb407e48a7cd7
2014-05-03 21:16:24 +02:00
Trevor Parscal 62324167ff Update VE core submodule to master (a1e9df1)
Also adjust calls to InputWidget methods changed in
I324dfc2 in OOUI.

New changes:
9da32d7 Update OOjs UI to v0.1.0-pre (e6edd86d37)
b6aa671 Localisation updates from https://translatewiki.net.
1cba6e0 Update OOjs UI to v0.1.0-pre (9a6c625f5f)
94629f9 Localisation updates from https://translatewiki.net.

Change-Id: Id58d199c7ce3332a104ab2a5c395561ab94ae060
2014-05-02 15:50:32 -07:00
Juliusz Gonera 72fdab7a0d Enable references on mobile
Further styling and UI improvements in upcoming patches.

Change-Id: I8f93f2a2a6a6eb0c3a9953c7c479f92872d5b621
2014-05-02 14:49:19 -07:00
jenkins-bot e86ed0c2fb Merge "[browser test] further adventures of avoiding login to edit" 2014-05-02 20:19:03 +00:00
Translation updater bot 3551192d74 Localisation updates from https://translatewiki.net.
Change-Id: Id6e4338da89a331bd6c14539cb8067e6c7263994
2014-05-02 19:53:13 +00:00
cmcmahon fcffffbb99 [browser test] further adventures of avoiding login to edit
Using @edit_user_page hook is a workaround that avoids the
problem where Selenium brings up Firefox with the cursor in the
address bar

Change-Id: Iba42cbb74378952760db3db68130ac74219cde9b
2014-05-02 15:43:16 -04:00
cmcmahon 5858fb6e5b [browser test] CE locator is simpler than it was
Change-Id: I3faa6de871b2e86cbd07b2e9f492e1788434e804
2014-05-02 15:06:55 -04:00
jenkins-bot 6a20e1b89f Merge "Fix typo: this.transclusionNode -> this.selectedNode" 2014-05-02 18:13:01 +00:00
jenkins-bot 9f3f95d095 Merge "ve.init.mw.ViewPageTarget: Hide #contentSub in addition to #toc when muted" 2014-05-02 18:03:37 +00:00
Timo Tijhof 0b96e0dc3a ve.init.mw.ViewPageTarget: Hide #contentSub in addition to #toc when muted
Yet a another visual shift eliminated. Getting closer..

Bug: 64751
Change-Id: I9ae7afc439648e62712f6dedb7cecc07a653675a
2014-05-02 18:52:02 +02:00