Closed cynthianorman closed 1 month ago
@jonathanbossenger or someone who is available to assist, I have a summary for the description of a block variation. Could you please confirm its accuracy before I create the video.
@cynthianorman, I'm going to reply with the same numbered points you have used to help with clarity
attributes
object that can override the attributes of the block it's based on, so it seems to me that it is possible to create a variation that doesn't use a specific attribute from the original.Lastly, if you need any help with testing code examples or reviewing things before you hit record, please do let me know. This does border on the block developer side of knowledge, which I do know you are learning 😁
@jonathanbossenger thank you so much for your feedback
- Could you confirm what you mean here? A block variation does have an
attributes
object that can override the attributes of the block it's based on, so it seems to me that it is possible to create a variation that doesn't use a specific attribute from the original.
This is what I got from the Hallway Hangout at 7:11
Also, in this blog post, the definition of attributes implies to me that we can't add new attributes.
- This gives me pause to ponder. If it were me, I'd showcase a variation that uses both a build process and without, but that's mostly because I know there is a build process lesson later on in this course. So yes, I'd agree to go with code that doesn't need a build step. If we decide to update the lesson later on with "buildable" code, we can do so.
This is what I got from the Hallway Hangout at 10:39
Nick speaks about building a block variation which doesn't require a build process
- Oh, I was not aware of this. In that case, the concept of must-use plugins has yet to be introduced. So maybe it's better to mention that, as you've pointed out, you can't use variations in themes hosted in the theme directory. If you are building a theme for the directory, you'd have to include the variation via a plugin that your users would install separately. This lesson could include a link to the introduction to plugins in the beginner learning pathway.
This is what I got from the Hallway Hangout at 15:55 You don't have to place a variation in a plugin, this was Nick's suggestion IF you were developing a theme that wasn't going to be submitted to the WP theme directory.
Lastly, if you need any help with testing code examples or reviewing things before you hit record, please do let me know. This does border on the block developer side of knowledge, which I do know you are learning 😁
Ok, awesome
My revised definition (so far unless you have anything else to add @jonathanbossenger):
@cynthianorman that all looks great!
This Intermediate Theme Developer Learning Pathway Lesson is ready to be reviewed. Please follow the steps listed under Guidelines for reviewing content. Thank you for your contribution! ✨
This Intermediate Theme Developer Learning Pathway Lesson is ready to be reviewed. Please follow the steps listed under Guidelines for reviewing content. Thank you for your contribution! ✨
@jonathanbossenger
(0:05) Learning objectives (0:23) Describe block variations (1:27) Differentiate between block variations and block styles (2:46) Add the JavaScript file to your theme (3:02) Register a block variation. (3:38) Next steps
//publish
Details
Learning Objectives
The learning objectives are to:
Relevant Links