Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make layouts work in global areas; make layouts display sensibly in stacks page when you go to them without grid. #1227

Open
aembler opened this issue Sep 30, 2014 · 16 comments
Labels
Affects:Content Creators Affects those who use the UI to create or edit content. Enhancement:Level Of Effort:3 Enhancements requiring a significant level of effort. Enhancement:Quality of Life:3 Enhancements that will have a significant improvement in quality of life. Product Areas:In-Page Editing Product Areas:Theming Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Enhancement A need for something new.

Comments

@aembler
Copy link
Member

aembler commented Sep 30, 2014

No description provided.

@aembler aembler self-assigned this Sep 30, 2014
@aembler aembler added this to the 5.7.1 milestone Sep 30, 2014
@iLPdev
Copy link

iLPdev commented Oct 5, 2014

so, no use of columns in global areas from within frontend editor?

@aembler aembler changed the title enableGridcontainer should log an error if used in global area; make sure layouts don't show up as option in global are Make layouts work in global areas; make layouts display sensibly in stacks page when you go to them without grid. Oct 9, 2014
@TomS-
Copy link

TomS- commented Oct 13, 2014

+1 This has broken one of my sites because I can't remove the columns. Is there a work around for removing them?

@aembler
Copy link
Member Author

aembler commented Oct 16, 2014

This is much more complicated than anticipated. Bumping this til later.

@aembler aembler modified the milestones: 5.7.2, 5.7.1 Oct 16, 2014
@aembler
Copy link
Member Author

aembler commented Oct 16, 2014

@TomS- I would try going into Dashboard > Stacks, clicking on the dropdown menu at the top and selecting "Global Areas", finding the global area with the layout in it. Delete the global area. Then go back to the site and the global area should be clear (and able to take new content.)

@iLPdev
Copy link

iLPdev commented Oct 17, 2014

I feel like this is a related symptom that I keep running into: Clean install of 5.7.04 on wamp, elemental-based theme, no other modifications. I edit site title global area block to add an image, and change the text. i save, and then am immediately no longer able to edit margins etc. just a blue box results when a button is clicked on the toolbar. here is an image of the result: http://i.imgur.com/v1EPfvj.jpg

entering into pages -> stacks -> global alrea -> header site title area --> delete block from global area has no effect on the disabled toolbar

i find repeatedly that the only solution is to reinstall, and that this only occurs with global areas. cannot maintain stable site in present state. will attempt to reproduce with clean install on elemental theme this weekend (since I have to reinstall anyway now). if this is true, it seems like a critical problem that i cannot understand putting on the back burner for 5.7.2.

globalareacontainerproblem

*** UPDATE ***

Disconfirmed. The disabled "Edit Design Style" toolbar for Global Area blocks (with or without grids enabled) was the result of loading bootstrap.min.js. My bad, but perhaps in some way this can rule out something else regarding this global area problem.

@TomS-
Copy link

TomS- commented Oct 17, 2014

I had this trouble. I believe when you have $a->enableGrid active in a global area the image block will render with a container class and a row spanning 12 columns. Strange I know. The image block just render the image. Strangely this only happens in a Global Area that has grids enabled.

@iLPdev
Copy link

iLPdev commented Oct 18, 2014

Disconfirmed by above comment of 10/16. The disabled "Edit Design Style" toolbar for Global Area blocks (with or without grids enabled) persisted in 5.7.1, but was the result of loading bootstrap.min.js rather than modifying the block.

My bad, but perhaps in some way this can rule out something else regarding this global area problem.

@aembler aembler modified the milestones: Feature Release, Future Mar 30, 2015
@pmcoz
Copy link

pmcoz commented Jun 2, 2016

I'd like to be able to use enableGrid() in global areas. Without this, creating customised headers requires hard-coding the layout, which limits flexibility and ease of editing.

@ob7
Copy link
Contributor

ob7 commented Sep 20, 2016

Whats the reason for disabling layouts in global areas in the first place? What issues did it cause? What needs to change in the core to support layouts in global areas?

@aembler
Copy link
Member Author

aembler commented Sep 22, 2016

It's mostly because you can also edit global area content through the Dashboard, and it's anybody's guess how the layout breakpoints and such might render within the Dashboard as well as within the site.

@ob7
Copy link
Contributor

ob7 commented Sep 27, 2016

How do you edit global area content from the dashboard??? Having this feature back is going to make theme building a lot more powerful.
EDIT: I see how to do it now, its from Stacks.

So global areas are in essence on-demand stacks? Why is it an issue to display layout breakpoints from within the dashboard? If its only a rendering problem as what you see in the dashboard may not reflect what you see on the front end, why's it matter since only a site admin is going to see it from the dashboard anyways?

If I can get a breakdown on what needs to be done I'd like to help. It make's more sense to get this back in the core than to spend a bunch of time building every type of header possible and then letting the user pick one from a dashboard settings page. If you can point me in the right direction I'd rather spend my time seeing what I can do for this rather than attempting to code some theme feature together that in the end will just be to provide a similar result.

@KorvinSzanto
Copy link
Member

@ob7 that's not a bad point. It might be better to display layouts stacked always in the dashboard since we can never know what it's going to look like.

@aembler
Copy link
Member Author

aembler commented Sep 28, 2016

It's probably simply a matter of removing the hard coded checks for global area in the area menu, which I believe is the only reason the add layout command doesn't show up in global areas.

And then of course seeing what happens at that point ;)

@aembler aembler added Type:Enhancement A need for something new. Status:Available Reviewed issue, it’s real, we’d review a pull request. priority:like to have labels Sep 28, 2016
@ob7
Copy link
Contributor

ob7 commented Sep 28, 2016

There is some issues with just removing the global area check for the area menu. After adding a layout to a global area there's some funky stuff happening, such as blocks in those areas not being saved, not being able to edit blocks in the same area outside the layout, and javascript errors, and once exiting edit mode, area tabs for that global area still show up on hover.....

@ob7
Copy link
Contributor

ob7 commented Sep 28, 2016

enablingGridLayout on global area also causes area tab to disappear after saving a block in that area, without even adding a layout.

@liamhaig
Copy link

liamhaig commented May 9, 2018

Not sure if there's still interest in this; however, I thought I'd report the following:

I noticed that on global areas with enableGridContainer, the container, row, and column are added in concrete/elements/block_header_view.php but not closed in concrete/elements/block_footer_view.php. I imagine this leads to things like the area tab not displaying properly on hover.

My fix in 8.3.2 is to change the conditional on line 19 from
&& $b->getBlockAreaObject()->isGridContainerEnabled()
to
&& $a->isGridContainerEnabled()

I find the container useful when I want to custom style the global area while also having contained blocks.

https://github.com/concrete5/concrete5/blob/develop/concrete/elements/block_footer_view.php

@aembler aembler removed their assignment Oct 28, 2021
@aembler aembler added Enhancement:Level Of Effort:3 Enhancements requiring a significant level of effort. Enhancement:Quality of Life:3 Enhancements that will have a significant improvement in quality of life. labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects:Content Creators Affects those who use the UI to create or edit content. Enhancement:Level Of Effort:3 Enhancements requiring a significant level of effort. Enhancement:Quality of Life:3 Enhancements that will have a significant improvement in quality of life. Product Areas:In-Page Editing Product Areas:Theming Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Enhancement A need for something new.
Projects
None yet
Development

No branches or pull requests

7 participants