Commit graph

319 commits

Author SHA1 Message Date
Ed Sanders ae780f43ed Fix typo in surfaceReady documentation
Change-Id: I4ae5552000eb6dc160acc4fd2e2b218bf2c7411f
2017-03-22 20:35:42 +00:00
Ed Sanders 12c73bc01f Update VE core submodule to master (ef5dc965f)
New changes:
4b94f212e Add tool to change directionality of document view

Bug: T153356
Depends-On: I1e3d89e8250b75d0b6992cf4664e84de66d99bc0
Change-Id: Ic832cc661a0899b1668eb650fb09b66ada54d1ef
2017-03-16 12:42:42 -07:00
Ed Sanders 7a058a4de8 Remove explicit toolbar indicator definitions
These are now computed upstream based on position of toolbar.

The menu tool now needs its indicator explicitly hidden.

Change-Id: Id2280f70553e1e45f3a42af45684c5808797925c
2017-02-04 10:25:37 +00:00
Ed Sanders 1ae5c13cb9 Update VE core submodule to master (f0dcedb)
New changes:
5b448fa [BREAKING CHANGE] Merge Mobile/DesktopSurface into Surface
2d8959b Localisation updates from https://translatewiki.net.
7eee772 Follow-up 2d8959b: Fix build for added language 'io'
f0dcedb ve.dm.TableMatrix: Really indent ASCII-art comments

Change-Id: I62708f7caeb03b16cd318aab0b0ee3c674e75a26
2017-01-20 14:35:39 -08:00
James D. Forrester 122f49b2dd build: Bump file copyright notices for 2017
Change-Id: I3c20809e71cc0da58123e1b5f29c4f3aac945496
2017-01-03 08:58:33 -08:00
Ed Sanders 46385a557e Ensure document base is always correct, even in source mode
Bug: T153624
Change-Id: I3f74f67ce975f5b371ab42adf5213256ae816f7f
2016-12-19 21:08:58 +00:00
Ed Sanders 8bca6cc777 Inherit more functionality from core source mode
Change-Id: Id027681ab5f0c9f4b9ed127b583e45f0fe57ce69
Depends-On: I02f3849027a6652701c2d354d1b77ece9d1a56c1
2016-12-01 18:44:54 +00:00
Ed Sanders 218742d806 Update VE core submodule to master (ae30d71)
New changes:
f58ddea DiffElement: Use document slices with full internal lists
83800c0 DebugBar: Remove hard-coded i18n
b4f89e1 Update OOjs UI to v0.18.1
40c7bf6 Factor out active node functionality from SectionNode for captions
2d967be Move 'mode' property to surface, rename target property to 'defaultMode'
5d8c214 wrapAllNodes in sourcefragment
dd3d9e5 Refactor ve.dm.Transaction
9d61aca Use canonical ve.dm.TransactionBuilder.static.newFrom* methods
df4f72a Make table caption node an active node
b79f72d Core source mode
7533ac4 Localisation updates from https://translatewiki.net.
ae30d71 SourceSurfaceFragment: Check range is not collapsed

Local changes:
Get edit mode from surface where possible

Depends-On: Iec758c1892d518ad4bc2c0d1aaf6ca00fa354323
Change-Id: Ifaf6a26078b2731b374aaad2cb40c08928de9c84
2016-12-01 10:40:01 -08:00
Ed Sanders aeafa6afca Update VE core submodule to master (9625e8f)
New changes:
f1297b8 [BREAKING CHANGE] Allow target widgets to be re-used

Local changes:
Re-use target widgets

Change-Id: I5decb918f398704d4b6c108a16fbc1cc073ef077
2016-11-29 11:48:15 -08:00
Timo Tijhof cde3d2a7f8 init: Initialise 'active' property in mw.Target instead of subclass
This is set to 'true' in mw.Target#setupSurface(), but not initialised or
used there in that class.

It was previous initialised in an indirect subclass (DesktopArticleTarget).
Move this to the parent class instead for clarity.

Change-Id: Ie3e12d254aa4b689fdce64620e110164311bc60a
2016-11-21 18:06:52 -08:00
jenkins-bot 8fd396151c Merge "Migrate DesktopWikitextArticleTarget code upstream" 2016-11-20 03:06:55 +00:00
Ed Sanders e1a887ccf8 Migrate DesktopWikitextArticleTarget code upstream
Change-Id: Icca4715411737a561302b44b127d91d117e7e29b
2016-11-20 02:52:14 +00:00
Ed Sanders 134477a840 Setup htmlBlacklist and add rule for read-mode MW references
Logically depends on If1b20fefe4b.

