Create Block: Refactor handling for template variants#43481
Conversation
9abb92d to
447dc7c
Compare
|
Size Change: 0 B Total Size: 1.24 MB ℹ️ View Unchanged
|
46e5416 to
0499f46
Compare
0499f46 to
ed4b796
Compare
adamziel
left a comment
There was a problem hiding this comment.
I read the changes and tried the test plan. It seems to be working as intended, although I didn't dive very deeply.
That's the biggest challenge – testing it extensively. We have basic test coverage for the default template and the es5 one on CI. We could explore integration with e2e tests to ensure that generated blocks work correctly in the editor, but I'm a bit worried that scaffolding takes too long when you need to install npm dependencies for every project started. We could use the local |
What?
Follow-up for #41289, where @ryanwelcher added
--variantflag to allow creation of different block type variants.This PR improves the handling for the
--variantCLI argument to ensure it isn't overridden by the prompt coming from the tool.Why?
Detected that in the interactive mode, the variant selected with the CLI command is ignored (#41289 (comment)). In effect, the following command doesn't fully work as expected as you have to select the same value twice:
How?
Testing Instructions