Page MenuHomePhabricator

Allow CelerityResourceResponse to hold resources from multiple maps
ClosedPublic

Authored by epriestley on Jan 1 2014, 4:37 PM.
Tags
None
Referenced Files
F13286918: D7876.diff
Tue, Jun 4, 7:53 AM
F13273879: D7876.diff
Fri, May 31, 2:54 AM
F13259691: D7876.diff
Sun, May 26, 10:58 PM
F13255426: D7876.id.diff
Sat, May 25, 5:01 AM
F13246382: D7876.id17818.diff
Thu, May 23, 9:50 AM
F13242786: D7876.diff
Thu, May 23, 3:06 AM
F13226744: D7876.id.diff
Sun, May 19, 11:05 PM
F13225564: D7876.diff
Sun, May 19, 3:51 PM
Subscribers

Details

Summary

Ref T4222. Currently, CelerityResourceResponse holds response resources in flat maps. Instead, specify which map resources appear in.

Also, provide requireResource() and initBehavior() APIs on the Controller and View base classes. These provide a cleaner abstraction over require_celerity_resource() and Javelin::initBehavior(), but are otherwise the same. Move a few callsites over.

Test Plan
  • Reloaded pages.
  • Browsed around Differential.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I can help with the require_celerity_resource => requireResource() and Javelin::initBehavior() => initBehavior() if you like.

I don't think it's hugely important, I mostly wanted to just put enough of them in to make sure it works. But feel free to run with it if you're feeling like grinding some stuff out. The only gotcha is to make sure the callsite is in a View or Controller before converting it, but 95% of them should be (some cases like Remarkup rules or Phame templates might not be).