Skip to content

Empty Regions#134

Open
lucasconstantino wants to merge 18 commits intorecidive:masterfrom
TallerWebSolutions:fs/empty-regions
Open

Empty Regions#134
lucasconstantino wants to merge 18 commits intorecidive:masterfrom
TallerWebSolutions:fs/empty-regions

Conversation

@lucasconstantino
Copy link
Contributor

As for today, when layout is parsing recursively through rows and columns it doesn't mind printing markup for regions that don't have content. This pull request changes that by recursively identifying empty regions (row/columns). It also introduces a region attribute called alwaysVisible that when set to true will cause a region wrapper to be output even when it has no content; mostly useful in cases when the extra markup is required for styling purposes.

This pull request relies on the code introduced by the #133 pull-request, so it should only be merged if the other one has already being merged.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should call this "alwaysRender" or something else since this doesn't guarantee the item will be displayed/visible on the page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also considered changing this name, but was not sure what could fit best here. I think your suggestion could be more meaningful. We have to remember, though, that this option will only be used by a user that has actually looked for it in the future-to-be documentation of Choko.

So, should I change it to alwaysRender then?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

I think we can go ahead and add boolean fields "alwaysRender" to row and column type (that are the actual regions)?

At some point, I believe we'll be able to use those type metadata to create self-updatable documentation for everything.

@recidive
Copy link
Owner

Hello @lucasconstantino, this looks like a good improvement. I've added some inline comments.

I've seen this depends on the "responseAlter" patch and its changes are bundled here too. I'll leave comments about that to the other thread.

@lucasconstantino
Copy link
Contributor Author

Once you approve the other pull-request, it is probable that the changes present in this pull-request will reduce to the actual difference - not sure though.

@recidive
Copy link
Owner

You might be right. But there were changes on the other pull request, that will require some adjustments here.

Anyway, we are very close to integrate both :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a period on this comment.

@recidive
Copy link
Owner

Hello Lucas, please take a look at my inline comments, this is almost ready to go just needs a few tweaks, but it depends on #133.

@recidive
Copy link
Owner

recidive commented Sep 2, 2014

Needs to be re-rolled and also some RouteController related code need to be removed. I believe we will need a rebase and a push to a clean branch here. Maybe a rebase and a squash.

recidive and others added 3 commits July 30, 2015 14:17
…ons to alter the response before it's sent to the client. Fixes recidive#133.

Conflicts:
	applications/default/extensions/route/lib/route-controller.js
Conflicts:
	applications/default/extensions/route/lib/route-controller.js
	applications/default/extensions/route/route.js
Conflicts:
	applications/default/extensions/layout/public/templates/column.html
	applications/default/extensions/layout/public/templates/layout.html
	applications/default/extensions/layout/public/templates/row.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants