Page MenuHomePhabricator

Explore generalising code on wikipedia.org so it can be easily applied to other portals
Closed, ResolvedPublic

Description

It would be good for us to, at some point, see if we can generalise the new code and widgets used on wikipedia.org so they can be more easily applied to the other portals. This task is to track that.

For the background here, see the email (archived) written by @TheDJ on wikitech-l where he suggested this.

Event Timeline

debt triaged this task as Low priority.Jun 14 2016, 8:45 PM
debt moved this task from needs triage to enhancements on the Discovery-Portal-Backlog board.
debt subscribed.

Adding this ticket number T125725, as it's associated with this task (in very general terms)

debt raised the priority of this task from Low to Medium.Jul 15 2016, 11:39 PM

We had a brainstorming meeting on how we could break up two sections of the portal page into easily packaged and deployable sections of code that could be re-used on other pages/portals.

Here's the details we discussed:

Interactive Search box

  • Has look and feel: colors, magnifying glass, in-list images, typeahead and search suggestions, de-dupe results, language selector, etc. (all client-side)
  • Can set a static (default) language
  • Would be nice to have a way to easily leave or comment out the language selector
  • pull it into our portal repo so we could use it, but master would be in its own repo
  • search code *might* need lang selector, but lang selector needs the search code (our lang selector is very tied to this usage)
  • So probably include the lang selector in this new search box repo
  • Tied to mediawiki search API
  • Currently hard-coded to wikipedia, but that would be easy to extract as a variable/config option/parameter

conclusion:

  • create one main package: colors, magnifying glass, in-list images, typeahead and search suggestions, de-dupe results, etc and have the language selector defaulted to 'off' but easily turned on (and documented on how)

Footer (look and format)

  • Offer the opportunity to standardize the logos, size, placement, WMF descriptive info, new WMF logo, licensing links
  • developers can use their own descriptive text (or ours)
  • Make it its own repo?
  • On wiki, it's a template
  • Repo containing just assets? (images, strings)?
  • Technically the strings are already on translate wiki
  • Translations do actually get +2'd and merged into the portal repo
  • Could have lua script that merges standard footer html template with current translations
  • Could we automatically update this repo based on latest translations?
  • Last process would still be manual to get it into a wiki
  • Would it be easier to just have our portal repo as the source of truth, rather than a separate repo that we would have to pull from?
  • We could create special templates that render only the footer, if people want to use it
  • Lua can be tricky, but if it's pulling from translate wiki, we wouldn't have to update the git repo
  • Could pull HTML from our repo, strings from translate wiki. Would be most up-to-date

conclusion:

  • Existing portal repo could be the single source of truth. Offer scripts to make it available on wikis