Commit graph

14 commits

Author SHA1 Message Date
Ed Sanders 1d3be2c605 ESLint: Autofix no-var errors
Keep the rule and prefer-const disabled as they will
require manual fixing.

Change-Id: Idd31eb7d7a456b10c07b905b4b837dd4c890eb71
2024-06-03 13:22:48 +01:00
Novem Linguae 030bc26ae9 JSDoc: convert @cfg to @param
- convert @cfg to @param
- in mw.echo.dm.NotificationItem.js, add backticks around
  a block of code in a docblock so that it renders nicely
  in the generated /docs/

Bug: T138401
Change-Id: If7df2ab72fa835af662a8f01cc0c5edb1cb79c2b
2024-05-26 18:43:21 -07:00
Ed Sanders df8fbfed38 Replace jsduck with jsdoc
Change-Id: I2a1bfedeba66c9ec1b3ee2640a77d5ef8782530c
2024-04-30 15:29:06 +01:00
Ed Sanders 2cac61da34 Move var declarations inline
Change-Id: I8734c30880bcb416a4945f6653555dc1189e7733
2024-03-05 22:39:09 +00:00
Ed Sanders 17126b2ab1 Remove obsolete aliases from closures
Bug: T208951
Change-Id: If51fc6d50b9755c779fd0bf1be7bb0fe276539ea
2018-11-12 13:56:38 +00:00
Ed Sanders 2c089e075d build: Update linters
Change-Id: I9747097fdf725992710f97d4ce4ea49fd611df1b
2018-09-11 23:46:52 +01:00
petarpetkovic 00447385bd Fix 'Methds' typo
Bug: T201491
Change-Id: I5a2ef9924591bee15da3d9e94d84826d1e11e4d5
2018-08-08 13:27:02 +02:00
Moriel Schottlender f05131a8ef Fallback to dbname if source title doesn't exist
This shouldn't happen regularly, since the source should always
have a title through a wg* variable in LocalSettings.php but in
cases where that is not set up correctly, or is missing for whatever
reason, the system should always fall back to displaying the name
of the source, if the title doesn't exist.

Bug: T164112
Change-Id: I94074adc260a5caf55ca21578fd7071b3323a5e6
2017-06-05 16:40:15 +03:00
Ed Sanders c8d24ebd17 build: Replace jscs/jshint with eslint
Change-Id: Iee1d1b20ed31e636bfb8fc8cf9b18ff328bf608c
2016-11-23 15:25:59 -08:00
Roan Kattouw 4e64643eb7 Implement subject+talk and null+user page grouping
Make it optional through the unpgrouppages parameter, so that
generic usage of the unreadnotificationpages API is still possible.

In the front-end, store which display title maps to what set of titles,
and pass in the full set rather than just the display title when
filtering by a page.

Bug: T137502
Change-Id: I443ca00ff5e5d36fd6910101226358942e6aa8ee
2016-08-02 13:48:48 -07:00
Moriel Schottlender fcd2f41151 Store local source as 'local' rather than dbName
When we fetch the pages per wiki, the API returns an object that
defines the local wiki we are in as its dbName; this then gets
stored into the model as the source, which forces us to check against
the dbName whenever we want to perform an operation so we can tell
the API layer to fetch and perform the actions locally, rather than
use a foreign API.

The term 'local' makes no sense for naming the model (and upcoming
tech debt work will fix this) but it makes sense in the context of
the API layer -- and hence, the source name should follow suit.

This fix makes sure that the local wiki objects always have their
sources defined to be 'local', and thus making us use the test for
dbName in very specific points (when we get the data) rather than
throughout the codebase, randonly.

This is also the first step to allow proper updating of things like
seenTime accross wikis, especially in cases where we view a remote
wiki as if it is local (in the Special:Notifications page)

Change-Id: I94633a1cd074580cbc5029d7c75d179e908e5c52
2016-07-07 12:20:39 -07:00
Roan Kattouw 6c4bf99da8 ApiUnreadNotificationPages: Output pages as an array rather than an object
Make the frontend code based on page titles rather than page IDs.

Change-Id: I79c6a0e3a7178acdb14039a0c5208e90a7341044
2016-06-23 17:00:51 +02:00
Roan Kattouw e4b79c1bc2 Use the actual total notification count in the special page sidebar
Adding up numbers in the front-end is not enough, because it could
be that not all pages are listed (it's a top 10). So get the
total count from the backend.

Change-Id: Ibbc76691ef88333b92132a514fdba3cde3797e10
2016-06-22 17:11:34 +01:00
Moriel Schottlender 820d2b0fa7 Add a cross-wiki sidebar to the Special:Notifications page
Add a sidebar with cross-wiki sources and pages of unread notifications.
The filter allows the user to fetch notifications from a foreign source
and specific pages if those exist.

Bug: T129366
Change-Id: I57d827a47f80274d75364c2099a9624049a26834
2016-06-21 14:49:42 -07:00