Commit graph

1759 commits

Author SHA1 Message Date
Volker E f695877de7 Rename deprecated Card to current TabPanel
Renaming CardLayout to TabPanelLayout and all connected code instances.
Follow-up to Icfe1652cc038dc131b6b855ce9b45040b8ee5178

Bug: T164903
Change-Id: I9ce4e31e390522d469e126fb3a4b05787cef7fef
2017-05-10 11:46:49 -07:00
David Lynch 2f40972807 MWWikitextDataTransferHandlerFactory: Don't reimplement getText
I forgot about getText in 41ca528705, apparently.

Bug: T163237
Change-Id: Ibb646fc03a0293845c4449cbbe6c822ba63751f8
2017-05-10 10:58:42 -05:00
jenkins-bot 862c3ca22e Merge "MWWikitextDataTransferHandlerFactory: skip getWikitextFragment if possible" 2017-05-10 15:51:16 +00:00
David Lynch 41ca528705 MWWikitextDataTransferHandlerFactory: skip getWikitextFragment if possible
This lets us avoid a fraction of a second lag when someone pastes a plain URL
into source mode.

Bug: T163237
Change-Id: I0e673856dec5f273fb92731b27494762299d2d6c
2017-05-09 10:19:15 -05:00
Ed Sanders debcd678b5 Generate visual diff only after switching to visual diff tab
Bug: T164724
Change-Id: I48e49d4b68cc769b3e9d061983de4c78b5ad5c34
2017-05-09 10:09:39 +00:00
Ed Sanders 485a159037 Allow welcome dialog to be variable height
Bug: T164056
Change-Id: I277a709545151dbd51f92c21d6317a45b1088db2
2017-05-04 13:08:33 +01:00
Ed Sanders 54fc920622 Captcha improvements
* Fix focus and resize/scroll into view after the
  captcha has loaded (so after the image has loaded
  for FancyCaptch).
* Add margin between input and captcha
* Enable enter-to-submit on captch input field.
* Unify code for simple/math/questy and correctly
  render math as HTML (by looking at the mime type)

Change-Id: I10433cefbfea8569674c120dde5b489570e20966
2017-05-02 17:49:12 +01:00
Ed Sanders ede81b493e MWSignatureNode/Tool: Avoid global variables
Change-Id: I0596b33e797830f3718f4edbe34075fdaced0831
2017-04-29 12:37:28 +01:00
jenkins-bot 604dc2d86a Merge "MWMediaTransferHandler: Allow uploading of dropped Blobs" 2017-04-27 19:32:42 +00:00
Ed Sanders 3999fb1eb6 VisualDiff: Check save dialog is still visible when re-rendering diff
Change-Id: I1d740b767d150699863f18ee6dd9eca8a35b2bf1
2017-04-27 18:36:07 +01:00
Ed Sanders 3a9dcf7ec5 MWMediaTransferHandler: Allow uploading of dropped Blobs
Previous the media upload panel didn't support this. This makes Chrome
behave in the same way as Firefox when pasting images into a document.

Bug: T39932
Change-Id: I12f190a48ae9b62d4ad2f33b2a4ee546fdf7b354
2017-04-26 22:33:18 +00:00
jenkins-bot c8f919a880 Merge "MWCategoryWidget: batch requests for category data" 2017-04-25 18:32:52 +00:00
jenkins-bot 83b331e04e Merge "MWTemplatePage: Show a different message if the template doesn't exist" 2017-04-24 20:43:54 +00:00
jenkins-bot 233415cf50 Merge "MWTransclusionModel: Update for change in TemplateData" 2017-04-24 20:43:52 +00:00
James D. Forrester c787df90c5 MWTemplatePage: Show a different message if the template doesn't exist
Bug: T162694
Change-Id: Icad5abb240efd10fadbfdb287acb98afe2361719
2017-04-24 20:30:35 +00:00
James D. Forrester 8fd621ad74 MWTransclusionModel: Update for change in TemplateData
Depends-On: I7905502d0c419a04e4487095214634f1513b461c
Change-Id: I97a1bfc9f9ead082a673a91b9d2053630a90309c
2017-04-24 19:13:59 +00:00
Ed Sanders df3a4fb171 MWSaveDialog: Check diffElement still exists after setTimeout
Bug: T162642
Change-Id: Iec01a8ebbda39d83fd1c2f4dbbef17793d9af1e4
2017-04-24 18:03:35 +00:00
David Lynch f7d0df2449 MWCategoryWidget: batch requests for category data
API query cuts off after 50 results.

