Commit graph

33 commits

Author SHA1 Message Date
jdlrobson 7a7f751b42 Create mobile thanks using the mobile library
The thanks icon had styling issues as it didn't use the mobile
icon and button fundamental components.

The icon should also be inside the button, the element should not
be both a button and an icon.

Bug: T229440
Change-Id: I0136466fe1452f904961b89ae7677fc1a511adab
2019-09-13 19:23:49 +00:00
Ammar eae0f237df Remove unneeded CSS for thanks toast link
Minerva now provides default styling for these links.
Also removing 'grunt-stylelint' package as there are no
CSS/LESS files in this extension any more.

Bug: T232102
Change-Id: I4e8b44d3159ab4a87103fa8471c7b1b145ac6016
2019-09-06 09:23:12 -07:00
Timo Tijhof bfa2bd3f72 Merge jquery.findWithParent.js into 'ext.thanks.flowthank'
Never loaded directly as entry point, and only used by one module
as dependency. Does not need to be its own module bundle.

Bug: T202154
Change-Id: I8bfcdc82f96fac6e3e269fcef351a822acd860bd
2019-08-05 16:09:10 +01:00
Thalia 810de9afbd Allow partially blocked users to use Thanks
Only prohibit users from using Thanks if they are blocked from the
associated page. This allows partially blocked users to use thanks
most of the time.

It also allows blocked users to thank on their own talk page, if
they are allowed to edit it, even if they are sitewide blocked.

Bug: T221371
Change-Id: Ic99ec38ea200e806963951b2dd67e56ecde63752
2019-05-22 22:05:33 +01:00
Matěj Suchánek 08f769b3b2 Enable thanks on Page creation log
Bug: T213660
Change-Id: I1edf7bc8d1d2d604034a07069f0f39fa30bf36ae
2019-02-25 08:03:44 +00:00
jdlrobson 4f276041f4 Add client side click to cancel on thank
When the thanks button is clicked a thanks will be
queued, that the user can cancel by clicking "cancel"
before the action is completed.

This should help the majority of users experiencing
accidental thanks.

Bug: T63737
Change-Id: I807f729c1b1a9e9b5952685bb18f540f81d70f47
2019-02-08 17:31:20 -05:00
Rafid Aslam b7cd517fb6 Move all apihelp translatable messages to separate files
Should be merged along with
Ie566f9b0b6ba267470c01f17c3f4ea74482e2d2d

Bug: T189982
Change-Id: Id3d44fe0e7884276f7c81253f6b765984f5c9945
2018-11-21 07:00:55 +07:00
jdlrobson 5927de143e Fix indentation in extension.json
Follow up to I82ae596330aff8387653c65a6bab5ff729641a80

Change-Id: I849599e57bb546d99c1435222bc183ab8e5971c0
2018-08-16 10:18:20 -07:00
jdlrobson a6fa3c4977 Do not use PNG for thanks button
Instead use mediawiki.ui and ResourceLoaderImageModule

Other changes:
* Add gender support to thanks-button-thanked

Depends-On: I0745e112d11026ed59d8daca990b313305cd094a
Bug: T198151
Change-Id: I82ae596330aff8387653c65a6bab5ff729641a80
2018-08-09 17:13:21 +00:00
C. Scott Ananian edd6818eb9 Replace uses of deprecated Language::truncate()
See I2291c69d9df17c1a9e4ab1b7d4cbc73bc51d3ebb for the anticipated
hard-deprecation of this method in core.

Bug: T197492
Change-Id: I5d4ec96afe82910ffd18377b5f5f94405f73e9eb
2018-06-15 20:24:32 -04:00
Kunal Mehta b8b892bb98 Hard depend upon Echo in extension.json
This extension is useless without Echo, and the API modules already
disable themselves if it's not installed. Just absolutely require Echo
to be installed.

Change-Id: I653eea78668bfe0875bc5a33e2d45607106d4ee5
2018-04-11 01:00:30 -07:00
Niharika Kohli 896ea17303 Allow thanking for flow-lock-topic and flow-restore-topic
Bug: T191482
Change-Id: I3f5bd11d0c02ee25b305c73a708f995cb59e4624
2018-04-09 17:40:38 -07:00
Sam Wilson 2059e3ff4b Add revision-thanking links to some log entries
Many log entries are associated to (exactly one) revision,
and for these (only, and only where the log type is
whitelisted) we add a thank-link that behaves exactly
as the thank-link on diff and history pages.

Bug: T189752
Change-Id: I5f4e84c65d4fe2d95b20cdb3c3f9522ad3e5f422
2018-03-22 11:57:55 +08:00
Reedy 2735468029 Revert "Add revision-thanking links to some log entries"
This reverts commit 9f393ef9dd.

Change-Id: Ie76fef8dc25b1134f1f60da50a87b00115154041
2018-03-14 21:49:25 +00:00
Sam Wilson 9f393ef9dd Add revision-thanking links to some log entries
Many log entries are associated to (exactly one) revision,
and for these (only, and only where the log type is
whitelisted) we add a thank-link that behaves exactly
as the thank-link on diff and history pages.

Bug: T186763
Change-Id: I2af380d5cb06f19ef9eb5b232d95ad87379b5d9b
2018-03-13 09:33:15 +08:00
Max Semenik ed087b044c Reintroduce the API to thank for log entries
Originally introduced in b84eedc74e, it was reverted for security concerns.
New changes:
* Instead of bundling the log summary with notification, load it on display
* If the log event has been suppressed after the thanks for it has been sent,
  silently delete the event to prevent the confusion of linking to something
  zapped.
