Commit graph

17 commits

Author SHA1 Message Date
Kgraessle a781f73e0e Inline thanks in recent changes doesn't work when live changes are enabled or 'view new changes' is clicked
Bug: T357787
Change-Id: I54fd9b180ee296d6173d2c0255f8758cde08558c
2024-08-29 08:57:13 -05:00
libraryupgrader 830bfffa5c build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.0
* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: I0f57a77c738f26a0cda10af9f3891d4beee447d9
2024-06-08 05:08:42 +00:00
libraryupgrader 17b410c6ec build: Updating eslint-config-wikimedia to 0.27.0
The following rules are failing and were disabled:
* modules:
  * prefer-const

Change-Id: I318c62b99290c67f0d04d26aad12379c0da0b944
2024-04-20 01:18:40 +00:00
Ed Sanders 32eaf729f0 Remove jsduck config
This has never been published, and there is very little public API
to publish. Use stanard jsdoc config in ESLint.

sendThanks doesn't need to return false as the return value is
never used.

Change-Id: I02dd9c83511afa5a6e66faf8e96d240eb2464ce3
2023-11-30 12:01:26 +00:00
Ed Sanders f18aee5bbc Move var declarations inline
Change-Id: Ib952bd8a8eb9e0fce9541c4f9336169416593f3e
2023-11-30 10:58:04 +00:00
Thiemo Kreuz a9878ab2ab Some smaller general code cleanups
In detail:
* Use more compact syntax to avoid a bit of code duplication.
* Use createMock() shortcut in tests.
* Avoid hiding code in strings.
* Remove a comment that literally repeats what the code says.

Change-Id: Ibedef380489451268e2e87f0864164e8f9737913
2023-01-03 12:30:41 +01:00
Ed Sanders aaaa5b63da JS: Update APIs to make more extensible
* Don't require a jQuery element with a specific attribute
  to record thanks. Instead pass in the thanked ID directly.
* In Flow, don't override the cookieName static property,
  instead pass it in as an argument.
  Change the static property (effectively a global) prevents
  us from having multiple types of thanks on the same page.

Change-Id: Ia569f8636f070f2af69f89d7da66c9a6f9821d24
2022-01-25 22:02:15 +00:00
Ed Sanders c033679cb8 build: Update eslint-config-wikimedia
Change-Id: I3cbcbb1695896ddc1e54c40dc0da50f91944916f
2019-12-12 11:36:24 +00:00
Fomafix fdc02d0d15 Avoid double HTML escaping
Also use the shorter

 mw.msg( ... )

instead of

 mw.message( ... ).text()

Change-Id: Ifb379960d875b090a14fd990c479df0b5aeb146d
2019-09-17 10:14:38 +02:00
jdlrobson d626e6f04d Annotate thanked confirmation with span and class
Users that have already been thanked have the link "thank" replaced
with the message "thanked".

This allows skins e.g. Minerva to style this differently from the rest
of the content.

Change-Id: Iacf7d840cf088afdad6d93ace0f69bf225e05cfa
2019-03-28 00:52:29 +00:00
Olena23 ca055ec16f Fix typo
Fixed typo occurd-occured

Bug: T201491
Change-Id: I077376e45130631425dd1012cc6a860938c8c265
2019-03-08 15:48:21 +02:00
Ed Sanders e453114f55 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Ie84c06e4a69923a5993b173d490bfa97189c285b
2018-11-12 19:22:46 +00:00
jenkins-bot 314dbc9d00 Merge "Add log-thanks support to corethank module" 2018-04-03 18:35:14 +00:00
Sam Wilson 3973a11e8d Add log-thanks support to corethank module
This adds support for thanking for log entries. It gets the log
ID from and attribute on the thank link (which does not yet have
this; that will come in T187485), and sets the source to be 'log'
if it's being called from Special:Log (this can be extended in
the future if we want to thank for log entries from elsewhere).

Bug: T186921
Change-Id: Ifdb458b873ed4f1e6e64760658d2293aba1e02b3
2018-04-03 07:55:12 +08:00
Roan Kattouw 52663255f7 corethank: Use the recipient's gender for all "thanked" messages
It was already being used when changing a "thank" link to a "thanked"
message because the user just clicked it and thanked that person, but
not when updating links on page load for things the user had already
thanked previously.

Bug: T190563
Change-Id: I4c5758ef446aa2712ae27a1c784555cbf23806f9
2018-03-28 21:55:48 +02: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
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
Renamed from modules/ext.thanks.revthank.js (Browse further)