Content Blocks for v6 (Umbraco v16+) #485
Closed
leekelleher
started this conversation in
Discussion
Replies: 1 comment
-
|
Update: After reviewing the Copilot code, I felt inspired to re-attempt my idea of reusing Block List's workspace modal with Content Blocks... it took some further effort, but I got there in the end! See commit e232366 for the glorious details! 🚀 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
During the (re)development of Contentment's UI for Umbraco Bellissima (v14+), (see #357 for details), I have attempted several (dozen) times to develop the Content Blocks property-editor each with very little success.
Problems?
There are a couple of perspectives to where the problem could lie.
Firstly, I'm working on this solo; it could be a knowledge gap, or lack of peer collaboration. Who knows!? 🤷
Secondly, the concept of having nested content editors in Bellissima may have become too complicated, with the introduction of multi-tiered workspace contexts and Management API changes to fetching element-types, (each composition is a separate request), building a robust workspace element for Content Blocks is proving difficult (to me). I mean, someone is bound to ask me if it'll support variants or
propertyValuePreset. Of course, it should, but Jésus pleura! 🤦Now, some may say that this should be possible, since the built-in Block Grid/List property-editors can achieve this. Sure. I have looked at ways that I could leverage those components, however there are fundamental differences in the data-structures of the property-editors, namely that Content Blocks only supports the "content" part, with no "settings" part, and doesn't support variants. I tried and tried and tried to shoehorn it in, but nope! 😖
I got as far as building up the element-type (including compositions) and rendering the properties, all editable and saveable. But I couldn't get tabs or groups to render, and if a property-editor needs to consume a context, then it goes boom! 💥
Resolution?
Okay, so how to resolve this?
Ideally, it would be good to build a reusable component that would take an element-type's GUID and property-data (key/value pairs) and render the UI for a content workspace. Whether this is something that is provided in core, or I develop it, either way it would be complicated and still take time to develop properly.
As of today, this situation has held up Contentment v6 from entering a beta phase. So I've reached the conclusion to proceed without it.
Upgrades?
When upgrading Contentment from v4/v5 (Umbraco v13) to v6 (Umbraco v16+), what will happen to you Content Blocks data?
Currently, I have put a read-only property-editor in place, that will expose the underlying JSON data for the Content Blocks property.
What you do with this is entirely up to you. One suggestion could be to use the uSync Migrations project convert the property-data from Content Blocks to Block List structure, (I don't know if a converter for that exists yet, but should be doable).
Apologies that I don't have a better solution in place for Contentment v6 beta release.
Beta Was this translation helpful? Give feedback.
All reactions