Closed ronaldbarendse closed 4 years ago
Issue https://github.com/umbraco/Umbraco-CMS/issues/8721 is a great example why the built-in/shipped by default views are a bad idea. Everyone upgrading to Umbraco 8.7 must ensure the updated grid view is overwritten (after PR https://github.com/umbraco/Umbraco-CMS/pull/8735 is merged), otherwise single column Bootstrap 3 grids will not work correctly.
Just to reply to your comment:
Everyone upgrading to Umbraco 8.7 must ensure the updated grid view is overwritten (after PR #8735 is merged), otherwise single column Bootstrap 3 grids will not work correctly.
I don't really see this as a problem, we've made fixes to these things before and there are ways to customize these views without touching the ones we ship with.
Anyway, regarding the rest of the issue you raised, I have sent it to the team, they're deciding what they want to do with it.
@nul800sebastiaan I've created 2 PRs to both improve the rendering of Block List items and fix the above issues: #8840 and #8841.
IMHO at least #8840 should be merged before the general release of Umbraco 8.7, as it would otherwise case a breaking-change and/or introduce multiple ways to render the list (that also both needs documentation)! Including #8841 would make it easier to write the Block List item partial views, so not having to learn and document the verbose ways of casting content/settings would also save a lot of time (both for implementing developers and the Documentation team).
This issue shouldn't be closed (yet), as PR https://github.com/umbraco/Umbraco-CMS/pull/8840 actually removes the BlockListTemplateExtensions
and the default view/template, but that's currently not merged.
Simple jQuery fix:
$(".umb-block-list > div").unwrap();
PR https://github.com/umbraco/Umbraco-CMS/pull/8273 added the new Block List editor including an extension class
BlockListTemplateExtensions
and a default view/template/Views/Partials/BlockList/Default.cshtml
.In my opinion, these should be removed because there are multiple things wrong with this approach and the implementation:
<div class="umb-block-list">
that doesn't make sense in any frontend framework (or custom styling for that matter);GetBlockListHtml()
methods don't return anIHtmlString
, but the concrete, ASP.NET specificMvcHtmlString
;RenderPartial()
that directly writes to the output stream (and because this editor might contain whole page layouts, this might result in a significant increase in memory usage/object allocations);BlockList/Components/{ContentTypeAlias}
).This also breaks the 'clean canvas' philosophy of Umbraco and there are multiple, better ways to help get people started with this editor:
Html.DropDownList()
);The same arguments apply to the Grid and Forms views: do not pollute client projects with views that aren't used or shouldn't be modified. Lets keep it simple and clean as possible, just like how Nested Content currently is!
Umbraco version
I am seeing this issue on Umbraco version: 8.7RC.