umco / umbraco-nested-content

Nested Content for Umbraco 7.1 to 7.6
https://our.umbraco.org/projects/backoffice-extensions/nested-content
MIT License
45 stars 35 forks source link

Issues with Grid Data Type inside of Nested Content #109

Closed SudoCat closed 7 years ago

SudoCat commented 7 years ago

When using a Grid data type within a Nested Content item, some things don't seem to quite work, in particular collapsing/expanding the item containing the grid.

Upon first loading the page and opening the element containing the grid, everything loads up fine.

image

When opening it, you get the following XHR requests: image

However if you then collapse the item and then reopen it, all of the styling gets thrown out, you lose the titles telling you what grid data type each item is and the RTEs stop working. Upon moving an RTE, it does re-init TinyMCE, however nothing else is fixed.

image

XHR Request for second open: image

From this point on, whenever you try to close the item, it will successfully close and open, but the styling will be broken and everytime you close it the following errors appear in the console:

image

If there's anything more useful I can give you, please let me know. I understand this may not be typical/expected usage of either Nested Content or the Umbraco Grid, however it would be a massive help for achieving a lot of the designs we're building at the moment, while also providing a much clearer, easier editing experience for our clients.

Thanks a lot for all your work on Nested Content and the many other Umbraco Plugins of yours we use, and apologies for my useless Friday afternoon brain!

mattbrailsford commented 7 years ago

You are right that this is not expected use case for nested content and as such, it's quite an edge case. Best I can suggest is for you to tell us what you are trying to achieve with this setup such that we can suggest a better alternative as this approach isn't really something I would recommend (or if you really must, it's not something we'll be able to support).

SudoCat commented 7 years ago

Thanks for the response. We're trying to create an incredibly versatile editing experience, allowing our clients a finer level of control over the layout of each page. The pages are composed out of multiple sections, often clearly defined as full width rows. Each of these sections would have it's own layout, and some specific settings.

Some of the sections would be basic grid content sections, allowing you to create versatile rich content, with far more control than a typical RTE. Other sections are more "Predefined", such as adding in a list of other document types, e.g. news or a video gallery, or they may be a large widget area, with a background image and a call to action of some type. These in turn may also have grid editors to again allow complicated layouts within these sections.

I had created an implementation of a similar idea solely using grids on a previous project, however it became very limiting - the Umbraco Grid isn't really designed to layout whole pages of content, and the UX became quite unintuitive with adding all these different sections, especially balancing out whitespace and handling the mobile versions.

That led me to creating the version using the nested content with grids, which has proven to be incredibly powerful, while still providing a clean and intuitive editing UX. This is the only thing I've found stopping me from using this technique.

leekelleher commented 7 years ago

Closing this ticket, further details on https://github.com/umco/umbraco-nested-content/pull/116#issuecomment-324621020