Page MenuHomePhabricator

WS Export: allow wikis to specify which export links are shown
Open, Needs TriagePublic


As a Wikisource user, I want the download links in the sidebar to be customizable, so each wiki can have choose the UX that best suits their user's needs.

Background: In the process of migrating the WSExport gadget to the Wikisource extension, we received the following comment in T256392#6753267: "do you consider selecting (configuring) a set of formats (links) for a given wiki?" In other words, not all Wikisource communities want the same EPUB, PDF, and MOBI export links, so the list should be customizable on-wiki.

Acceptance Criteria:

  • Make the download sidebar links customizable in Wikisource be customizable

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
ifried set the point value for this task to 3.Feb 2 2021, 12:49 AM
ifried moved this task from To Be Estimated/Discussed to Estimated on the Community-Tech board.
ifried moved this task from Estimated to Kanban-2020-21-Q3 on the Community-Tech board.
ifried removed the point value for this task.Feb 2 2021, 12:55 AM

We talked about this today in the CommTech engineering meeting, and there are a few outstanding questions.

If the list of exports in the sidebar is changed, it seems likely that the list in the download button should be as well. Is that correct? Those ones each have a custom icon image, so other formats would need to have one too (e.g. TXT, ODT, or HTML).

To handle the customization, one flexible way would be adding a new interface message, e.g. MediaWiki:Wikisource.json, which could store both the format and the icon, e.g.:

    "wsexportLinks": [
            "format": "TXT",
            "icon": "txt-icon.svg",
            "linkText": "Download TXT",
            "toolTip": "Download a text version of this work"

But maybe it'd be better to have the extension handle the messages and icons? Then the on-wiki config could just be a text list e.g. MediaWiki:WS_Export_sidebar:


The latter would be simpler for users, but we need to provide icons for the other formats. Valid formats are: "epub", "htmlz", "mobi", "pdf", "rtf", and "txt".