-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Packaging: Adding missing configuration fields for property editors #20969
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
base: main
Are you sure you want to change the base?
Packaging: Adding missing configuration fields for property editors #20969
Conversation
|
@NillasKA - as we discussed on Friday with @nielslyngsoe and others, we should see if we can find a different approach here. Going this way means we need to ensure that every configuration elements created for a data type is known on the server, which isn't the model we've adopted so far in 14+. Now we allow the front-end to register it's own configuration values for data types, that purely have a presentation concern. And the data type configuration models known on the server are only those needed on the server, e.g. for server-side validation. We could in theory do what you've started in this PR, and just make sure we do have all the core ones known on the server. But it's a maintenance burden to maintain, and we can't be sure property editors from packages will adhere to this. I've had a look and I think we can deal with this if we work with the I've looked at amending this in And defining this private method: With that in place I've then:
So I think this is probably the most fruitful approach to take here. When you are back next week, please could you see if you can try this yourself - maybe test with a few more data types with different configurations - and see if you can see any concerns with handling the issue in this way? |
Closing #20801
Description
An issue was raised, that pointed out that when creating and downloading a package from the backoffice. The blocklist data type did not contain any other properties on a block, other than 2 IDs. The missing property mentioned in the issue was the label, however i found that a bunch of other properties were missing as well.
Fix was simpler than i expected, and took some digging to figure out, but turns out we were serializing correctly, but we just did not have all of the properties in the associated models.
I added the missing properties for
BlockListBlockGridSingleBlockandRichTextand refactored some of the code to ensure they each get their needed properties.JSON Of The Needed Properties
I picked up the network requests for each of these blocks, with all properties filled out, to compare and see what blocks were needed. Here are those json snippets. So that you can compare it to the changes in the PR.
BlockList
RichText
BlockGrid
SingleBlock
Package.xml
Heres the XML for the package created using the fix.