Bug: T150418
Change-Id: I0e2249b64f3b452c0322e7a20515ee7b2b6c6f60
2016-11-15 17:20:17 +00:00
Ed Sanders a0dd888485 Use a streamlined 'converter' in wikitext mode
Converting a document we know contains just plain text paragraphs
is slower than it needs to be. The speeds up the conversion of
[[Barack Obama]] from ~2000ms to <100ms.

Change-Id: I2081858d835286b48db0627696a9eb5294317c2e
2016-10-05 16:40:28 +00:00
James D. Forrester feeb2c3906 ve.init.mw.Target: Drop <noscript> tags on serialisation
These aren't in the Parsoid HTML spec., so there's no valid way that they would
be in the original document from upstream, and we don't—at least intentionally—
allow users to insert them, so we can safely assume that they're resulting from
browser extensions and other items inserting content into anything that sort-of
looks like an HTML page.

Bug: T144891
Change-Id: I330ae05cd53eee5c18b18ad744ea0ec7b2eb09cc
2016-09-08 14:13:11 -07:00
Ed Sanders 34ff174b85 Update VE core submodule to master (4408c13)
New changes:
e7cb202 Mark context wrappers as wrappers
20b75af Localisation updates from https://translatewiki.net.
a4dde9f Annotate pasted external text
8148301 Always preserve leading whitespace when converting for clipboard
82a35b7 TransactionProcessor: Apply annotations to ranges at the highest uniform offset
21fc1eb Restore previous selection when annotation inspector is dismissed
358181c Preserve prior valid DOM selections in showModelSelection
a0f7dba build: Bump various devDependencies to latest
0ae0f7e Follow-up Iabec6a6: Fix typo in mousemove selection update code
d69a4df Provide tools to make text bigger or smaller

Local changes for big/small tools

Change-Id: If418a1a47276cc1e1530c4a3ad6784136d8d14f8
2016-08-05 11:54:52 -07:00
Ed Sanders 8d17509031 Blacklist <time> annotation pasting in MW targets
Change-Id: Idef20f604023efa767c7510ed768c6f80e472559
2016-08-01 15:53:56 +01:00
Ed Sanders b104525c8c Blacklist article/section from external paste
Bug: T137441
Change-Id: I9ae85306a3220126462c69e4ea0a2a5e905fffa1
2016-06-13 12:22:10 +01:00
Ed Sanders 5581394ea3 Update VE core submodule to master (a4a5afa)
New changes:
4a5aa37 Clean up debug bar buttons
15f016c Undo sequence input stripping if window is dismissed
e874734 Localisation updates from https://translatewiki.net.
8db33b4 Follow-up e874734: Fix build for added languages 'gom-latn' and 'gor'
79c5d51 build: Update stylelint config version and make it pass
3804f5e build: Remove grunt-cli
cea7b63 Update OOjs UI to v0.17.3
9f648f4 [BREAKING CHANGE] Always get registries/factories via surface
1252814 Add cloneWithData() utility
5ccdef3 [BREAKING CHANGE] Fix debug bar encapsulation

Local changes:
* Fix debug bar encapsulation

Change-Id: I2c5d722278c5f71b59ee2f8849d9babb5aff6af2
2016-05-30 09:53:31 -07:00
Ed Sanders 1c5c1fc6b9 Append surface & toolbar components in the correct places
Use setSurface and setupToolbar to position the surface and the
toolbar save button in the DOM.

