Commit graph

1477 commits

Author SHA1 Message Date
Ed Sanders 7b8931193a Update stylelint config version and make a pass
Change-Id: I58007c3976019c8cfe96fd1fc0474d9e80f99f64
2016-05-24 13:41:13 +01:00
Bartosz Dziewoński a86cfc82d1 Remove Wikipedia logo from welcome dialog image
The editor can also be used on wikis that are not Wikipedia.

By the way, the logo was incorrectly flipped for the RTL version. Heh.

Bug: T135811
Change-Id: I5635da13e8335658079620a46ac265c4ed6bd167
2016-05-22 16:34:12 +02:00
James D. Forrester 8c7ed92288 Update VE core submodule to master (eeaf1e2)
New changes:
c54a48a build: Fix watch list (csslint -> stylelint)
58ba3d9 Add stylelint rules for @-rules
3f8c75a Stylelint: Add rule for unsupported browser features
3b96ff3 Fix minimum Opera version (15 -> 12)
9a1110b Stylelint: No ID selectors
9800bb8 build: Remove remaining references to csslint
b6ab14a stylelint: Re-enable features by names
6cc1f3c Move stylelint to npm
1d15fa0 build: Bump stylelint version to v0.2.0
ccc1724 stylelint: Use the preset rather than extending

Change-Id: I22fa8098592338a5e912aba9ad21131b21d9c0ea
2016-05-18 07:06:53 +01:00
jenkins-bot d2c995594a Merge "Remove remaining references to csslint" 2016-05-17 12:41:48 +00:00
Ed Sanders 8d749518ec stylelint: Comment uses of 'unsupported' browser CSS features
Change-Id: Ia88575d3fe71c22551cc601f03d8f4dea6d7fe16
2016-05-17 12:28:07 +00:00
Ed Sanders df49e5deb9 Remove remaining references to csslint
Change-Id: I1b5177bf746985a199bcc1ec713f886164c74760
2016-05-17 13:27:47 +01:00
Ed Sanders 99d3320573 build: Replace csslint with stylelint
For now just use the rules file in lib/ve, but eventually
this will be a preset.

Change-Id: I7fd79d3e1dce37aef066d416cd969e5fff1e962f
Depends-On: I17e0d23ddfedf64985495ab35d113ea08c03b1df
2016-05-16 22:30:49 +01:00
Ed Sanders 236e3d1241 [BREAKING CHANGE] Evalute block/inline state when inserting a transclusion node
Make some of the methods we currently use to render the node
static so we can re-use them before inserting. We do the evaluation
without inserting the node so as not to dirty the document and
transcation history.

In the unlikely case the request fails, just fallback to inline.

This only handles insertions for now as type changes on edit will be
very rare.

This changes the signature of insertTransclusionNode, which is used
in Cite and Citoid extensions.

Bug: T51784
Change-Id: Ibc2fc66e6866084b0a4deeb082c8a1ca412febb2
2016-05-16 09:19:13 +01:00
Alex Monk 349b1f5e57 Add WTE welcome dialog
Bug: T133800
Change-Id: I6eb43274e22f647958c3ab1b6d5c12b3dbea388e
2016-05-10 23:28:21 +00:00
Bartosz Dziewoński 13a7a4c5f9 ve.ui.MWParameterPage: Remove non-working 'focus' handler
This element is a plain `<div>` with no tabindex, and therefore can't
be focussed. jQuery 'focus' events don't bubble, either, which would
otherwise allow focus events on children to fire this handler.

Change-Id: I68cb7d3bac143565c0a1bdb988312233b2d13ccd
2016-05-10 19:27:52 +02:00
Ed Sanders 3678b0c38a Attach template form after building
Building DOM trees while attached is much slower. This makes
things about twice as fast.

Remove unused StackLayout wrapper this.panels.

Bug: T134814
Change-Id: Idb269cf3f06c350ffe28b66e2e883c0a7a3348cd
2016-05-09 23:24:22 +01:00
jenkins-bot 6dc85ae92a Merge "Add regex for detecting labelled external links in pasted wikitext" 2016-05-04 15:56:04 +00:00
Ed Sanders 47508d3245 Add regex for detecting labelled external links in pasted wikitext
Bug: T134227
Change-Id: Icb390cca6f4ee299dd59ec5d15894b734879f394
2016-05-04 16:20:05 +01:00
Ed Sanders f30000ed4c Wikitext paste: Discard autoGenerated items after conversion
Otherwise the reference contents (stored in the reflist) is lost.

