1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/src/applications
epriestley e4df959064 Use Celerity to version all static resources
Summary:
We don't use versioned URIs for images, so when they change users may get old versions.

This was a particular issue with the recent logo change, which several users reported cache-related issues from.

Instead, use Celerity to manage image URI versions in addition to CSS/JS.

This is complicated, because we need to rewrite image URIs inside of CSS, which means the hash of a CSS file has to be derived from the current image data. Otherwise, when we updated an image the CSS wouldn't update, so we wouldn't be any better off.

So basically we:

  - Find all the "raw" files, and put them into the map.
  - Find all the CSS/JS, perform content-altering transformations on it (i.e., not minification) based on the partial map, and then put it into the map based on transformed hashes.

(If we wanted, we could now do CSS variables or whatever for "free", more or less.)

Test Plan:
  - Regenerated celerity map, browsed site, verified images generated with versioned URIs.
  - Moved "blue" flag image over "green" flag image, regenerated map, verified "green" flag image and the associated CSS changed hashes.
  - Added transformation unit tests; ran unit tests.

Reviewers: btrahan, vrana, jungejason

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1073

Differential Revision: https://secure.phabricator.com/D2146
2012-04-08 10:07:51 -07:00
..
audit Improve Diffusion blame views 2012-04-07 17:24:35 -07:00
auth Minor, see rPc92e37c1b1b17b8c937ef618a6e856499c23cc80 2012-03-26 10:03:32 -07:00
base Customizable MySQL implementation 2012-04-07 10:54:12 -07:00
calendar Add "final" to all Phabricator "Controller" classes 2012-03-09 15:46:25 -08:00
chatlog Add pagers to server clients and client authorizations in OAuth Server GUI 2012-04-04 17:51:16 -07:00
conduit Use assert_instances_of() everywhere but Differential and Diffusion 2012-04-03 14:53:20 -07:00
countdown Add "final" to more classes 2012-03-13 11:18:11 -07:00
daemon Use assert_instances_of() everywhere but Differential and Diffusion 2012-04-03 14:53:20 -07:00
differential Update arcanist documentation to reflect "land", a sane relative commit, and "--auto" 2012-04-07 10:39:51 -07:00
diffusion Improve Diffusion blame views 2012-04-07 17:24:35 -07:00
directory Show user a notice when they view "My Projects" for feed but haven't joined any projects 2012-04-07 17:25:24 -07:00
draft/storage Add "final" to more classes 2012-03-13 11:18:11 -07:00
drydock More Drydock Stuff 2012-03-26 20:54:26 -07:00
feed Use assert_instances_of() everywhere but Differential and Diffusion 2012-04-03 14:53:20 -07:00
files Use Celerity to version all static resources 2012-04-08 10:07:51 -07:00
flag Use assert_instances_of() everywhere but Differential and Diffusion 2012-04-03 14:53:20 -07:00
help/controller Add "final" to all Phabricator "Controller" classes 2012-03-09 15:46:25 -08:00
herald Allow projects to own packages 2012-04-03 16:20:07 -07:00
maniphest Allow Commits to be attached to Tasks using edges 2012-04-04 17:34:25 -07:00
markup Use "~~del~~" remarkup style in Phabricator 2012-03-21 14:01:12 -07:00
metamta Use assert_instances_of() everywhere but Differential and Diffusion 2012-04-03 14:53:20 -07:00
notifications/controller Make Aphlict client somewhat more approachable 2012-03-06 20:14:03 -08:00
oauthserver Add pagers to server clients and client authorizations in OAuth Server GUI 2012-04-04 17:51:16 -07:00
owners Fix differential.createrevision conduit call 2012-04-05 15:28:58 -07:00
paste Kind-of-terrible (?) oncopy handler 2012-03-15 19:04:59 -07:00
people Open editor from stack trace 2012-04-04 18:19:14 -07:00
phid Don't set NULL values in array returned from loadObjects() 2012-04-03 14:46:39 -07:00
phortune For discussion -- Stripe integration 2012-04-04 16:09:29 -07:00
phriction Use assert_instances_of() everywhere but Differential and Diffusion 2012-04-03 14:53:20 -07:00
project Use assert_instances_of() everywhere but Differential and Diffusion 2012-04-03 14:53:20 -07:00
repository The existing Audit code forgot to set authorPHID 2012-04-06 14:16:42 -07:00
search Allow Commits to be attached to Tasks using edges 2012-04-04 17:34:25 -07:00
slowvote Use assert_instances_of() everywhere but Differential and Diffusion 2012-04-03 14:53:20 -07:00
status/base Add "final" to all Phabricator "Controller" classes 2012-03-09 15:46:25 -08:00
typeahead/controller Allow projects to own packages 2012-04-03 16:20:07 -07:00
uiexample Make error views look less awful 2012-04-07 17:25:31 -07:00
xhpastview Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
xhprof Add "final" to all Phabricator "Controller" classes 2012-03-09 15:46:25 -08:00