Change-Id: Ide634848f4e78501724c358bcb1fdab8abd491b9
2016-05-26 08:50:21 -07:00
Ed Sanders 8e4c9dba13 Fix link blacklisting
Now that we always generate mw link types in the converter,
blacklist mwExternal links, not plain links (which won't exist).

Change-Id: I2ab9fbb9ec50c2e36e8a870d48b6aa06c7e69f8c
2016-04-26 21:20:22 +01:00
Ed Sanders 7a007e2874 Create MW targets using a factory
Move the existing static property 'name' to 'trackingName'
to make way for a real registry index.

Change-Id: Iab0d5be611ece7038234551c4847b07517b4348d
2016-04-21 21:06:39 +01:00
Ed Sanders 1d8d1c2a64 Toolbar: Add tooltips to structure and insert groups
Bug: T131133
Change-Id: I927bf6f0d1de74b4ac8d16c3b5ce27720db322d4
2016-03-29 12:08:22 +01:00
Ed Sanders 67c207a6f5 Use abstract target widget creation
Change-Id: Ic7e43e80f4f48df99842cee702963d54205e5055
Depends-On: I6a667a641540b347052ea0c645af4e1e59cf333a
2016-03-03 11:49:44 -08:00
James D. Forrester 1e0486a679 Remove all Extension:Cite code, now moved there
Depends-on: I39936ed83d5a60471a0a75da753f498e80aef234
Depends-on: Ifd853bf9f901065798bd0063aeaa786a3761aa71
Depends-on: I32c93c5118eafe5f071252290c58d3de8dacc81a
Change-Id: Iba0f25b3ebe4e5e63377da57afb760d6980f9907
2016-02-05 21:36:56 +00:00
Ed Sanders 74358498da Update VE core submodule to master (70ff8cc)
New changes:
242ab45 DesktopContext: Float the context when it goes beyond the viewport
405c44d Rename TableContext to TableLineContext
6c564be Sort messages alphabetically
70ff8cc Introduce table and table cell context

Change-Id: I4357162bc192c90f99ca0aec12eb67bf848e5504
2016-02-01 10:51:26 -08:00
Ed Sanders 0ed45dbf61 MWTable: use new sanitization method
This prevents tables from getting sanitized even on
VE to VE copy. Also by calling ClassAttributeNode sanitize
extra CSS classes are removed.

Bug: T97462
Bug: T125220
Depends-On: Ia3ce386b2a03bc227818b10423bca72c736c0656
Change-Id: Ifd91e00b40665b446bbdcdf8859d2bb641bc0e67
2016-01-29 10:29:19 -08:00
James D. Forrester ada58df361 build: Bump file copyright notices for 2016
Change-Id: I3c618c196e504a80ca297a4132a17f1977a24fb7
2016-01-03 14:57:25 -08:00
Ed Sanders a689caa762 MWTarget: Only add ve-init-mw-target-surface to the main target surface
Avoid adding it to TargetWidget surfaces.

Bug: T121450
Change-Id: I7c43b07c5bade3a778ad423e39b25616e03aa888
2015-12-16 14:36:06 +00:00
Ed Sanders 21d5856000 [BREAKING CHANGE] Create ve.init.mw.Target base class
Move over logic which isn't specific to the article
implementation of VE (e.g. nothing related to loading/saving).

Refactors setupSurface to use an abstract tracking method (which
does nothing by default), and moves surface CSS classes to #createSurface.

Breaking change:
* Rename onSurfaceReady to surfaceReady. We shouldn't need to listen
  to our own events.
* Rename onReady to documentReady. onReady is not a listener.

Bug: T97166
Change-Id: I7242b1bb5501b7755a18a13d13e166c30cac9cdd
2015-12-11 16:41:47 +00:00
Ed Sanders 29f33a57d5 Rename mw.Target to mw.ArticleTarget
This makes way for a base mw.Target class which is
not specific to articles (e.g. Flow boards).

Bug: T97166
Change-Id: If72650bdf87aa9f195b004da0a4d815f1a8063a3
2015-12-10 16:26:20 +00:00
Ed Sanders ae26eefb05 Fix typos
Add some common ones to typos.json

Change-Id: I3830be4949ab6a5fd998d6937ed83e9f18091c2b
2015-12-09 16:47:13 +00:00
Bartosz Dziewoński 4a1a9bbf82 ve.init.mw.Target: Update TitleBlacklist error code
The error code has changed after T115258 and is now consistently
'titleblacklist-forbidden' for all TitleBlacklist errors.

The API now also provides information about the exact error message to
display (error.message) and the TitleBlacklist rule that matched
(error.line), but we probably don't have that message client-side, so
we're not trying to display it. Maybe when we can load it (T40280).

Bug: T116198
Change-Id: I32fccc7d0b2b66c739d59db05c568a56d9f07eec
2015-11-05 04:07:38 +01:00
Alex Monk 85b745666f Allow switching from wikitext to VE
Just by pressing the VE tab for now

Requires a relatively new version of restbase

Bug: T49779
Change-Id: I2a5294345f5e0f469c1dd1bdd29dbce211571a4e
2015-11-02 20:55:19 +00:00
jenkins-bot 81a89952ef Merge "Educational popups and highlights for links+citations" 2015-10-14 21:52:50 +00:00
jenkins-bot 45468b992a Merge "ve.init.mw.Target: Remove jqueryMsg hacks in #saveErrorNewUser" 2015-10-06 21:09:58 +00:00
Bartosz Dziewoński c684e2c682 ve.init.mw.Target: Remove jqueryMsg hacks in #saveErrorNewUser
The bug in jqueryMsg that required this is now fixed.

Bug: T87219
Change-Id: Ib7ef7e6a0451539099c12ae32d02b50c269c7529
2015-10-06 19:04:10 +02:00
Alex Monk 9d6fbc894e Educational popups and highlights for links+citations
Bug: T108620
Change-Id: I42b0e06f50aca5cb783d88f79a080461e745ceee
2015-10-06 14:33:57 +01:00
Ed Sanders 7337eb1d7e Toolbar config: Prevent 'Table' from moving after menu expand
Change-Id: I9f472668e0cf8f3014c681f6f2430e685bf50534
2015-10-04 13:28:55 +01:00
Alex Monk a46b7a819e Hack to stop logging edit events for non-desktop targets
Mobile target, for example, has events logged in the MobileFrontend extension instead
(which covers both the wikitext editor there and the VE integration)

Bug: T110272
Bug: T109525
Change-Id: I521f1825dc9c0a135db54cd005cda723908f14bc
2015-10-01 23:48:10 +00:00
Alex Monk 3386f66770 Save dialog: Make review/resolve actions work in mobile
Depends on Ic92378b7

Bug: T111894
Change-Id: I5ca5f803642dd12db4e9fb213dc6478701661528
2015-09-26 00:08:31 +01:00
James D. Forrester 486bc7e6e3 mw.trackSubscriber: Log platform as phone vs. desktop
Change-Id: I71c25f28098c72ed779117da9c243dc3a87e611d
2015-09-05 21:29:03 +00:00
Alex Monk 01f7207947 Don't retry request in tryWithPreparedCacheKey unless the error was badcachekey
Bug: T109787
Change-Id: I66cd40fadcdfd59bbea05240d0c9917342c6f5a2
2015-08-21 02:01:56 +01:00
James D. Forrester 00d3226be1 build: Enable jscs jsDoc rule 'checkParamNames' and make pass
Change-Id: Ifcd3f67524c32148ff3591263d6374b31ee57d3b
2015-08-19 11:33:59 -07:00
James D. Forrester 945242a55a build: Enable jscs jsDoc rule 'checkAnnotations' and make pass
Change-Id: I76abb1eb1f3e1a2e8a4c03f577a080f4889b3a6d
2015-08-19 11:09:34 -07:00
James D. Forrester 19df1d4c8a build: Enable jscs rule 'requireVarDeclFirst' and make pass
Change-Id: Ia2f765d12bde001c329c2ff4c080a36b71de9803
2015-08-19 11:05:01 -07:00
James D. Forrester f5c6f61163 build: Enable jscs rule 'requireSpacesInsideBrackets' and make pass
Change-Id: I846d36c15e1b1f810d2ef7fd422f8412790bcb0f
2015-08-19 10:33:02 -07:00
Ed Sanders 91b7ede4e3 ve.init.mw.Target#saveErrorCaptcha: Focus CAPTCHA input on display
Change-Id: I491d0585380a36e87412d2c36a1d9e5b6111ccac
2015-08-17 19:20:05 +00:00
Ed Sanders 783521ede7 Clear old captchas after building save options
Bug: T109113
Change-Id: Ib60b5c903c85106c92237d7ce47fa0c01e645a1d
2015-08-17 14:09:56 +01:00
Ed Sanders 92fc30db48 Update VE core submodule to master (da9d929)
New changes:
2464397 Move toolbar floating code up to the target
11bdc21 Separate SA target into Mobile and Desktop
7ab3389 AlignableContextItem: Fix styling in mobile
758619f CONTRIBUTING.md: Update file paths and build instructions

Local changes to mw.Target to handle toolbar floating.

Change-Id: I0751817e3a6668b120134bfcb6c611b121a46501
2015-08-10 12:33:14 -07:00