Page MenuHomePhabricator

mobile-html: JavaScript abstraction layer
Closed, ResolvedPublic

Description

Build an abstraction layer that lives behind a pcs global variable on mobile-html pages for clients to interact with. It should hide pagelib and any other implementation details from the clients.

Versioning
pcs.v1. etc.

Endpoints
Appearance:
setup(theme, areImagesDimmed, textSizeAdjustmentPercentage, margins, areTablesCollapsed, callback) -Initial setup endpoint that combines multiple calls that usually happen on initial article load T218049
setTheme(theme) - set reading theme
setDimImages(dimImages) - set whether or not images are dimmed
setMargins(margins) - set margins
setTextSizeAdjustment(adjustmentPercentage) - set text size adjustment
setAreTablesCollapsed(areTablesCollapsed) - set whether or not tables are collapsed

Interactions:
setInteractionHandler(interactionHandler) T219998

Content:
getSectionOffsets(...) T219909

See child tickets for details. Naming should match conventions defined here instead of naming conventions proposed in the child tickets. eg pcs.v1.setTheme not wmf.setTheme

Event Timeline

JoeWalsh renamed this task from mobile-html JavaScript abstraction layer to mobile-html: JavaScript abstraction layer.May 2 2019, 3:02 PM