Commit graph

76 commits

Author SHA1 Message Date
Reedy 166812da07 Namespace extension
Change-Id: I779e97e512ec0c4f74fb6a4b706772fb1428e40f
2021-11-25 22:53:34 +00:00
C. Scott Ananian 6e1e698873 Rename deprecated usage of ParserOutput::{get,set}Property()
Bug: T287216
Depends-On: Ie963eea5aa0f0e984ced7c4dfa0fd65d57313cfa
Change-Id: I1633f6fa00193df6ea1d6633de07bc8d2b269cbf
2021-10-08 10:29:01 -04:00
TChin 457476611f Replace deprecated onPageContentSave hook
Bug: T291001
Change-Id: I5ac84af28a4687337bb21eafb907ac7224e67b5b
2021-09-29 13:49:10 -04:00
Adam Wight 7b32bcefb4 Add suggested values parameter
Parameters may include a `suggestedvalues` property, which is rendered
in the UI for some parameter types.

TemplateData editor UI elements are implemented behind the
TemplateDataSuggestedValuesEditor feature flag.

Bug: T271897
Change-Id: I14012c79b3fa0d48c58fd8999584cc03ec03575e
2021-04-09 12:05:37 +02:00
Adam Wight d63a375fac Finalize event platform migration
Bug: T275011
Bug: T275012
Change-Id: I51a3c3b6b3943db651807fbb2c0eb17c8c51440f
2021-02-24 16:52:55 +01:00
WMDE-Fisch 43e3043bab Allow input fields for parameter values to expand
Adding a new widget that inherits from MultilineTextInputWidget but
is initialized with only one row and prevents using the return key
to add new lines.

Bug: T263533
Change-Id: I5423f5f04075d21abd7acf09b622fd6444feeeb2
2021-02-17 17:27:54 +01:00
Andrew Kostka d81226fdf7 Bucket the user's edit count before logging an event
Bug: T272569
Change-Id: I5313a3808b266bb60644b40bdb192db77208774a
2021-01-21 13:52:28 +01:00
WMDE-Fisch b8b1df894f Add tracking for template data presence
This will give results whenever template data is requested e.g. by
VisualEditor or the TemplateWizard.

Bug: T259705
Change-Id: I2a9e864b94b6f8f49ca3adaa46502627ab6b3322
2020-12-16 12:50:44 +01:00
WMDE-Fisch ae0dd0e094 Get WikiPageFactory and LanguageNameUtils from services
The bump to 1.36 was overdue because the PageProps are used from
services already.

Change-Id: Ic4b42f58290e15123b281d48be396e8b7e8eeab0
2020-12-15 14:15:47 +01:00
Thiemo Kreuz d08a6448e9 Track when (relevant) changes are made to <templatedata> tags
Bug: T267926
Change-Id: I55f72500b7bad7e648238560b516e870bc9130c8
2020-12-07 15:34:13 +01:00
Adam Wight d8e418671d Send metrics when opening the dialog
Distinguish between create and edit.

Bug: T260343
Change-Id: I5cd29dff0c4db7e024395a9090c465a01527f079
2020-12-04 18:43:23 +00:00
Adam Wight b7fee749ab Migrate to package files: ext.templateDataGenerator.editTemplatePage
Change-Id: Ie03284701c1870b06116b7ce6a8ca1759c28d03b
2020-12-04 19:41:50 +01:00
Adam Wight bda6215309 Migrate to package files: ext.templateDataGenerator.data
Bug: T260343
Change-Id: Ifd171b40de704bff8c063da46b711a384238a0f5
2020-12-04 19:41:30 +01:00
Adam Wight 479a5a4f12 Migrate to package files: ext.templateDataGenerator.editPage
This is trivial, only I'm splitting into its own patch to bisect a
test failure.

Bug: T260343
Change-Id: Ia6d581a0278b21cbfdcfdad0d6193fb965f35814
2020-12-04 17:00:37 +00:00
Ed Sanders 91214f0a6f Use OutlineSelectWidget/OutlineOptionWidget for maps editing
Change-Id: I90ab11c9a0941e8a487a7253d69f0a6cb1dc8dc5
2020-10-05 21:04:44 +00:00
Thiemo Kreuz 0323e78308 Add missing ResourceLoader module for the trash icon
Without this, there is no guarantee the icon is there.

Bug: T258820
Change-Id: Ibe16db80ba8aec53477c48553c8f9c244d9f9a3b
2020-09-18 15:53:40 +02:00
Khatean 76cf63dad2 Allow different maps to be edited separately
Seperate different maps of maps-object into different panels that
contains text-area to edit the map, delete button to delete the map, and
can be navigated through using a side-bar, that also have "Add new map"
button at the top to add a new map.

Bug: T258820
Change-Id: Ib53a73203f6010b3fd8a5cd78c74c904be2340f2
2020-08-28 20:18:27 +02:00
adham-khatean e719555d30 Create initial UI for maps panel in TemplateData GUI
Adding maps object to TemplateData GUI. By adding mapPanelButton to the
main panel and creating the map panel which contains multiline input
widget to show and insert the map info.

