To InnerBlock or not to innerBlock #52037
djcowan
started this conversation in
Developer Experience
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My curiosity was raised when I noticed the recently released Details/Summary block's mixed use of innerBlocks for the Details content and RichText for the Summary. (call this the extensible single block method (ESBM)
While I find the InnerBlock functionality wonderful for creating complex block structure, namely it gives the user greater layout flexibility and control of individual block appearance (ima call this the flexible Innerblock method( FIBM )
-> the approach used for the details block does raise questions about the best approach to take.
I am aware concerns regarding the misuse or misapplication of the Details block were raised, i.e its not an FAQ/accordion and had aria specific needs, however was the final choice of structure defined by these concerns—or was it simply seen as the most practical way to accomplish the desired functionality. (re: BlockQuote/Cite block pair)
Full transparency; I silently followed the development of the details block in an effort to transition from PHP to JSX development. (Thanks Caroline <3) and so armed am having a go at creating a block using the new HTML dialog element. (for experience - not for profit or person gain)
I realise there will never or can't be a "best" way to develop a block.
If you were building / tackling a dialog block, do you feel it would be better to:
TLDR; Looking for insights into where and when to use innerBlocks and when to hardcode elements.
Beta Was this translation helpful? Give feedback.
All reactions