Replies: 1 comment 2 replies
-
You can do this without writing a line of code by creating the components within the editor. The question is how much time you're willing to spend and learn this by doing. It's going to be hard if you're not used to the editor. I'm quite experienced as a designer and It took me months to get all the block editor quirks, but now it's quite easy. You don't have the same design freedom like in Figma, so it's best if you go from a rough drawing straight to the editor and try to build things and lean into the limitations. I use this plugin to manage and categorize patterns: https://wordpress.org/plugins/pattern-manager/ The only downside is that the plugin can yet create or manage synced patterns and template parts, so you'd have to create them outside of this plugin and categorize them manually. For variations I copy the styles of a group block below the pattern block, create a new pattern under a slightly different name and paste the styles. If you want to maximize user customization best treat template-parts as "empty containers" for patterns. This way users can click on a template part and replace the underlying pattern. Check out this video and other in that channel: https://www.youtube.com/watch?v=w8DehSH1_PA Download and study the Ollie theme and try to learn from it. |
Beta Was this translation helpful? Give feedback.
-
My goal is to create this sort of editing experience.
Context
To give context to this question this is the Figma component that need to be implemented, the CTA.
The CTA has 6 variant.
The CTA uses the Button, which is another Figma Componen, that has 2 variant.
Desired Editing Experience
The experience requires that:
How to do it ?
Gutenberg has multiple feature that are suitable to this "problem":
innerBlocks
How to combine these, doing minimum amount of code and get every "requirements" satisfied ?
Obviously i can create a Custom Block with a lot of attributes and do all that , but i want to avoid it if possible and use core blocks instead (Group, Image, Button, Heading, ...). So i'd go "Custom Block way" only if stricly necessary for the requirements.
How do you tackle this task ?
How do you did in the past and ecountered obstacles? which obstcles? How did you refactor ?
Beta Was this translation helpful? Give feedback.
All reactions