Bunker D
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Adding a JS confirm popup inside wordpressIf you are using the Gutenberg environment, you might use Modal.
I am not sure but I think WordPress was blocking my standard JavaScript popups.Worst case scenario: use HTML elements for the confirmation dialog (show or create them when your button is clicker, and have ‘OK’ perform the action and ‘Cancel’ hide or delete the dialog elements).
You can even place it under your button, or on top of everything (absolute position) if you want it to fill like a popup. I actually think Modal does that. It allows for graphic consistency, and your popup remains within the web page (and not wherever it wants on the user’s screen).Forum: Developing with WordPress
In reply to: BlockAlignmentToolbar: no ‘full’?Thank you. I also just discovered that the ESNext+JSX needs to be compiled through other tools to be tested. The tutorials from the Block Editor Handbook do not mention anything about that (from what I have seen at least), except in the JavaScript Versions and Build Step section from which I wrongly understood that the issue exited for debug purposes but though WordPress would otherwise automatically do the required compiling.
I found a few tutorials including this side, some mentioning the tool you mentioned (create-guten-block). I will (re)start from there.PS: I also discovered some of the great things ES6 (hence ESNext) brings. So at least, this justifies a bit of the hassle of transitioning to new coding practices. ^^
Forum: Developing with WordPress
In reply to: BlockAlignmentToolbar: no ‘full’?Well, never mind. I will create my own ToolbarGroup, or even Toolbar. Although for the latter I do not understand how to convert the JavaScript to ES5, so I guess I will transition to ESNext. (I am admittedly a bit upset that most (all?) documentation beyond tutorials is only in ESNext, while this page seems to argue in favor of ES5 for small projects.)
Forum: Developing with WordPress
In reply to: BlockAlignmentToolbar: no ‘full’?I doubt that, considering that at this point those are just buttons that can be tied to any action. :/