Commit graph

578 commits

Author SHA1 Message Date
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
Ed Sanders 8c66e5df75 Load mwgallery on mobile as well
It's just as usable as the alien extension inspector which
is currently shown, and has better messages.

Change-Id: Ifbce9df4aff77cf76a8445158987be716ba45302
2015-09-19 18:14:52 +01:00
James D. Forrester e5e1810f02 MWWelcomeDialog: Alter to be welcoming, use a nice image
Drop beta-ness as users don't care and it confuses them. Leaving the preference
alone for now.

Bug: T99963
Bug: T112354
Change-Id: I0e039dec54d528fce24226e76b931b593dd13a9e
2015-09-14 18:29:07 -07:00
Alex Monk 23691dc861 If init fails once, don't completely break when the user retries
The loading progress would not be reset upon failure, causing issues
when you tried to start loading again.

Bug: T96437
Change-Id: I7ec4be82304c101fa1bd634f60bc6b0047e2d53d
2015-09-14 21:13:45 +01:00
jenkins-bot 3b82179c06 Merge "Initialize actions toolbars" 2015-09-07 19:35:17 +00:00
Roan Kattouw 36dc5147bb Initialize actions toolbars
Right now .initialize() doesn't do anything other than enable
the window resize handler for toggling the "narrow" styling,
but as a matter of principle we should call .initialize()
on toolbars after attaching them.

Change-Id: I419c943d1d20af2105b84b8f5fbccc7070af601b
2015-09-07 11:30:30 -07: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 6d94d060ac Bump Schema:Edit to revision 13457736
* Remove page.length
* Add action.abort.type = switchnochange

Needs to be deployed at the same time as Ib99700ac

Bug: T111420
Change-Id: I7ee245157d4de6c220d7cdf54cd1dd69ff836f15
2015-09-04 00:51:05 +00:00
Timo Tijhof 4e3d3acf65 mw.DesktopArticleTarget.init: Don't make non-VE edit tab collapsible
Collapsible relates to the Vector menu behaviour where an item
is moved into the dropdown menu if the window is narrow.

This should only apply to the secondary tab when there are two tabs.

If there is only one tab (non-VE, e.g. in a non-VE namespace) then
this tab should not be collapsible.

Server-side code handled this correctly, but client-side was
adding the class unconditionally.

Change-Id: Iecd195e92f43fe9f11b3938a1a24caed7b331e5f
2015-08-25 05:50:24 +02:00
James D. Forrester 85f91f394e build: Enable jscs jsDoc rule 'requireNewlineAfterDescription' and make pass
Change-Id: I7c0fabc93834d19198caea8f5dd1834e9e473d0a
2015-08-19 11:21:01 -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 c0d2546617 Add down indicator to advanced menu in mobile
It is a dropdown list so give it the down indicator we use elsewhere.

Change-Id: I8976f2bc5edd1e221ca155da02660703318480ac
2015-08-19 13:05:14 +01:00
Ed Sanders 87daf4773d Fix typos in function names
Change-Id: Id8a9bcd1b4409bc8132ac6007b75274074f5f477
2015-08-18 13:54:51 +01:00
jenkins-bot 14dde31998 Merge "Convert save checkboxes to OOUI widgets" 2015-08-17 17:53:16 +00:00
Ed Sanders 960ecf8103 Convert save checkboxes to OOUI widgets
Anything with type=checkbox is coverted, and its label is found,
either by for=id or by finding a wrapping label.

All other inputs are stored in $otherFields for form building.

Bug: T86617
Bug: T70572
Change-Id: I94376fef18d02d2058bb548c11ae17f3dec7268c
2015-08-17 18:37:06 +01:00
Ed Sanders 7114463cc5 MobileArticleTarget: Restructure the toolbar
* Rename the actions toolbar the 'pageToolbar', and place the save button in
  its actions section.
* Inject the title amongst the pageToolbar tools, so we can have tools either
  side of it.
* Don't use the hamburger icon, as this has a (different) expected behaviour
  in MF. Replace it with a back button, and move the edit switch action over
  to the right in an 'advanced' group.

The toolbar is back to being laid out like the source editing toolbar in MF.

Change-Id: I4e00a8cdf603968ee32872323c88e587c1e1a487
2015-08-15 14:33:10 -07:00
Alex Monk 45a2beeaff Don't reset edit summary every time we open the save dialog
We were setting the edit summary box to the contents of the 'summary' parameter
every time the save dialog opened, but actually we only want to pay attention
to that the first time the save dialog opens.

Bug: T108329
Change-Id: Ic7b456ca8d7dd7cef8bc27629e3655ce9b97e755
2015-08-11 20:39:31 +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
Ed Sanders f9fbd52962 MobileArticleTarget: Add webkit touch scrolling to panels
Also use named classes for hiding toolbars, and move the
MobileFrontend overlay z-index hack out to that repo.

Depends on Ia46e6b4d7a in MobileFrontend.