Bug: T134228
Depends-On: I718963e3c460a5bed38fba4152b03442bbe6169e
Change-Id: I20171eb97eb1b4757a2c8a25217adb4d680a9057
2016-05-04 10:58:01 -04:00
jenkins-bot a9e40b09cd Merge "Move cursor to end when switching to external" 2016-04-26 15:05:44 +00:00
Ed Sanders eb839a89a0 Move cursor to end when switching to external
Bug: T133677
Change-Id: I2694b6ddd476798b29d2aeb9d3eb4f162da49f7c
2016-04-26 14:00:48 +01:00
jenkins-bot 1ca644a98b Merge "Select the label properly when converting LinkNode to LinkAnnotation" 2016-04-26 12:40:23 +00:00
jenkins-bot 80636c235e Merge "Add a popup after switching into VE from WTE" 2016-04-25 22:42:55 +00:00
Alex Monk 6b7551112d Use correct case to access ve.ui.MWCategoryItemWidget.prototype.sortKey property
Otherwise we just record undefined as the original sort key and never
allow blank sort keys.

Bug: T92632
Change-Id: I7f37a8a33c54186ec6f0f74e374c591d5428b119
2016-04-25 23:18:09 +01:00
David Lynch 8bb1399c97 Select the label properly when converting LinkNode to LinkAnnotation
We were selecting outside the annotation, when converting a LinkNode to a
LinkAnnotation. This meant that typing would overwrite the annotation as well
as the label. Speculatively, this is probably a side-effect of recent changes
to how nails and cursor offsets interact.

