So today I know I’m looking for how “allowedBlocks” works in Gutenberg. What allowedBlocks does is only allow certain blocks to be contained within another block. It should be a trivial thing to do. However, it is not working. As we live in a coded for success world, when it doesn’t work I get no errors, No “ah hold on you set allowed blocks but it isn’t working” message. Just nothing.
So I could try to find a jsx version and see what it gets translated too, but that’s a bit too Rosetta stone as attempt one.
The documentation for the code is written in jsx, which is a sort of meta pre javascript which I’m not using because I am trying to do something wich prevents me from doing so. So the default guidance is out. Googling brings back very little, as if the page has examples using jsx, then won’t work, and if you try to google around JSX then you’re reliant on google knowing that and honouring that.
Github search is legendarily bad. For something holding so much of hte world’s code it’d be handy if it was capable of searching for where a line of code might be being used. Nope.
So then I’m stuck basically going through WordPress core code trying to find a reference to it.
Then I remembered there is https://wpdirectory.net/ which allows me to search the code of all WordPress plugins. I’ll try that. However, it’s results aren’t very pretty or usable.
So I am searching, but not just searching, but knowing which searches won’t work and which searches might work. Searching for an answer in one language but not another, searching for something that could be an easy code example, but isn’t