Bug: T254478
Change-Id: Iacff86812cbc448fcdbae24e7eeffb0384781dd5
2020-07-09 19:13:29 +02:00
jenkins-bot 8f96ba6c5e Merge "Convert to manifest_version 2" 2020-05-12 16:35:52 +00:00
Reedy 69cfb3bd1b Convert to manifest_version 2
Bug: T252470
Change-Id: I1c48a7d6e355783accd1a5ff19b9a1e4876388dd
2020-05-12 01:33:49 +00:00
James D. Forrester a644018c57 extension.json: Fix name of QUnitTestModule
Change-Id: I0d94c300001d89ad1155e59f5734dcb05c4ce272
2020-05-11 14:43:36 -07:00
James D. Forrester edf85c08e7 Use QUnitTestModule instead of deprecated ResourceLoaderTestModules
Bug: T232875
Change-Id: I5612a9be65f4d4adf4912645856540dbb04d2b34
2020-05-11 19:45:10 +00:00
Timo Tijhof 53f4783ffd Organise resource files in directories after their module bundles
* I've moved the one remaining file in resources/ to modules/.
  The repo had both resources/ and modules/.

* Class files are named after their class.

* Files with init logic on a page are named init.js.

* Files that only export re-usable classes for another module,
  are named index.js.

Bug: T193826
Depends-On: If661c68bea069e99cfff35711efdde7805a12851
Change-Id: Ic8975d7ba349ba50f9039545d2eb8d912ccdce26
2020-03-15 15:21:39 +00:00
Timo Tijhof 2034c95f17 build: Remove redundant arrays around "Hooks" in extension.json
Change-Id: I4111beae5504565af7c12278ce6696ab3ab3d960
2020-03-12 18:04:02 +00:00
Subramanya Sastry 956367fb90 Implement ParsoidFetchTemplateData hook for Parsoid/PHP
* This hook supports functionality that Parsoid/JS used the MW API for.

  Parsoid's html2wt code requests templatedata for titles one
  at a time currently and so this hook also supports lookups one
  title at a time.

  This initial implementation is good enough for initial Parsoid/PHP
  deployment.