Bug: T121448
Change-Id: Ib2274bc5857294c5b691b3c3567b135d68bfa596
Depends-On: I3954c7f8f8e5870b13a8f6c4f0e86fb3b20b3cd3
2016-04-25 11:56:39 -05:00
Ed Sanders 61d5ae3d5d Don't expand link selections when opening with '[[' sequence
This mimics what would happen if you were actually typing wikitext.

Bug: T133516
Change-Id: I737313e6aaa5e4517c9f7f18faa5570a31395e03
Depends-On: If8ab31a7eacb4d8fa6d9787b7ac9872be0de04e7
2016-04-25 08:48:53 -07:00
Alex Monk 0bbe2e38ee Add a popup after switching into VE from WTE
Bug: T131066
Change-Id: I2294da7d09dfbacb9187aba5e6e703511cec3c9f
2016-04-20 18:46:00 -07:00
Ed Sanders 4d40a9df80 EducationPopup: Give pulsating blue dot an initial opacity of 0
This makes it degrade to a small dot instead of a huge dot in
browsers which don't support animation (IE9).

Change-Id: Ia457b3caf35ff0ffe7287b2b1e395860d5dbd7d0
2016-04-14 16:22:04 +01:00
Alex Monk 978224f2ec Use widgets for wiki-page-name, wiki-user-name, wiki-template-name, boolean, URL and line template fields
* Use TitleInputWidget for wiki-page-name and wiki-template-name parameters
* Use UserInputWidget for wiki-user-name parameters
* Use a custom hacky CheckboxInputWidget child class for boolean parameters
* Borrow some ve.ui.MWExternalLinkAnnotationWidget.prototype.createInputWidget code for url parameters
* Use a TextInputWidget with multiline disabled for line parameters

Not dealt with in this commit, so fallback to existing behaviour:
* string
* number
* unknown
* content
* unbalanced-wikitext
* date
* wiki-file-name

Bug: T55613
Bug: T124734
Bug: T124736
Change-Id: If04944d64303d959e8dd605e75a175895932b788
Depends-On: I87699a93ca1b34c6d248456fcc060f584623d158
Depends-On: I5e97604f0fc24176d5e89899bf0505dc442a1a7e
2016-04-06 22:07:19 +01:00
jenkins-bot 0242dedff9 Merge "Filter out auto-generated reference lists" 2016-03-29 19:37:35 +00:00
jenkins-bot 29af9b54b6 Merge "MWPopupTool: Don't pass $1 to visualeditor-beta-warning any more" 2016-03-29 16:52:31 +00:00
jenkins-bot 190c64ed69 Merge "Select tool when it's been closed by education tool popup button" 2016-03-29 16:42:38 +00:00
Alex Monk 0760cd6974 Select tool when it's been closed by education tool popup button
Bug: T117273
Change-Id: I54b704b6663f7d862557e6524713259dee8765cc
2016-03-29 15:54:22 +01:00
Ed Sanders c516d897d2 Remove icon properties from windows
Windows stopped supporting icons a while ago.

Change-Id: I8a63152282a5968dcd17675330e31bd1ebe4b68b
2016-03-29 12:33:42 +01:00
James D. Forrester a6477fb960 MWPopupTool: Don't pass $1 to visualeditor-beta-warning any more
Change-Id: Ib2f63d1626d8286c7dfd74227d09046a7d2af509
2016-03-28 19:53:08 +00:00
Ed Sanders 681250dd5e Filter out auto-generated reference lists
Bug: T101553
Bug: T127664
Change-Id: Idc8c6f30ccdd5eaf76a3f7c1b923d8656ca36413
Depends-On: I24250845e97acb4b7de9c495cb46dbd28fc8817e
2016-03-28 17:23:42 +00:00
David Lynch d33f5969ad MWLinkAnnotationInspector: select entire link when switching tabs
Bug: T129650
Change-Id: I4ca445f2c43438c36ece23245660b63f2a48b722
2016-03-28 11:38:45 -05:00
Thalia 003e02efaa MWAceEditorWidget: Update maxRows and minRows if minRows is changed
This was being done correctly in initialize, but not in setMinRows.

Bug: T131009
Change-Id: I57c771720c59ca1d75f0b9bc14e7c834237019d5
2016-03-27 17:42:11 +00:00
David Lynch 0268e74a7f Template Dialog: pushPending while the dialog is closing
Double-clicking the "insert" button would double-insert the template. Counting
the close as a pending action avoids that.

Bug: T129725
Change-Id: I41af7c051fd54004cecd563d7a6cf8fdb452840f
2016-03-24 11:33:00 -05:00
Ed Sanders b7d25d92bc Detect the type of plain pasted links
Using the same logic we used for converting pasted URLs, detect
internal links by matching their base.

Currently link pasting is still disabled in the VE target, but
has been enabled elsewhere (Flow).

Change-Id: Iebd61abbe1fe82fd18d129e1dbc815ca75f44e87
2016-03-17 19:30:13 +00:00
Ed Sanders dec9aa09e4 Use keyboard icon for keyboard help tool
Change-Id: Id5e5097dfcdb5e3be2b21c89886857cb379997e6
2016-03-15 17:28:48 +00:00
jenkins-bot 53d3c62d46 Merge "CommandHelpDialog: Inherit non-corruptively" 2016-03-14 20:28:56 +00:00
Ed Sanders f5873ac1db CommandHelpDialog: Inherit non-corruptively
Change-Id: Ieb497eebe930e58a02552eb9d4305280c91c92c2
2016-03-14 20:03:52 +00:00
Ed Sanders 5d5d5419c6 AceEditorWidget: Use namespaced 'require'
The un-namespaced version will soon be removed to fix RL issues.

Bug: T127643
Change-Id: Iaf4ed23d88cb955b8f8f61725f9effa6180de5bf
2016-03-14 16:56:16 +00:00
Ed Sanders da9aff2421 MWSaveDialog: Fix vertical alignment
Change-Id: Ifb62375da6c872a3a4ef783e479a5476ca318b32
2016-03-11 17:37:01 +00:00
Ed Sanders d5e594b9f6 Link inspector: Remove premature call to onLinkTypeIndexSet
This causes the inspector to take focus early (line 291) on
first load, and is not necessary as this method fires when
needed anyway.

Bug: T129228
Change-Id: Ia69f76b68e89daf5cb01449c40e71de4ec32d400
2016-03-08 16:54:09 +00:00
jenkins-bot 7261cf5364 Merge "Link inspector: make height consistent" 2016-03-08 16:50:02 +00:00
Ed Sanders 7f31507e12 Link inspector: make height consistent
Make the DOM order sensible so we don't have to
use SearchWidget's position:absolute hacks.

Bug: T129173
Change-Id: I3517e0e0cfe2ab0eee4bed7390e41710d3140eb0
2016-03-08 10:26:31 +00:00
jenkins-bot 7a5f34fac3 Merge "Education popup: Also handle clicks on dots" 2016-03-07 23:28:55 +00:00
James D. Forrester d8eb68d7b6 Don't give the user the option to discard changes when changing editor
Bug: T128585
Change-Id: I02f31e46ae7b2dc7505ed55fc56cd00f538a90e3
2016-03-07 13:39:32 -08:00
Ed Sanders 5cc10a810a Wikitext paste: Move MWWikitextStringTransferHandler matchRegExp into a registry
This allows extensions to register their own rules for detecting wikitext,
e.g. matching '<ref>'.

Bonus: Strip the autogenerated <references/> tag which
gets inserted when converting a <ref>.

Bug: T128805
Change-Id: I7a38db45d25e86ff3f3f6199aa04425ec98f7cc4
2016-03-05 22:47:00 +00:00
Ed Sanders 67c207a6f5 Use abstract target widget creation
Change-Id: Ic7e43e80f4f48df99842cee702963d54205e5055
Depends-On: I6a667a641540b347052ea0c645af4e1e59cf333a
2016-03-03 11:49:44 -08:00
Ed Sanders d64436cc0c Use new surface executeCommand method
Change-Id: I84c718d9da4b7dd0627ba37d9c29c3a25cc5d73e
Depends-On: Id975ea9da43654cd9991a302b49a9fb32782078e
2016-03-03 11:49:44 -08:00
Ed Sanders 115bf4b3d2 CategoryWidget: Remove reorder event fix after upstream fix
Change-Id: I9088c931433b0824f72b4c77d0fd05cb062068f7
Depends-On: I67945db3652b0edb24b490089b8ea5a43f0b29d0
2016-03-03 15:53:49 +00:00
Alex Monk a3f77d9479 Education popup: Also handle clicks on dots
Bug: T128440
Change-Id: I25728cf3dd3462cb1a13476fe45d7fc3755429dd
2016-03-02 21:48:05 +00:00