Commit graph

639 commits

Author SHA1 Message Date
jenkins-bot e6997350ba Merge "Check for stopped propagation before showing close dialog" 2014-12-13 00:52:57 +00:00
Ed Sanders 9459e4e240 Check for stopped propagation before showing close dialog
Various VE elements use escape to perform tasks. Particularly
difficult are OOUI dialogs which listen to the document and thus
fire after this target's listener, so defer and check if the
event was previously stopped.

Bug: T78201
Change-Id: Ie335f199766923833588202626c3af8e4cbcb9b5
2014-12-12 22:38:40 +00:00
jenkins-bot 87143d4c36 Merge "Mark primary buttons as progressive as well" 2014-12-11 22:59:04 +00:00
James D. Forrester 57a68d082b Mark primary buttons as progressive as well
Also make save button primary.

In anticipation of Iee91d2c6 in OOjs UI

Change-Id: I123044bfaba631866ad32a35643f23686a17a16f
2014-12-11 22:55:16 +00:00
Ed Sanders 45518019eb Update VE core submodule to master (9ac8136)
New changes:
9929b6d [BREAKING CHANGE] Make ve.init.target an OO.ui.Element

Local changes:
* Fix target constructors now they generate this.$element

Change-Id: Ia6bf604c67305834a3f73863a10336cfbb83fa77
2014-12-11 14:00:28 -08:00
Ed Sanders d6067d5718 Update VE core submodule to master (cf1e167)
New changes:
776e801 Delimit text nodes in debug observations
72643bc Remove debug bar hiding now it is handled by the surface
cf1e167 [BREAKING CHANGE] Multiple surface support and demo

Local changes:
Account for detachable toolbars in core being setup in a different order.

Change-Id: I29156948711d55ba5f6dd4f6c35ca0e4cca32373
2014-12-11 12:49:29 -08:00
jenkins-bot eacb364ed1 Merge "Add timing data for the first transaction" 2014-12-11 03:06:14 +00:00
Roan Kattouw 49b26f886e Add timing data for the first transaction
This doesn't quite tell us about the user's first interaction with
VE (if they open a dialog, for instance, it could be minutes before
that results in a transaction), but it's a good start.

Bug: T76524
Change-Id: I6bac987332802d7363ed65a471b2b1ece67086d8
2014-12-11 03:02:11 +00:00
Ed Sanders 34a82928c1 Update VE core submodule to master (3feadb2)
New changes:
fc4af20 Fix filibuster expansion bug
3feadb2 [BREAKING CHANGE] Refactor for multiple surfaces

Local changes:
* Use target.getSurface now that targets can have multiple surfaces
* Remove debug bar code now surfaces manage their own
* Remove import rules code now implemented in base target

Change-Id: I18d6f9f2f36431959d31347b4c1952a1aca1350e
2014-12-10 16:39:10 -08:00
Roan Kattouw a032ea039e Move from legacy TimingData schema to new statsd API
This API doesn't have the ability to track any other data
in addition to a name and a duration in milliseconds, so
we add the target name ('mwTarget' or 'mobile') to the
event name and discard all other data.

Change-Id: I25ae0243f8983142d7755b65b05c18d5df36a253
2014-12-10 00:25:42 +00:00
jenkins-bot ed22cbffea Merge "Prefer localStorage to store ve-beta-welcome-dialog" 2014-12-09 22:39:09 +00:00
Alex Monk 51b091b9cd Prefer localStorage to store ve-beta-welcome-dialog
Bug: 62884
Change-Id: I3fe45e890c29aaa8d28edfb6986dc8c7541861c7
2014-12-09 21:04:13 +00:00
Roan Kattouw 29995d806b Remove IEHacks.css in favor of .ve-init-target-ie class
Move reference style hack to MWReferenceNode.css, and move
heading style hack to ve.init.mw.Target.css

Change-Id: Icbd53f8df998c9f7bcc701b7c29dc226dfc5c05f
2014-12-08 15:45:23 -08:00
Roan Kattouw 3321261e98 Split up ve.init.mw.ViewPageTarget.css
* Move styles that apply to all targets to ve.init.mw.Target.css
* Move styles for MWPopupTool subclasses to ve.ui.MWPopupTool.css

Change-Id: I34c8a6200ee337debf00c4e432948f1b86f1b60a
2014-12-08 15:42:19 -08:00
jenkins-bot 09bfc0cb9c Merge "Followup 1c04d32d: release saveDialog reference even if closed" 2014-12-08 23:06:37 +00:00
Roan Kattouw dad06ef495 Followup 1c04d32d: release saveDialog reference even if closed
It's good that we're not trying to close the save dialog
if it's not open, but we still need to release our reference
to it in that case, otherwise trying to open the save dialog
in a new incarnation of the editor will fail.

If you opened VE, opened the save dialog, closed it,
went back to read mode, opened VE again, and tried to open the
save dialog again, it would fail because it tried to open
the cached reference to the previous editor's save dialog.

Bonus: prevent JS errors in this case by only attaching an
onClose handler if the dialog actually opened successfully.
If opening the dialog failed, the callback parameter isn't
a promise but an OO.ui.Error, and calling .always() causes
a JS error.

