Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Region Sets should share a common API with the new tabs #44

whistlerbrk opened this Issue Oct 2, 2009 · 3 comments


None yet
2 participants

Since the navigation api is different, I believe the region sets implementation should be updated to share a similar API.

Additionally, I've noticed that when a region set is overridden the original region set still renders even if it is not displayed. That seems inefficient.

Finally, as I've brought up on the list, two extensions modifying region sets can create interesting load order problems. Is there a way we can adjust region sets (not my hack/patch) to allow referenced but unloaded regions to be created before their dependents are inserted. Problem detailed here:

admin.something.add "foo", :after => "bar"

if "bar" doesn't exist and is created by another extension, this will insert "foo" at the beginning of the region instead of waiting for "bar" to be created.


saturnflyer commented Oct 2, 2009

What about just creating the empty region "bar" and changing add to check if it is empty, and if so, replace it with the one being added (else, error)?

Which is what the patch I sent out essentially does, but it felt dirty.. I can / will clean that up.

But as a whole, updating the region sets would be nice.

This is something else I've run into:


  • @Weights = []

  • render_region :extensions_model_columns do |columns|

  • @weights.map{|x| x*(100/@weights.sum)}.each do |width|
    %col{:width => "#{width}%"}



- if @my_models.any?
  ... display ...
- else
  %tr{:class => "empty"}
    %td.note{:colspan => admin.my_extension.index.length} No Records!


Ideally an internal variable could keep track of the 'weights' so there is a known pattern for extensions to cleanly add a column to a table w/o screwing up table sizes. The implementation above has worked for me, but I know it breaks down (as described above) when a region set is overridden (as it renders regardless and will add weight to @Weights)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment