erropix / hydrogen-pack

A dedicated repository to track issues and feature requests for Hydrogen Pack
https://www.erropix.com/products/hydrogen-pack/
6 stars 0 forks source link

Gutenberg design and data migration #44

Open wpsumo opened 4 years ago

wpsumo commented 4 years ago

Describe the feature you'd like to see included in Oxygen. Linking of newly created blocks to places where old blocks were used, as well as the migration of the data between blocks.

What are the use cases for this feature? When migrating data from Gutenberg block to Gutenberg block. To be able to change design and migrate the data into the new blocks. Not limiting to only restyle the Gutenberg block with it's current element.

Though about a feature user is familiar with using ACF and custom fields. Where I can assign each elements custom field name. Similar to how ACF blocks works. That way it's easier to migrate blocks and it's data.

If no field is specified Use random number conventions to no break ease for user that do not care about this.

If updating field names:

  1. Changing names
  2. Saved in wp admin of the gutenberg blocks updates all fields assigned to this block with the new field name.

One block to a new block

  1. Create a new block
  2. Assign field names for each registered element
  3. Go to the specific post update the assigned field names.

Concept that would work similar to ACF and it's custom fields setup to make the workflow easier for migration and changes.

That way we would control design in the builder and the maintenance and technicalities in the wp admin view on the Gutenberg block.

FIELDS

Headline: my_gutenberg_headline_x1

Headline: my_gutenberg_headline_x2

Text my_gutenberg_texte_x1

If no specified

Headline: oxyberg_4gguai3gd

Headline: oxyberg_8hdhai3gd

Text oxyberg_wad1a33kj

Get inspired by this plugin https://getblocklab.com/ which work as ACF. Which is way easier to update design connected to the data.

Where the data is stored in fields and the wrapping design can easily be changed without loosing any data. There must come a good mode to control this data.

  1. Design
  2. Redesign
  3. Reconnect data
  4. Publish new design.

This fields can be displayed in the admin and in the design builder (oxygen builder) we can reconnect fields and select which field should be pulled where.

See more inspiration to handle each block through wp-admin from block labs: https://www.youtube.com/watch?v=cmWnMBF0ly0

The maintenance of blocks is painful without proper field identification if we want to update and change the design and use new elements and connect the existing content to these new fields.

Here is another inspiration for what would be very nice. If all users do not agree I think we all could agree on an admin control for Gutenberg blocks.

Meaning we can select what to be editable in client view.

In my example, I wouldn't want them to be able to change the design (colours, font-size etc). But I do miss the inline editor over Oxygens rich editor. This is what Gutenberg use and Oxyberg should be using more Gutenberg native.

And possibilities to in Gutenberg block builder to create design layout which I can insert other Gutenberg blocks in. E.g 60/40 columns etc.

image

https://www.youtube.com/watch?v=SYb24ncjVsY

Control panel for a global and individual element. Such as assigning dash icons or custom SVG. https://metabox.io/plugins/mb-blocks/