Change-Id: I62d6d3e7cd3df2c29a0c99e2e23bf1aac5187a12
2014-12-08 14:49:39 -08:00
Timo Tijhof ee954cbdd5 Use String#slice instead of discouraged String#substr
Aside from the confusion and differences between substr() and
substring() and IE8 bugs with substr(), substr() was removed from
the spec as of ECMAScript 5. It's been standardised in the
optional Annex B section of ES5.

Change-Id: I221ef6ae6956ce20dd9bb74510500f747d04c3b1
2014-12-06 21:26:20 +00:00
James D. Forrester baffe9d7e1 Update VE core submodule to master (32397d8)
New changes:
5e60f12 Ensure clipboard key is removed from paste target
32397d8 Update OOjs UI to v0.4.0

Local changes to compensate for new OOUI version, and updated wfUseMW call.

Change-Id: I005f7b23a36e04f1305d4aa037c19a5c7db9a699
2014-12-06 12:28:07 -08:00
Alex Monk b0b53befdc Fix call to mw.log.warning
Should be mw.log.warn

Added by I111176b8

Change-Id: I58b78e89a7f5a21fe050e2a90bf856c388f7213d
2014-12-03 23:35:51 +00:00
James D. Forrester e722c1726f Update VE core submodule to master (0229301)
New changes:
5eb7294 Find and replace
123a6ad Find and replace tool
557f70f Go backwards through find and replace results on shift enter
4a4ed81 Allow language widget to filter on available languages

Local changes to adjust.

Change-Id: I15e14d6d3c7ee60e465baf3a4df7572851cbca3e
2014-12-03 10:36:39 -08:00
Roan Kattouw dbf232a7dc Clean up deactivate mess
Both onDocumentKeyDown and onViewTabClick would check
this.activating and invoke deactivate() differently depending
on its value. That's ugly, so incorporate the "don't show a dialog
if deactivating during activation" logic into deactivate() itself.

Rename the override parameter to noDialog, and fix the broken
logic around it (it overrode too much).

Also move setting this.activating = false; out of these event
handlers into cancel(), where it clearly belongs because
activatingDeferred is being rejected there.

Change-Id: I6c040c74d36f829128a175f00d4e712dd19d31a7
2014-12-02 16:50:36 -08:00
jenkins-bot 45e98c7699 Merge "Cancel VE when escape key pressed" 2014-12-03 00:33:19 +00:00
Alex Monk c0fd5e616d Cancel VE when escape key pressed
Or at least open the confirmation dialog about it.

Relies on I0047bd9d to not break stuff on the second try.

Bug: T52868
Change-Id: Id178a2a0aad2f4bf5f589d66efde61aaa6fae498
2014-12-02 16:29:15 -08:00
jenkins-bot d7f954b1b5 Merge "Make LinkCache fail more gracefully when given undefined" 2014-12-02 22:45:08 +00:00
Roan Kattouw 2ed648c4db Make LinkCache fail more gracefully when given undefined
If you tried to do styleElement( undefined, $element ), you'd
get an exception in the mw.Title constructor from a setTimeout.
That's not very nice, and there's no point sending non-strings
through the queue and other data structures in LinkCache, so
instead just make get() return a rejected promise when given
non-string values.

Change-Id: Iab06929d7e232a8ecd8eb1eff9d1190c303421c1
2014-12-02 14:02:45 -08:00
jenkins-bot d71279cdfe Merge "ViewPageTarget.init: Correct docs: ve.libs.mw → mw.libs.ve" 2014-12-02 21:50:12 +00:00
jenkins-bot 6c4c3408b8 Merge "Track new pagedeleted save error in TargetEvents" 2014-12-02 02:04:11 +00:00
Roan Kattouw 915278dfea Track new pagedeleted save error in TargetEvents
Change to Schema:Edit takes it to revision 10676603.

Change-Id: I87a3812585ac0dd22a66ceffdf320ad8bc326155
2014-12-01 17:58:31 -08:00
Bartosz Dziewoński e6ea9db351 ViewPageTarget.init: Correct docs: ve.libs.mw → mw.libs.ve
Change-Id: I265aba968d861020852ada5034e166189efd3218
2014-12-01 20:59:53 +01:00
jenkins-bot 0445ee640d Merge "Remove duplicate startSanityCheck from ViewPageTarget" 2014-12-01 19:22:56 +00:00
Ed Sanders 7dc4dd66a0 Remove duplicate startSanityCheck from ViewPageTarget
Method was moved to parent, but not deleted from child. Also move
sanityCheckPromise to parent where it is used.

