I think maybe these should be more separate from JX.Title, but seems to work ok. May build new favicons just for messages though. Proof of concept UI.
Details
- Reviewers
epriestley - Commits
- rP1fdb8ba1123b: JX.Favicon for Conpherence
Send message on one browser, see red icon in other browser. Click on menu, count and favicon switch back to normal.
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
In many configurations, direct /rsrc/ URIs don't work (they aren't supposed to in any configuration, but I think older install instructions had users configure them to pass through (?) or apache is special (?), so they may work on some machines, but will not work on all machines). Even if they do work, they don't cache/version correctly and won't be served through a CDN properly.
So any rsrc/ URI needs to be wrapped in celerity_get_resource_uri(). If Celerity doesn't work with .ico, it needs to be made to work (not sure what the failure mode is). This also means that JS can't have a /rsrc/... URI -- you need to pass it from the server via initBehavior(..) by passing a key like messagesURI.
webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js | ||
---|---|---|
48–50 | Does the red favicon get cleared if you read all your messages? |
JX.Title and JX.Favicon should also probably just be one class, too, but we can deal with that later since both probably need a rewrite for Quicksand sooner or later anyway.
What does "barf" mean, exactly? I can probably point you in the right direction, just not sure what you're seeing.
Try this:
- In CelerityResourcesOnDisk->getBinaryFileSuffixes(), add .ico.
- Run bin/celerity map.
- In CelerityResourceController->getSupportedResourceTypes() you may need to add some fiddly magic too.
resource now gets translated, but following link 404's.... may be issue with re-write rules?
D16737 seems to fix things for me locally.
One possible issue is that you should probably celerity_generate_resource_uri('rsrc/favicons/favicon.ico') to get a URI for the default icon, not just /favicon.ico. Not sure if that's really a problem, but Celerity generally only handles stuff in rsrc/.
Working locally now?
src/applications/celerity/resources/CelerityResourcesOnDisk.php | ||
---|---|---|
43 ↗ | (On Diff #40306) | Duplicate, now? |