Summary
When viewing a wiki page users can see a feed of content from Wikimedia Space. Users should be able to interact with the feed to be directed to the content on Wikimedia Space. Wiki editors should be able to customize and embed these feeds within wiki content in an easy, familiar manner.
Requirements
Discourse can provide a feed of activity based upon criteria specified by calling the API. This can include lists such as the most recent topics, most active, and recent replies. This extension would allow for user-configurable display of feeds on-wiki from Wikimedia Space.
Most likely by extending MediaWiki with new markup tag (For example, <SpaceFeed>...</SpaceFeed> or parser function.
These feeds fall into the following classifications:
- Topics - a feed of topics
- Latest - newest topics by creation date
- Top - most recently active by a given timeframe
- Posts - Latest posts across topics
- Categories - Latest or top topics in a given category
- Tags - Latest or top topics with a given tag
- Groups - a feed of groups
- A list of available groups
- a list of members within a given public group
Feature
Feeds from Wikimedia Space should display the following information:
- Title of topic
- Title of post
- Categories and tags posts are in
- Group names
- User names
- Date
- Excerpts from the content
Feeds from Wikimedia Space should be configurable upon the following attributes:
- Items restricted to a particular category or tag
- Items restricted to those created by a particular user
- Maximum number of items to list
- Period of time to query (daily, weekly, monthly, etc.)
- An excerpt from the content
- Show or hide user names
- Show or hide the date attribute
Feeds should be dynamic where their content is refreshed automatically. This can be done with an API call on page load or by using the MediaWiki job queue.
Feeds should provide clean HTML and element classes so they can be styled by on-wiki CSS.
Feeds should be programmatic. This is so feeds can be included in templates to be extended by wiki variables.
Changes to feed contents should update the Watchlist for the page where they are embedded.
Examples
Pseudocode
<SpaceFeed>
category = Sri Lanka
count = 5
author = UserName
class = fooClass
…
</SpaceFeed>
or
{{#discourse: latest | category=cat-slug | count=5 | order=ascending }}
Benefit
Affiliate groups that wish to provide a feed of discussions happening in topics related to their work
Event organizers that wish to provide a feed of discussions happening related to the event.
Topic working groups that wish to see a list of recent news related to their area of interest.
Users who wish to share a list of posts they have created or are participating in.
Acceptance Criteria
A MVP is one where an editor can add specific markup to a wiki page, save, and a list of topics would be presented from Wikimedia Space given a time frame and maximum number. This list could be static at the time of save.
A complete, stable extension can do the above as described with compatibility with all major browsers, functionality with javascript disbled, aria compliant, and with support for RTL languages.
Content would be refreshed dynamically. Pages using the extension would not bust the caching of pages.
See also
- https://www.mediawiki.org/wiki/Magic_words
- https://www.mediawiki.org/wiki/Parser_functions
- https://www.mediawiki.org/wiki/Extension:DynamicPageList_(Wikimedia)
- https://www.mediawiki.org/wiki/Extension:RSS
- https://www.mediawiki.org/wiki/Manual:Watchlist#Technical_implementation_details
- https://docs.discourse.org
- https://meta.discourse.org/t/embedding-a-list-of-discourse-topics-in-another-site/125911/1
T185075: A template to show discourse-mediawiki.wmflabs.org feeds)