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

V12/block grid independence #539

Merged
merged 2 commits into from
Sep 12, 2023
Merged

V12/block grid independence #539

merged 2 commits into from
Sep 12, 2023

Conversation

KevinJump
Copy link
Owner

Investigating: #538

Change how we serialize information back info umbraco for block lists.

note: The current way "works" but deploy doesn't like it (do we cares what deploy likes 😉 )

current we serialize the Json in and out as Json all the way down a blocklist. This makes it look nice, and it's easier to track changes, and source code commits, and Umbraco works with this being stuck back into the db.

but technically, block list child values are escaped Json in the DB. this is probibly more efficient 😛 - but it makes for hard to decipher text.

This update now puts the values into the DB in their ugly form.
but it forces the uSync file format to be nice Json, so we keep our nice diff/source control.

The main thing here is separating Blocklist a bit more from the way Nested Content does things, I was going to completely separate it, but in reality, two new abstract methods GetImportProperty and GetExportProperty are enough as they give us the granular control over what we do with a value once it's been mapped.

@KevinJump
Copy link
Owner Author

As the changes are in theory only to how block lists serializer (we have moved the based import and export into methods so we can override them).

that should mean no changes to other stuff, but i have been burnt before with this - so need to do some checks make sure

  • all then properties still get set,
  • they still render on the front end
  • the back end still loads them all up

@KevinJump KevinJump marked this pull request as ready for review September 12, 2023 14:18
@KevinJump KevinJump merged commit 6f7c587 into v12/main Sep 12, 2023
1 check passed
@KevinJump KevinJump deleted the v12/blockgrid-independance branch September 12, 2023 14:18
KevinJump added a commit that referenced this pull request Sep 22, 2023
* BlockLists, not escaping JSON in their own properties.

* Format nicely on the way out (mangle it on the way in)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant