Page MenuHomePhabricator

Update readme with an overview of supported inputs and outputs
Open, MediumPublic

Description

Add notes about where and how styles (extensions, app overides, enwiki.less, ...), HTML (MediaWiki, Parsoid, Content Service, ...), and JavaScript (no cascading?) cascade from Corey's doc. Corey's doc has a great overview but the nitty gritty detail of this info should be referenced somewhere in the readme.

Some example CSS inputs:

Some example HTML inputs:

Some notes on the purpose of the library

A library of generic JavaScript and CSS used by both the Android and iOS Wikipedia apps

We're calling the project "wikimedia-page-library" (formerly applib). This is part of a larger effort towards shared page rendering code between apps and web. The reasons for its existence are:

Reduce bugs and maintenance
The consolidation of duplicate code will greatly help to eliminate bugs and each change will propagate to both platforms.

Share features and talent
New features are paid for once by a cross-team talent pool that can focus on a single implementation that provides a consistent experience across both platforms.

Improve stability
Testing page content (or "anything in the browser / WebView") for Android and iOS in a scalable way has been particularly challenging, flaky, and error prone. The library will initially provide numerous DOM state unit tests for transforms and in the long term provide integration tests for transforms and visual regression integration tests at the component level.

Make changes easier and safer
In general, changes to common code will not require expertise in Vagrant, Android, or iOS to make and separating platform concerns will keep effects predictable and tests performant. Additionally, the current cascade of style inheritance across multiple projects will be streamlined and made more sensible.

Update page presentation independently of app updates (pending evaluation)
The library is versioned independently of the apps and may eventually be provided remotely so fixes and improvements could be published continuously on the fly.