* Keep the 'already sent' cache key compatible with old format
* Validate the log id in the API
* Change ApiCoreThank::getRevisionFromParams() to ApiCoreThank::getRevisionFromId()

Bug: T186855
Bug: T188791
Depends-On: Ic5e9db0def857d9dcecbd06bf081c8c83712c1ea
Change-Id: I03aea7d9f4dfa0fe49639c53968deabf89999d2d
2018-03-06 13:08:47 +08:00
MaxSem 3b2397fea9 Revert "Add support to the Thanks API for thanking log entries"
This reverts commit b84eedc74e.

Bug: T188791
Change-Id: If55ed6cbb5da34c0034da3cc564c6a8ff82448d2
2018-03-02 22:59:20 +00:00
Sam Wilson b84eedc74e Add support to the Thanks API for thanking log entries
Add a 'log' API parameter (for the log ID to thank), and add
a whitelist config variable for specifying which log types are
thankable.

Bug: T186855
Change-Id: I58ae90c9729c0066f952e90fca2cf99b029d0d9b
2018-03-01 14:57:57 -08:00
jenkins-bot 9c708f1ac2 Merge "Add jquery.cookie dependency" 2018-02-24 00:07:51 +00:00
Sam Wilson 78831d2b68 Rename files and classes in preparation for adding log-thanks
Bug: T186855
Change-Id: I20f5d200c33e395aca9489b73d0ed9b1d0ad5b8c
2018-02-21 12:49:21 +08:00
Sam Wilson 84834d5b41 Add jquery.cookie dependency
Bug: T187851
Change-Id: I6158f557cbafcfbca7e6c7d3e0c5960250133e46
2018-02-21 11:50:22 +08:00
Sam Wilson 2e7e5e0190 Move classes to includes/ and rename some to match class names
For conformance to coding standards. This removes an exclusion
from the phpcs config.

Change-Id: I1481a3e7e68a81daf310ea3c7bf9dc48cdaf140b
2018-01-30 10:32:03 +08:00
Roan Kattouw 6bb7939a79 revthank: Clarify confirmation message and change yes/no messages
Bug: T159302
Change-Id: I49ac7d644f207fe76a49efd650b727e33049b3af
2018-01-19 17:07:42 -08:00
Matthew Flaschen 545a7de5e2 Add missing jQueryMsg dependency for mobile diff view
Bug: T170917
Change-Id: Ibca76902e0d748b95bb57e871993a4dc2664d5cd
2017-07-18 15:27:41 -04:00
Fomafix 2d0c8bd0f8 Fix module dependencies
* Change dependencies for 'ext.thanks.mobilediff' from
  'mediawiki.notification' to 'mediawiki.notify' because
  ext.thanks.mobilediff.js uses mw.notify and not mw.notification.
* Add module 'mediawiki.api' to dependencies for 'ext.thanks' because
  ext.thanks.thank.js uses mw.Api.

Change-Id: Icae08555c5ec0297c390e5161f9269b9c84f1145
2017-06-27 15:28:12 +02:00
jdlrobson 35964a6c77 Remove MobileFrontend toast dependency
Rather than using mobile.startup, switch
to using mediawiki.notification which is more
lightweight and does same thing.

Bug: T155801
Change-Id: I23d75272602766e24e8b01410f4a88609eda6dee
2017-01-26 11:56:18 -08:00
Reedy b96f1a8b70 Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: Ic856aa0d3d7af53f1405ceee43aff41bface3b58
2016-08-05 17:40:28 +01:00
Stephane Bisson 245190c451 Cleanup old notification config
* Remove unused formatters
* Remove old formatter config
* Remove unused messages

Bug: T121612
Change-Id: I4c49c12bcf1366cd7a786aadaab6dfed67a3428a
2016-07-20 11:25:05 -04:00
Prateek Saxena be2ed5f959 Use OO.ui.alert() instead of plain alert
Bug: T128891
Change-Id: Ib5d47bad48e8d42098de19a2c87dd863a38c2a2d
2016-07-15 20:55:21 +05:30
Stephane Bisson b52fd0ea6f Make thanks notifications expandable bundles
* edit-thank
* flow-thank

Bug: T120152
Depends-On: I1507cae360f45cc87f2d60e966b4d047abfa202d
Depends-On: I91abb2dded9ab7f124aaa798dd07c52576ee791b
Change-Id: I21e36d1874967495d9541f621481cfccf54b7f19
2016-06-27 10:02:59 -04:00
Michael Holloway a93a610abe Remove mobile.special.mobilediff.scripts dependency
The mobile.special.mobilediff.scripts module was removed from
MobileFrontend[1] but remains listed in its extension.json and as a
dependency here.  This removes the dependency so it can be removed
from MobileFrontend.

[1] See I40ac27e56fcc3ccc58870660d0ed7353c7a17748

Bug: T131757
Change-Id: I399ef6a0abaeaf3ca10461f4579a0a3fcdab9df3
2016-06-18 17:02:24 -04:00
Brad Jorsch 918b74ea9e Use LocalUserCreated hook instead of AddNewAccount
Since the extension is using short array syntax, I'm going to guess
there's no need to complicate it by worrying about compatibility with
MediaWiki core < 1.26.

Bug: T135065
Change-Id: I81dd764940ebb400f3ecdf15934f6f501c05ea9c
2016-05-25 14:42:20 -04:00
ananay f04e86b571 Convert Thanks extension to use extension registration
Bug: T88056
Depends-On: I0d1abbb251f4a6d126d58668d1281a6f1550b459 
Change-Id: I6afff0651690a8fcd7a410b8ffc3fe80d530ea69
2016-01-07 19:00:29 +00:00