Change-Id: Ie2b00330d796cd089fd4bc84d9332c316500633f
2014-12-01 19:19:51 +00:00
Amir E. Aharoni 9dad03819e Mention the "Continue" label as a parameter in visualeditor-recreate
Bug: T75971
Change-Id: Id075233da4e8a2978b07b5f2735ac6620ff5330d
2014-11-27 22:33:35 +02:00
Roan Kattouw 616a9cd1bf Followup 6d21d83: unbreak switching to edit source
Forgot to pass the wikitext parameter through, oops :(

Bug: T76114
Change-Id: Ic852e4b10c17b2417f582f35fabb87823e0202e3
2014-11-26 16:24:50 -08:00
James D. Forrester e90cbe6a37 Follow-up I5bc30eca7: Register <visualeditor-formatdropdown-format-blockquote>
Also push it into correct place in the toolbar, and disable it from media and
reference dialogs' toolbars.

Change-Id: Icc3bf056860e35def13e03e77ffc6782acc4196a
2014-11-25 19:01:02 -08:00
Catrope 64ce195fae Revert "ve.init.mw.trackSubscriber: Populate platform field with hack"
Caused JS errors when invoked too early.

This reverts commit 35d3898543.

Change-Id: Ie7dd4ef8323a16bb694e6300a096ba53cf4a0a91
2014-11-26 01:55:30 +00:00
Roan Kattouw 35d3898543 ve.init.mw.trackSubscriber: Populate platform field with hack
Use the target used as a proxy for the platform.
Assuming all mobile target users are tablets for now.

Change-Id: I24610e6b6d472744dc1011385c8810a65e06decf
2014-11-25 17:23:50 -08:00
Ed Sanders 5ce4885529 Replace hacky wikitext warning listener with sequences
Uses the generic sequence detection now available in core instead
of a custom hack that had to been manually bound and unbound to
every surface and surface widget.

As the sequence detection looks at just-typed characters the behaviour
has reverted to showing a auto-hide message. This resolves an issue
with the previous system whereby typing in the same paragraph as existing
wikitext patterns triggered the warning.

Depends on I6a4d71d in core.

Bug: T53751
Change-Id: I7d914b1b60a1cf8c79a724e5f634e1e666c9562d
2014-11-25 22:39:29 +00:00
jenkins-bot 69fe06a7ae Merge "Check wgRelevantArticleId to determine relevant page existence even on special pages" 2014-11-25 19:44:02 +00:00
jenkins-bot a7dc4af551 Merge "Catch pagedeleted errors and give the ability to re-create the page" 2014-11-25 19:42:58 +00:00
jenkins-bot f3d772a709 Merge "Only try to close save dialog before destroying surface if it's currently open" 2014-11-25 03:12:03 +00:00
Ed Sanders f79aed7572 Update VE core submodule to master (8ca8c41)
Local changes:
* Rename paste rules to import rules (also used by drag and drop)

New changes:
f5d83f8 Remove data-parsoid removal hack
99f938f Create 'preserveGenerated' mode for cloneElements and use in copy
938b44d [BREAKING CHANGE] Rename paste rules to import rules
c51288c ve.ce.Surface: Move insert HTML path to DM
10ce4cf Provide a FileDropHandler for HTML files
701bb9c Provide a FileDropHandler for CSV and TSV files
ca6b444 build: Update update-oojs.sh and update-oojs-ui.sh scripts

Change-Id: I5cfa15ab3efd03e2c64c2f9f725cb3098f53b32a
2014-11-24 18:55:32 -08:00
jenkins-bot 5861db05b0 Merge "Filter out comments from external paste" 2014-11-25 02:07:24 +00:00
jenkins-bot 17fd82b99a Merge "Fix MW skin hacks" 2014-11-25 00:47:32 +00:00
jenkins-bot 330a1732cb Merge "Change command list from whitelist to blacklist" 2014-11-25 00:42:48 +00:00
jenkins-bot 35cbae3d76 Merge "Fix the "you are now logged in/out" warning" 2014-11-25 00:19:14 +00:00
Ed Sanders c56a921585 Change command list from whitelist to blacklist
Also remove toolbar definitions as they can now be derived from
command availability.

Depends on If32d514a in core.

Change-Id: I2313f3cc2531686b27f96dc1110b28bb4b295f89
2014-11-24 18:28:37 +00:00
Ed Sanders 325bd0994e Filter out comments from external paste
Bug: T71821
Change-Id: I165efd75adf3d4092860c6d2bc408469dba31388
2014-11-24 11:20:18 +00:00
Alex Monk 1c04d32d75 Only try to close save dialog before destroying surface if it's currently open
Otherwise the closure promise will be rejected as it was already closed with
different data, if you ever opened and closed the save dialog before pressing
the 'Read' button. This means the code in the $.when will never be run, and
the surface never destroyed.

Bug: T75589
Change-Id: I3ffdd1c82506bcd2accc0f3fa113c0950a31918e
2014-11-23 22:30:40 +00:00
Ed Sanders 2653ce3bb3 Fix MW skin hacks
* Ensure surface widget font size matches main surface,
  move vector-specific hack to vector css file and fix.
* Fix base font size in non-isolated monobook windows.
* Move monobook z-index hack to global overlay only.

Change-Id: I1607dc77f81ac9c522e09a3b502aeb38fee02178
2014-11-22 17:52:46 +00:00
jenkins-bot 268a852455 Merge "Follow-up I19da270a: Make overlay appear above non-VE skin items in Monobook" 2014-11-22 02:29:01 +00:00