Bug: T163406
Change-Id: I6e83843dd1a22334d9ddec7103ddf318fb181112
2017-04-20 16:47:16 -05:00
Ed Sanders c02c529537 Load notices when switching, just don't show them
Previously we completely disabled the loading of notices
when switching, instead of just not showing them (so they
don't clash with the "switched" popup).

Bug: T162812
Change-Id: I3f8e787630e196cee1dbb1aa449b3558b74fcd04
2017-04-20 21:20:10 +01:00
jenkins-bot 06777e20a3 Merge "MWCategoryItemWidget: remove DraggableElement's padding" 2017-04-20 15:23:29 +00:00
David Lynch 1c47d71e7d MWCategoryItemWidget: remove DraggableElement's padding
OOjs UI v0.21.0 changed DraggableElement's padding. Override it here, so it doesn't look broken any more.

Bug: T163404
Change-Id: Ic0bc4f9e3e060cf89e6bc7cb22068d1fe1441d75
2017-04-20 02:05:42 -05:00
Bartosz Dziewoński 4b7d188735 ve.ui.MWCategoryPopupWidget: Fix popup positioning
Figuring out why it broke doesn't seem like a very interesting task,
so let's just throw the whole logic out and use OOjs UI PopupWidget's
new built-in ability to position itself relative to anything.

Bug: T163269
Change-Id: Ie464e4668001f4bc6151b40cef469937aa8c6e48
2017-04-19 22:48:16 +02:00
James D. Forrester 0ca821b321 Follow-up 57a06a6e: .getAttribute might be 'guaranteed', but not from null
Whoops.

Bug: T162939
Change-Id: I5a9315e3cfc8a9e8edfb2ef597daeae09bbf5c5e
2017-04-13 14:38:20 -07:00
David Lynch efc469f2f4 TemplatePlaceholderPage: abort pending template search after adding template
With precise timing, the lookup menu could appear after the add template
button had been pressed and the user had moved on to the next page.

Bug: T162707
Change-Id: I36941dc7288c6031a0fb189c0946aa6d8f8697e8
2017-04-12 11:34:42 -05:00
James D. Forrester 57a06a6e75 dm.metaitems: Turn grouped metas into variadic ones
We're getting rid of meta item grouping, so we need to prepare.

Merged:
* ve.dm.MWIndexMetaItem
  from ve.dm.MWIndexDisableMetaItem and ve.dm.MWIndexForceMetaItem
* ve.dm.MWNewSectionEditMetaItem
  from ve.dm.MWNewSectionEditDisableMetaItem and ve.dm.MWNewSectionEditForceMetaItem
* ve.dm.MWTOCMetaItem
  from ve.dm.MWTOCDisableMetaItem and ve.dm.MWTOCForceMetaItem

These three now inherit from ve.dm.MWFlaggedMetaItem to avoid code duplication.

Change-Id: Ic8a9cdb1226dccac2c27e7f4b965c1590a7387c0
2017-04-11 11:13:18 -07:00
David Lynch cdefd36d1e Internal link context popup: selflinks still get link styling
Bug: T162671
Change-Id: I0ba584b90db73ebade81050f0d782945b8934080
2017-04-11 10:51:05 -07:00
David Lynch d5ac18a466 LinkCache: don't treat a link with a fragment as a selflink
This matches the rendered output for the page.

Bug: T162669
Change-Id: I1ea0ab37a2751c0b4669da8a23adf0ce271facea
2017-04-11 12:19:01 -05:00
Ed Sanders a6b4258f47 ArticleTarget: Refactor savedialog/target interaction
* Pass a wikitext promise, instead of wikitext
* Handle writing of content to the dialog from within
  the dialog.
* Handle diff errors within the dialog.
* Never disable the 'Return to save form' (approve) button
* Remove redundant messages

Change-Id: Ibd76e8951998f751abfb4f407682202c2f73ac7e
2017-04-10 10:29:41 -07:00
Ed Sanders 7a66d4f08a Update VE core submodule to master (1338c50f5)
New changes:
ae0204885 stylelint: Remove no-unsupported-browser-features overrides
d744cd576 Localisation updates from https://translatewiki.net.
1338c50f5 [BREAKING CHANGE] Remove resize handlers from within DiffElement

Local changes:
Trigger diff element resize on dialog resize

Depends-On: I82a67a4309bf76db5407ea38c26c47d14c01e921
Change-Id: I912a99edca25ff576e2872723f91afe54e36a170
2017-04-10 10:29:18 -07:00
jenkins-bot 40265bd807 Merge "stylelint: Drop no-unsupported-browser-features references" 2017-04-10 16:49:15 +00:00
James D. Forrester f51a6d5020 stylelint: Drop no-unsupported-browser-features references
The rule hasn't been applied for a while, as it was deprecated upstream.

Change-Id: I7877d0e3bdcd05a609d61add2dc62d7598e348cb
2017-04-10 08:36:37 -07:00
Ed Sanders 97f6bdd79a Make Target#getVisualDiff async
This will be required later when we have to fetch the original
document from the server before running a visual diff.

Change-Id: I351688f4d1fec892bc297f40c209939cbb2ccf95
2017-04-09 13:26:22 +01:00
jenkins-bot c599a82fe8 Merge "MWSaveDialog: Run links through a render function for preview & visual diff" 2017-04-01 15:22:09 +00:00
James D. Forrester 8463524e18 MWSaveDialog: Run links through a render function for preview & visual diff
Provide a utility funcition in ve.init.mw.LinkCache to do this.

Also use this in ve.ce.MWTransclusionNode/ve.ui.MWPreviewElement, and
introduce to ve.ce.MWExtenionNode

Bug: T73900
Bug: T153535
Change-Id: Ieb9a0274b8c5ae1932c431546f09d18000fa6dd9
2017-03-31 10:51:35 +01:00
Bartosz Dziewoński 285a078b21 Check magic link autolink sequences also after paste
Bug: T161152
Change-Id: Ie308cdb287f805da888325d4c9ba6d3c35bd017c
2017-03-30 23:13:00 -04:00
Ed Sanders 2bc3bd75dd MWTransclusionDialog: Move box-shadows to Apex-only
Use solid borders for MW theme.

Change-Id: I4a5418d006adf0c7d47dc58624868cf6bb4b7de6
2017-03-30 17:03:35 +01:00
David Lynch 1f1be831c0 Add template: don't try to add invalid templates when enter is pressed
Bug: T161715
Change-Id: I12eabe3588fbcbed0fa18b94de7de7239ba490c2
2017-03-29 10:53:17 -05:00
David Lynch 9e86d17260 MediaDialog: flag caption widget as being in a dialog
This means that cmd+enter won't add a newline when it closes the dialog.

Bug: T161555
Change-Id: I738c9acf8cce437ce6bc4c8db29f28d1fff3d2c9
2017-03-28 11:43:59 -05:00
Ed Sanders 4ac660ad48 Defer rendering of visual diff until tab is selected
Bug: T161355
Change-Id: I718a92f4c9f8c3a48e359da898ede7dccebcec5e
2017-03-25 13:23:28 +00:00
jenkins-bot 34fa4dcda6 Merge "Use original title or normalized title when inserting link text" 2017-03-24 22:27:33 +00:00
Ed Sanders 738d3aff47 Use original title or normalized title when inserting link text
Original title will preserve the case of what the user entered
into the inspector. Noramlized title will remove any unwanted
leading colons from file/category links.

Bug: T118408
Bug: T124410
Bug: T160977
Change-Id: I92ffc19eab4eead0d124e84afc1e5a0a3e535867
2017-03-24 22:16:31 +00:00
Ed Sanders c485bd4fce Apply the 'external' link class hack to MWPreviewElement
Change-Id: I3ccea9a72f812e73bdc4d8d34635671dfd493be4
2017-03-24 18:53:08 +00:00
James D. Forrester 555aba7fe8 ve.ui.MWGalleryDialog: Don't die if the dropdown menu doesn't have a value
Bug: T160967
Change-Id: Ic83e204eb5c2d14baadf0e450a27ce836337b983
2017-03-22 13:49:49 -05:00
Bartosz Dziewoński 86f739c994 Remove "prefix": "oo-ui-icon" from ve.ui.Icons.json
This gets overridden by "selectorWithoutVariant" and "selectorWithVariant"
in the module definition anyway.

Change-Id: I51b8e76d542058c008d92ce55c7ec6bb66df70b7
2017-03-21 20:27:04 +01:00
David Lynch e035c1de08 Follow up ec559041: abort notices display early if no notices
This avoids attempting to toggle after a destroy call has been made.

Change-Id: Ia756ff6436ec0590639dbbff216c9999daf684ec
2017-03-16 18:00:22 -05:00
jenkins-bot 0ae808913c Merge "Introduce visual differ in the save dialog" 2017-03-16 21:28:41 +00:00
James D. Forrester ec5590418e Follow-up eb8ba26a: Make MWNoticesTool#setNotices() display its own popup
Running setNotices( [] ) makes MWNoticesTool run this.destroy() to avoid taking
up extra space in the toolbar when not needed.

Also, make setNotices() bail earlier.

Change-Id: I492fd59a1e15e8f296bf7f03d9b0035c40dafa59
2017-03-16 11:29:34 -07:00
David Lynch 318c6718fd MWNoticesPopupTool: When setting notices, clear existing notices
This would keep on duplicating notices when switching modes.

Change-Id: I04720904eddd95c0d3618d284d1930e41a0ae137
2017-03-16 12:13:36 -05:00
Ed Sanders 335b56728a Introduce visual differ in the save dialog
Bug: T143350
Change-Id: I1297d0f4bb87e69be3b50220c1830a22dac1bbae
2017-03-16 15:33:54 +00:00
Bartosz Dziewoński 3d5cedb0ff ve.ui.MWLinkAction: Improve ISBN and RFC/PMID autolinking
These changes allow us to be more aggressive in autolinking ISBNs (no
need anymore to wait for the user to type a space or move their
selection) and more correct in autolinking RFCs and PMIDs (stray
spaces and dashes no longer mess them up).

* ISBN numbers can only be 10 or 13 digits long. We don't need to
  handle arbitrary lengths.
  * If a number does not begin with 978 or 979, it's the ISBN-10 variant
    and we can autolink it as soon as the user types 10 digits.
  * If a number begins with 978 or 979, it can be either.
    * But if we already have 13 digits typed, autolink immediately.
    * Otherwise, use a delayed sequence to see if it ends at 10 digits.
* RFC and PMID numbers can consist only of digits, no optional spaces
  or dashes are allowed. Typing a space or dash will immediately
  autolink the number.

Bug: T117165
Change-Id: I6a085cd78d910661245a351f3ceb3fabe2f093cf
2017-03-15 21:58:26 +00:00