Change-Id: I0e1f527446fd10fde5dd3107e6467fd2c8f621b2
2015-08-10 15:45:26 +00:00
Ed Sanders 37c651001e Switch to using surface model focus/blur events
Depends on Ibcda9a79 in core.

Change-Id: Ieb2f99d7d1d24c24a0f00cf7c33e23b8206bf753
2015-08-07 10:52:24 -07:00
Ed Sanders 0d8914c48d MobileArticleTarget: Use platform's iOS detection, not MobileFrontend's
Change-Id: Ic206d54aee712e6309e34a0414d28c27363dfbc3
2015-08-07 15:37:05 +00:00
Ed Sanders ac9f1a0919 MobileArticleTarget: Give toolbar split focused/unfocused modes
Split the toolbar into two modes depending on if the surface is focused:
* When unfocused, show a hamburger containing back and source switch
* When focused, show editing tools, and a check button to unfocus

For the editing toolbar, space the tools out using table-cell layout
and hide labels below 480px.

Depends on I06813e3ff in core (surface blur method).

Bug: T93325
Change-Id: Ibf09cb29019d7a71e1e144b326710b1f6506cd0c
2015-08-06 15:43:36 -07:00
jenkins-bot 0c49c03c10 Merge "[BREAKING CHANGE] Use save dialog in mobile" 2015-08-06 21:57:56 +00:00
Ed Sanders 707628cfb1 [BREAKING CHANGE] Use save dialog in mobile
Bug: T96186
Change-Id: I4319e23da2d1bfd0cbba9719dbc9642a233bdf67
2015-08-06 21:52:14 +00:00
jenkins-bot c61661c20a Merge "DesktopArticleTarget.init: Don't overwrite mw.libs.ve" 2015-08-05 21:58:07 +00:00
Roan Kattouw ef2d23c36a DesktopArticleTarget.init: Don't overwrite mw.libs.ve
Extend it instead, if it already exists.

Bug: T107979
Change-Id: I70bce7c82dce8199cfe36f810629c5d22b583f0a
2015-08-05 14:48:38 -07:00
Frédéric Bolduc 0ce3baf66d mw.Target: Add jsconfigvars and modules to the save mechanism
* On save, VE will now fetch and append modules and jsconfigvars to the save
  event, which respectively contains necessary JS config module data and the
  list of required modules to be added on the page.
* The jsconfigvars are now properly added to mw.config on edit save.
* If any new modules are now required by the page after an edit, they will be
  loaded by ResourceLoader through mw.loader.load.

Change-Id: Ib3990078a22ad9e46debf3ce174e7cf27b86d944
2015-08-04 19:00:09 -07:00
Ed Sanders 2c24efae29 [BREAKING CHANGE] Target*: Replace target events with methods
When you bind to your own events you're probably using the wrong
design pattern.

The events are kept (without arguments) for the purpose of tracking.

Change-Id: I6983319f9e0ca179e609afb00c821e3eab2161c9
2015-08-04 11:49:54 -07:00
Ed Sanders 529248f831 Target*: Remove 'on' from methods which aren't event handlers
Allows us to rename onSaveEvent back to onSave.

Before this change,
* ve.init.mw.Target.prototype.save ->
* ve.init.mw.Target.prototype.onSave, emit save event ->
* ve.init.mw.DesktopArticleTarget.prototype.onSaveEvent (or MF equivalent)

With this change,
* ve.init.mw.Target.prototype.save ->
* ve.init.mw.Target.prototype.saveSuccess, emit save event ->
* ve.init.mw.DesktopArticleTarget.prototype.onSave (or MF equivalent)

Change-Id: I016262b38a941c93c0978391491baa6d5a32fe28
2015-08-04 17:47:05 +00:00
James D. Forrester 86212df814 Follow-up fd2ef3e: Keep passing data.isRedirect in #onSave
Also fix ve.init.mw.DesktopArticleTarget#onSave to #onSaveEvent to avoid clash.

Change-Id: I5efb1884f9626e5da72b226cc8ca596bb6db4a40
2015-08-03 18:41:58 -07:00
Ed Sanders 92cc1d1b53 Use super constructors in ArticleTargets
Change-Id: I58041de7421232dabe4541d438dd7cc66e3c8d92
2015-08-03 00:35:01 +00:00
jenkins-bot a15c54f4db Merge "MWSaveDialog: Make a FragmentDialog now that's available" 2015-08-01 22:44:18 +00:00
jenkins-bot b46bd69c49 Merge "Move toolbarSaveButton init to base class" 2015-08-01 22:43:25 +00:00
Ed Sanders dc71b4849b MWSaveDialog: Make a FragmentDialog now that's available
* Make save a FragmentDialog and open with WindowActions so
  the selection is restored automatically.
* Pass in some information in setup data.

