bobbingwide / oik-blocks

WordPress 5.0 blocks for oik shortcodes
https://oik-plugins.com/oik-plugins/oik-blocks
GNU General Public License v3.0
1 stars 0 forks source link

Create a Follow me block that will use bw_follow_me with dynamic attributes #8

Closed bobbingwide closed 2 years ago

bobbingwide commented 6 years ago

For the next level of capability I want to be able to create a block which is flexible enough to support an array of attributes. Many of my shortcodes accept a huge number of parameters. I don't want to have to hardcode the logic for each of the different parameters. I need to discover how to use arrays to dynamically set the values for the block attributes which in turn become the shortcode parameters. This solution should hold me in good stead until such a time comes that the shortcode becomes unnecessary and the solution can be implemented natively using blocks. At which time we'll find a way to add logic to convert the shortcodes to blocks. That'll be fine for "blocky" shortcodes but pretty useless for inline shortcodes.

So, since it appears fairly simple, let's try creating a block that will expose the parameters to the bw_follow_me suite of shortcodes, passing the attribute names in a variable array / object and dynamically creating the Additional settings fields.

bobbingwide commented 6 years ago

At present I have no idea how to implement a dynamic solution to this problem.

Even with static code I'm struggling with basic messages such as

Warning: Each child in an array or iterator should have a unique "key" prop. 
bobbingwide commented 5 years ago

The Follow me block needs to support the following settings.

bobbingwide commented 5 years ago

The original requirements are now over a year old. The revised requirements are basically as above. Prerequisite to this is the ability to support multiple networks for the network parameter.

bobbingwide commented 2 years ago

The Follow me block is now delivered in oik. See https://github.com/bobbingwide/oik/issues/138