* As part of later performance optimization, we should figure out if
  we want to fetch templatedata for all templates in batch mode and
  work out the details (selser doesn't touch all templates, for one).

  The hook does accept an array of titles, but it looks them up
  serially in a simple for-loop.

  Separately, we need to resolve if this is better architected as
  a lookup service vs. a hook as it is now (see discussion on gerrit).

* Tested locally on my local wiki.

Bug: T238954
Change-Id: I01fb6a9f334ca37a703be497524180f87fb8bbf7
2019-11-25 11:09:13 -06:00
jenkins-bot 2aeec4610d Merge "Do not always store template data compressed" 2019-09-30 23:56:21 +00:00
saper ce13175017 Do not always store template data compressed
Only MySQL can handle blobs in page_props.pp_value

Bug: T203850
Change-Id: Ie20d412d89855e451d48f7656d97fb305b1c4c55
2019-09-30 14:24:39 +02:00
Timo Tijhof b87d37f482 Merge 'ext.templateDataGenerator.ui.images' into 'ext.templateData.images'
Only ever used together as dependencies for module
'ext.templateDataGenerator.editTemplatePage'.
In the UI, they provide icons for the same dialog.

The 'ext.templateData.images' module is also used in one other place,
via addModuleStyles() on NS_TEMPLATE pages that use <templatedata>.

The 'template-format-block' and 'template-format-inline' icons
are used by the Parser output HTML for the documentation block.
Having one unused icon there, preloaded for editing templatedata,
seems acceptable given it's so tiny and basically was already being
paid for on page views with the mere existence of the module taking
up about as much space as the icon itself.

Change-Id: If839100feca51d67bba7151878dfddd1bcbc372b
2019-09-13 03:12:42 +01:00
Timo Tijhof 8f35430bd7 Merge 'ext.templateDataGenerator.ui' into 'ext.templateDataGenerator.editTemplatePage'
Change-Id: I3357618f95f4baeb27013b9d753a3f99cba3847e
2019-09-12 23:20:22 +01:00
Fomafix 962a84ed82 Preload tablesorter styles by module 'jquery.tablesorter.styles'
This change avoids the flash of missing sorting buttons while loading,
but only with I0b446d18f47428d8c0c4aed78b75de16fe106218 in MediaWiki
core included in MediaWiki 1.33 or higher.

Depends-On: I0b446d18f47428d8c0c4aed78b75de16fe106218
Change-Id: I2c3eeb3a83822798ae0c46fcfea071df706798d7
2019-06-12 07:37:10 +02:00
zoranzoki21 ac59e27411 Move all apihelp translatable messages to separate files
Bug: T189982
Change-Id: I0614e26ad8205209f3efd5c480248740eee92aed
2018-12-03 20:41:20 +00:00
Ed Sanders 822d0cd345 Rename module editPage→editTemplatePage, create minimal new editPage module
VisualEditorPluginModules loads whenever VE loads, so create a minimal
loader page to check if we are in the template namespace before loading
the rest of the TemplateData init code.

Bug: T208765
Change-Id: Id127eb4a2472a6ce9da7672f9237b182cf6be2eb
2018-11-24 00:14:03 +00:00
Kunal Mehta 28e0ad4993 Don't use deprecated mediawiki.api.messages
It was merged into `mediawiki.api`.

Bug: T196802
Change-Id: Ib89340e31163dea6ba5b5d4c4ba2613727504332
2018-06-10 13:15:28 -07:00
Kunal Mehta de96754626 Move PHP classes to includes/
Change-Id: I7f46b6da2995687b3ec1ed95cf6f35c2a40d4f1e
2018-04-24 16:50:31 -07:00
Sam Wilson 59a92c521c Require MediaWiki version >=1.30 due to MultilineTextInputWidget
Change-Id: I636003cd376d92a52d51c4050b01a7002b543849
2018-04-06 11:16:55 +08:00
Kunal Mehta f24b411235 Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: Idae56d8787c5843790c1ecd1b1b64ef58702b823
2018-03-04 05:07:52 +00:00
Ed Sanders 313a261f7c Make '/doc' subpage an MW message for local overrides
Bug: T125222
Change-Id: I48c666a1e313a56fd3be98d28edc24d200a35309
2018-02-16 18:16:33 +00:00
jenkins-bot f162c748aa Merge "Block duplicate parameter names when editing existing parameters" 2018-02-08 16:37:20 +00:00
David Lynch f75b144129 Block duplicate parameter names when editing existing parameters
Previous behavior was to silently append a number to the name, which was hard
to notice. New parameters with duplicate names were already blocked.

Also, fix the disabling of the done button when there are errors.

Bug: T166520
Change-Id: I1d0c51a2aa8b8158874c98ac48fe257baeb1aee1
2018-02-07 11:09:47 -06:00
zoranzoki21 3538fb022d Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: I2cbd47182a275be366282de60027092ca798caa8
2018-02-03 16:30:02 +01:00
Ed Sanders b1d7ad8bc8 Use textSelection API to modify textarea
Bug: T73363
Change-Id: I411027236cbb3b349372a64ecbf670062758cfab
2018-01-26 10:32:03 -08:00
Brian Wolff d45f29bb8f Bump version for security release of extension
Change-Id: I382b095ab78de2286b77d14daf0ce94df4230d22
2017-12-18 20:58:39 +00:00
Fomafix 84ef237bde Rename PHP files to match class names
This avoids the exclusion of the rule
MediaWiki.Files.ClassMatchesFilename.NotMatch in .phpcs.xml.

Change-Id: Ifd7f5f59097c6dedc19f031baaef538023a33336
2017-12-15 23:58:46 +01:00
Bartosz Dziewoński e094a5c11d Add appropriate OOjs UI icon pack dependencies
modules/widgets/ext.templateDataGenerator.paramWidget.js
* Add 'layout' as it uses 'menu'

modules/ext.templateDataGenerator.ui.tdDialog.js
* Add 'interactions' as it uses 'advanced'

Bug: T166730
Change-Id: I5b09f629ec274a89f96030de8af64cfe5d659143
2017-06-03 12:49:41 +02:00
Timo Tijhof d7069bcc7f Fix styles queue violation for "ext.templateData"
Only contains a stylesheet and has a dependency. Module is only
loaded via addModuleStyles, which means the dependency is ignored.

It triggers the warning because it has a dependency, which means
it's not a pure styles-only module (despite being used as such)

> Unexpected general module "ext.templateData" in styles queue.

Aside from the addModuleStyles() load, it is also specified as
a dependency for "ext.templateDataGenerator.ui".

Dependencies on style modules from JS modules are supported since
T87871 was resolved, however the indirect dependency still doens't
make sense.

Move the dependency on ext.templateData.images, which wasn't needed
or triggered by "ext.templateData" styles anyway, to the UI module
directly.

This also fixes the fact that the "ext.templateData" css is loaded
twice (once as blocking stylesheet without dependency, and then
again as async module via "ext.templateDataGenerator.ui" with dependency).

Bug: T92459
Change-Id: I4c3bb44c135fccb85a26ad901ec9660d647dfe86
2017-05-10 02:48:40 +01:00
jenkins-bot a31aaedb88 Merge "Extend 'format' spec to include custom format strings." 2016-12-13 21:52:45 +00:00
jenkins-bot 48f9d52a5f Merge "Move icons to RL and generate inverted variants" 2016-12-06 20:53:09 +00:00
Ed Sanders e21a2563ce Move icons to RL and generate inverted variants
Also remove unused parameter icon.

Change-Id: I0ce10a50a0738ba111cfd63bc9cc5de03fae8c8d
2016-12-06 11:53:52 +00:00
Ed Sanders 94d0e73a6b Move all init code over to target
Change-Id: I9ba06bb3a57a7683e246461341c67462cab465d0
2016-12-05 17:02:38 +00:00
Ed Sanders a586d54e93 Abstract out editor manipulation form UI
Create target classes with get/setWikitext methods.

Also refactor some of the window manager code.

Bug: T152230
Change-Id: I7dcc137d79e029b69467ca282d8c52683e022598
2016-12-05 17:01:15 +00:00