Change-Id: I254b71f252adce064b9c2d2bf2cb6c8d0018e31f
2015-08-01 22:41:17 +00:00
Ed Sanders fd2ef3e4cd MW target: Make 'static' methods either static or be instance methods
MW target has 'static' methods, some of which aren't attached
to the static property, the rest of which should be instance methods.

Rename success/fail functions to remove 'on' as that is reserved for
actual event listeners.

Change-Id: I63e68dbe1923906208b180abfc4a9a280b4d098e
2015-08-01 22:38:49 +00:00
Ed Sanders e9b7f4c029 Move toolbarSaveButton init to base class
Change-Id: I145c4029f9e1a6e46591134a7756dada1251551b
2015-07-31 12:03:14 +01:00
Ed Sanders d2c15e9eb5 Bring in code from MobileFrontend
* Use local edit source tool, and emit event to MF
* Bring in toolbar styles, bonus: remove old desktop style hacks

Bug: T96186
Change-Id: I89351e409aa4e9d626edd7151ae05bdcd58f1cee
2015-07-30 17:13:00 +00:00
Ed Sanders cf191f5fa8 Update VE core submodule to master (8feab4e)
New changes:
11953f7 Localisation updates from https://translatewiki.net.
0dbafb0 Update OOjs UI to v0.12.2
cbd0982 Replace placeholder color with opacity
087365c Support other types of 'empty' document placeholders
7692890 Make scrollIntoView a VE utility function
5a1a159 Localisation updates from https://translatewiki.net.
8edf71e [BREAKING CHANGE] Kill ve.indexOf and thus @until
bb02b02 build: Bump various devDependencies to latest
cb5b2cd Fix scrollIntoView util binding
8feab4e [BREAKING CHANGE] Use config object for Target constructors

Local changes:
* Use config object for Target constructors

Bonus:
* Add CSS classes to MW targets
* Use 'super' calls

Change-Id: Ieb4e4eb3663aab2706c0f3ecc8b82e00555df1d5
2015-07-30 08:28:48 -07:00
Ed Sanders 08a9551c84 MobileArticleTarget: Collapse text style buttons
B/I doesn't fit with link & cite on a iPhone 6

Change-Id: Ib23b2f8540425ee5d8265f369aea250e900a0c5f
2015-07-30 00:25:52 +00:00
Ed Sanders 3593184f42 [BREAKING CHANGE] Bring in some code from MobileFrontend
* Bring in back button & save button from MobileFrontend
  so they are properly styled OOUI widgets
* Accordingly, move toolbar save button code up into base
  MW target.

Bug: T96186
Change-Id: Ic89dd4efb831fc3b09980da16524276f6568619d
2015-07-29 16:16:39 -07:00
Ed Sanders bb57348a9e DesktopArticleTarget#activate: Rename pageTarget to target
Change-Id: Iae71a050058afb2c1111a99ede5b969afbf5aca6
2015-07-29 17:58:33 +00:00
Ed Sanders fecdc29a38 Replace ve-init-mw-desktopArticleTarget-* with ve-init-mw-target-*
Except in cases where it is only applied to desktop articles.

Change-Id: I40a9dabcd8454138f94affde809afee9c93732a4
2015-07-29 18:26:36 +01:00
Ed Sanders b5de6fa575 [BREAKING CHANGE] Rename (View|Mobile)PageTarget to (Desktop|Mobile)ArticleTarget
Change-Id: I6a8fa76dc4d70cc04722e30e3fea6a6112d56b40
2015-07-29 18:26:36 +01:00
Alex Monk f76b57f1e6 Close the wikitext switch confirmation dialog if serialisation errors
Bug: T103632
Change-Id: Id9aede04ff4f8919770e578fac24ad4a1178b9a6
2015-07-25 14:32:17 +01:00
Alex Monk 82fb5f609a Parse SpamBlacklist error on the server-side
The client won't be able to deal with templates etc.

Bug: T99830
Change-Id: I78611a3f061b1afd73de052aa9ddff48dc368f2d
2015-07-23 18:49:42 +00:00
James D. Forrester 57f8fc5368 build: Drop last jscs over-ride and make pass
Change-Id: I4ff60af79cfc6e09e284d51f9b7ac2afa900f0f5
2015-07-22 15:13:09 -07:00
Ed Sanders 8e0394da5c Support command whitelist feature
Depends on I87d8aa3 in core.

Bug: T106061
Change-Id: I694e4e5a83f281da92380a895b72611141838f42
2015-07-18 18:20:49 -05:00
Kunal Mehta 0653804151 Don't set browser-prefixed transition CSS classes
jQuery will take care of this automatically: <https://api.jquery.com/css/#css2>.

Follows up bf56f56f3e.

Change-Id: I4db46fc70a5446a9ffc9f6d4375fae3b53609ee0
2015-07-17 16:31:56 -05:00
jenkins-bot c39bd98597 Merge "Revert "Make toolbar save button frameless"" 2015-07-08 15:38:55 +00:00