WikiActivity

<includeonly>
WikiActivity is a script that reimplements the legacy Special:WikiActivity page into the Unified Community Platform with a modernized look.
== Usage ==
=== Configurations ===
The configuration object for the WikiActivity script is window.rwaOptions. It is important for configurations to be added before importing the script to your wiki. There are a total of 11 configurable properties at this time. The following properties are:
; limit
: Accepts: {number}
: Default: 50
: The maximum number of entries to display on the activity feed.
; namespaces
: Accepts: Array<number>
: Default: [ 0, 1 ,2, 3, 4, 5, 6, 7, 110, 111, 500, 501, 828, 829 ]
: An array of namespaces to show on the activity feed.
; autoInit
: Accepts: {boolean}
: Default: true
: Determines whether the script should be initialized on page load.
; themeName
: Accepts: {string}
: Default: "main"
: Sets the theme for the activity feed.
; showBotEdits
: Accepts: {boolean}
: Default: false
: Determines whether bot edits should be displayed.
; loadModule (TODO)
: Accepts: {boolean}
: Default: false
: Determines whether the activity feed module should be loaded.
; customRendering
: Accepts: {Object}
: Default: { }
: Allows for custom rendering of the activity feed based on the theme.
; headerLink
: Accepts: {boolean}
: Default: false
: Determines whether to revert the RecentChanges link to WikiActivity.Note: This option should always be set to false when used site-wide.
; refresh
: Accepts: {boolean}
: Default: false
: Determines whether the activity feed should automatically refresh.
; refreshDelay
: Accepts: {number}
: Default: 300000
: The amount of time to delay refreshing the activity feed. The default refresh period is 5 minutes.
; timeout (TODO)
: Accepts: {number}
: Default: 10000
: The timeout for loading the activity feed. The default timeout period is 10 seconds.
==== Default configurations ====
window.rwaOptions = {
 limit : 50,
 namespaces : [ 0, 1, 2, 3, 4, 5, 6, 7, 110, 111, 500, 501, 828, 829 ],
 autoInit : true,
 themeName : "main",
 showBotEdits : false,
 loadModule : false,
 customRendering : { },
 headerLink : false,
 refresh : false,
 refreshDelay : 5 * 60 * 1000,
 timeout : 10 * 1000
};
=== Constructors ===
There are three constructors for this script, WAStorage, WikiActivity, and FeedUI. WAStorage is a private constructor, while WikiActivity and FeedUI is public.
==== WAStorage ====
A wrapper for localStorage made specifically for this script in mind, with a few changes, such as storing a key for a specific period of time. This constructor does not contain any params.
==== WikiActivity ====
The primary constructor and controller for WikiActivity. This controller can affect the way its UI displays and how the feed entries appear. It also loads the Wiki Activity link to the toolbar, and if allowed by the script's configuration, converts the RecentChanges link to the WikiAcitivty link.
Primary methods and properties
Properties
Methods
Activity methods and properties
Fallback methods
=== CSS Variables ===
Here are the following CSS variables used for WikiActivity:
; --wa-edit
: Default: #feaf09
; --wa-comment
: Default: #dddddd
; --wa-new
: Default: deepskyblue
; --wa-categorize
: Default: #b76801
; --wa-link__color
: Default: Wiki link theme
=== Installing the script ===
== Changelog ==
; September 6, 2020 (v0.5b)
: Initial version, script created.
; September 9, 2020 (v0.6b)
: Added category previews.
: Added image previews.
: Created a diff button when it is not a new page.
: Made CSS adjustments
; October 8, 2020 (v0.81b)
: Fixed the checker that is supposed to prevent the UI from generating outside the Special:WikiActivity page.
: Made CSS adjustments to be in line with [ FandomizedActivityFeed].
: When outside the wiki activity page, the script simply appends a link to the toolbar.
; October 9, 2020 (v0.81b)
: Made a CSS fix that allowed all images to remain inside the container.
; November 3, 2020 (v0.99b)
: Added a few QoL changes to the activity feed.
: Added support for image and social activity.
: Added an options button to allow for undoing and rolling back changes.
== Reported issues ==
* The script does not seem to be loading for certain wikis. (almost fixed)
*
* Images tend to become missing in certain feed entries.
== Planned features ==
* Integrate existing WikiActivity-related scripts to this script.
* User interface enhancements.
* Possible integration with DiscussionsActivity.
** Image and category previews.
** User interface configurations.
** Breadcrumbs?
* Theming and CSS fixes (halfway done).
* Add more activity types.
* Create another type of activity feed.
* Right rail?
* Activity feed module?