Page MenuHomePhabricator

Integrate common CSS into the Page Content Service
Closed, ResolvedPublic

Description

I couldn't find an existing task for this but feel free to close as a duplicate if there is one (or adjust the parent task if that's incorrect).

One of RI's Q3 2017-18 goals is to: "Integrate common CSS into the Page Content Service." This is a task to define exactly what this should look like, so we can start building.

Open questions

  • Who are the intended consumers of this endpoint?
    • Should it be mobile-specific or general?
    • Is it intended primarily for consumption by WMF clients, or for general use?
  • Should this endpoint serve page-specific CSS, or only the common CSS currently needed for all Parsoid pages, such as the apps are bundling now?
  • How frequently do we envision clients requesting this for updates?
    • Note: we'll need to investigate what cache-control headers are set on the response by default and how much leeway we have on these.

Event Timeline

Remember also upcoming changes due to deployment of TemplateStyles

Change 417465 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Initial CSS endpoint groundwork

https://gerrit.wikimedia.org/r/417465

Hey @TheDJ, we're definitely looking forward to TemplateStyles! This endpoint (or its successor) will be working up to providing page-specific styles in future iterations; for now, to break ground on this work, we're just getting the existing app style bundle(s) behind an endpoint so they can be updated quickly without requiring an app release; then we can avoid situations like T185427, or deal with them much more quickly, in the future.

Change 417971 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] CSS: Update routes for consolidated style modules

https://gerrit.wikimedia.org/r/417971

TemplateStyles embeds style tags in the parsed HTML (the feedback from the Performance team was that that will probably have the best perceived performance) so not really relevant for this service. Extensions which generate content and style it via ResourceLoader CSS are going to be more problematic.

Change 417465 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Initial CSS endpoint groundwork

https://gerrit.wikimedia.org/r/417465

Change 419477 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] CSS: Add mobile.app.parsoid to base styles

https://gerrit.wikimedia.org/r/419477

Change 417971 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] CSS: Update routes for consolidated style modules

https://gerrit.wikimedia.org/r/417971

Change 420375 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/extensions/MobileApp@master] Remove enwiki.less

https://gerrit.wikimedia.org/r/420375

Change 420764 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Add /mobile/app/bundle endpoint for legacy app bundles

https://gerrit.wikimedia.org/r/420764

Change 420844 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/extensions/MobileApp@master] Remove custom external link counter CSS

https://gerrit.wikimedia.org/r/420844

Change 420847 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[apps/android/wikipedia@master] Update make-css-assets and bundled HTML/CSS

https://gerrit.wikimedia.org/r/420847

Change 420904 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] CSS: Update base styles for bundling

https://gerrit.wikimedia.org/r/420904

Change 420844 merged by jenkins-bot:
[mediawiki/extensions/MobileApp@master] Remove custom external link counter CSS

https://gerrit.wikimedia.org/r/420844

Change 420847 merged by jenkins-bot:
[apps/android/wikipedia@master] Update make-css-assets and bundled HTML/CSS

https://gerrit.wikimedia.org/r/420847

Change 420764 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Add /mobile/app/bundle endpoint for legacy app bundles

https://gerrit.wikimedia.org/r/420764

Change 421613 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] CSS: Set max-age and s-maxage to 604800

https://gerrit.wikimedia.org/r/421613

Change 421613 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] CSS: Set max-age and s-maxage to 604800

https://gerrit.wikimedia.org/r/421613

Change 422053 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[apps/android/wikipedia@master] Update handling of mobile site CSS

https://gerrit.wikimedia.org/r/422053

Change 422341 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] CSS: Add /site and /bundle endpoints to spec.yaml

https://gerrit.wikimedia.org/r/422341

Change 422405 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] CSS: Drop max-age and s-maxage to one day

https://gerrit.wikimedia.org/r/422405

Change 422405 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] CSS: Drop max-age and s-maxage to one day

https://gerrit.wikimedia.org/r/422405

Change 422341 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] CSS: Add /site and /bundle endpoints to spec.yaml

https://gerrit.wikimedia.org/r/422341

Change 419477 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] CSS: Add mobile.app.parsoid to base styles

https://gerrit.wikimedia.org/r/419477

Change 420904 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] CSS: Update base styles for bundling

https://gerrit.wikimedia.org/r/420904

Change 420375 merged by jenkins-bot:
[mediawiki/extensions/MobileApp@master] Remove enwiki.less

https://gerrit.wikimedia.org/r/420375

Change 427161 had a related patch set uploaded (by BearND; owner: BearND):
[mediawiki/services/mobileapps@master] Sort Resource Loader modules alphabetically

https://gerrit.wikimedia.org/r/427161

Change 427161 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Sort Resource Loader modules alphabetically

https://gerrit.wikimedia.org/r/427161

Change 422053 abandoned by Mholloway:
Update handling of mobile site CSS

Reason:
see Ib7bbbc79ddc626a7dceb81229f0a482092ad243f

https://gerrit.wikimedia.org/r/422053