Jumoo / uSyncMigrations

Rough and ready migration code.
Mozilla Public License 2.0
44 stars 57 forks source link

feat: block grid settings #232

Closed ryan-woodruff closed 10 months ago

ryan-woodruff commented 10 months ago

Builds off of changes by @bielu (thank you!)

Adds in some rough functionality to convert config and styles from the legacy grid to the BlockGrid & acts as a start for settings conversion. This implementation only handles the config/styles in the Layout layer (row) but perhaps similar implementations can be adopted for other layers.

It does this by:

Content Types

Reading config/styles & merging them (they have the same JSON data structure, afaik these are split up in the legacy grid for permissions based settings). Create datatypes called BlockGridSettings_ for each grid. Add the above block grid settings to each of the layouts for that grid. (It is safe to assume that all the layouts can have these as that is the behaviour of the legacy grid). Nothing is done with modifier & prevalues as this is out of scope for me personally, but should definitely be included in a future update

Content Converts content by simply porting the string over or using a process defined by anything that implements IGridSettingsMigrator. This is tied to each "datatype" (view) using the ViewKey property. The process for the conversion is defined in ConvertContentString. I would have liked to make this more customisable, but this seems to do the job for now. The NewDataTypeAlias should already be created in Umbraco but perhaps a way to do this automatically based off of a description in the IGridSettingsMigrator could be done to make this more programmatic?

Some more default GridViewPropertyMigrators will be needed (they may need more customisable interfaces?) for the following:

radiobuttonlist mediapicker imagepicker booleantreepicker treesource multivalues

umbrabot commented 9 months ago

Hi there @ryan-woodruff!

First of all: A big #H5YR for making an Umbraco related contribution during Hacktoberfest! We are very thankful for the huge amount of PRs submitted, and all the amazing work you've been doing πŸ₯‡

Due to the amazing work you and others in the community have been doing, we've had a bit of a hard time keeping up. πŸ˜… While all of the PRs for Hacktoberfest might not have been merged yet, you still qualify for receiving some Umbraco swag, congratulations! πŸŽ‰

In the spirit of Hacktoberfest we've prepared some exclusive Umbraco swag for all our contributors - including you!

As an alternative choice this year, you can opt-out of receiving anything and ask us to help improve the planet instead by planting a tree on your behalf. 🌳

Receive your swag or plant a tree! πŸ‘ˆ Please follow this link to fill out and submit the form, before December 15th, 2022, 23:59:00 UTC.

Following this date we'll be sending out all the swag, but please note that it might not reach your doorstep for a few months, so please bear with us and be patient πŸ™

πŸ“’ We have just published a summary of all the activity throughout this year's Umbraco Hacktoberfest.

The only thing left to say is thank you so much for participating in Hacktoberfest! We really appreciate the help!

Kind regards, The various Umbraco teams.