Forum Replies Created
-
AuthorPosts
-
Zac Gordon
KeymasterOkay, it looks like the .babelrc file was not there so it was not understanding JSX.
Should be all fixed now 🙂
Zac Gordon
KeymasterOkay, I’m seeing what you’re seeing now.. exploring solution..
Zac Gordon
KeymasterThank you! Just fixed 🙂
June 19, 2018 at 10:15 am in reply to: Any way to add a class to a custom DropdownMenu control buttons? #49233Zac Gordon
KeymasterSimilar to your other question on extending existing blocks I’m not sure it’s possible yet. Please ask in the WP slack #core-editor channel and let us know what you find!!!
Zac Gordon
KeymasterHiya!
Yes, when I made the course this wasn’t really possible. They are looking for ways to make blocks more customizable like you want and I hope to cover more hooks in a separate advanced video.
For the time being if you want a custom block you have to build it yourself.
That said, please go ask this question in WP Slack #core-editor channel and see if they have made any progress! Would love to know what you find out.
Once it’s possible I’ll prepare some material on how to do it 🙂
Zac Gordon
KeymasterOkay, was worried it might not be that simple. So you have everything loaded and updated. And you have the latest version of the plugin and WordPres? And it works in one environment but not the other. I tried to duplicate the problem but can’t.
So, I’m wondering if it is a hidden character or something messing things up. What happens if you delete the code in that file and type it from scratch as it is in the example code but not copy and pasting?
Zac Gordon
KeymasterHey Charles, it may not be this simple, but did you run
npm install
beforehand?June 13, 2018 at 3:50 pm in reply to: Custom Column Block Gutenberg 3.0 – Using InnerBlocks with pre-nested blocks #48888Zac Gordon
KeymasterBlock templates will only work for new posts and pages unfortunately. I will look into this a bit more for the next update, but I believe you can hard-core into a parent block what children you want in there (and to some extent vice versa). Try checking some of the links in the latest GB update on the make.wordpress.org blog for some hints and possible leads.
Zac Gordon
KeymasterSorry about that. Looks like the site had some dns issues. Should be resolved now.
June 9, 2018 at 5:38 pm in reply to: Can you explain the backslashes in the enqueue-scripts.php file? #48689Zac Gordon
KeymasterYup! You figured it out 🙂 Just PHP names paces 🙂
Zac Gordon
KeymasterYeah, this is a really good question and I believe they are working on extending this more. I am not sure yet if it is possible but I will look into it and try to include in the next update. In the meantime please ask in the core-editor Slack channel!
Zac Gordon
KeymasterHmmm, gotcha.
I haven’t played with this enough, but maybe some of there other functions can help?
Wonder if it’s setting in a color picker to return name if available instead of hex but you may still be able to get yourself.
Zac Gordon
KeymasterFew things:
1. Make sure you’ve added custom colors to your theme or plugin
2. Make sure to import getColorClass from editor
3. Setup your attributes all the same way as before (I believe)
4. Save getColorClass( ‘color’, colorName ) to a variable
5. Wherever you want to use that custom CSS name, call that variableHope this helps!
I don’t have any examples of this at the moment, but I will make a note for the next course update 🙂
Zac Gordon
KeymasterThanks! I’m updating all the links now. A number of things were moved around.
Zac Gordon
KeymasterJust adding note here for records that everyone should have access, please ping me if not!
May 22, 2018 at 6:55 pm in reply to: 1.8.10.05 minor issues (misspelling and wrong text for link) #47750Zac Gordon
KeymasterThanks for pointing these out! All fixed now!
Zac Gordon
KeymasterThanks for pointing that out! Just fixed 🙂 It should remember your video speed now 🙂
Zac Gordon
KeymasterHi Michael! You should be all set now! Looks like there was a problem with the registration process. Should be all fixed now!
Zac Gordon
KeymasterI just tried installing both of the plugins and it is all working for me. Could you explain again the exact problem you’re having?
Zac Gordon
KeymasterHey Adam! There were some recent changes to the Gutenberg Core code. I will be updating the example files this week so let me do that and then we can try again.
If you want to explore a bit on your own, most of the changes have to do with the location of block files being moved…
Zac Gordon
KeymasterHi Jessica!
If you login and go to javascriptforwp.com/dashboard do you see the course listed there or do you mean there are lessons missing links?
Thanks!
Zac Gordon
KeymasterHey Jason!
Importing the css in this way is simply one of the styling patterns for React. Gutenberg Core uses it so for these reasons I’m using it here. In these examples, webpack is processing and spitting out the final css that we end up enqueuing.
You can also just have a single css file (or other architecture) and enqueue that. I think either way is probable fine and not a major benefit one way or the other if you don’t have a preference (or do :))
Hope that helps! Good question 🙂
Zac Gordon
KeymasterThat is just part of the development process if you make changes to a block 🙂
Zac Gordon
KeymasterDoes the example block work for you out of the box? If so I might suggest starting over and seeing at what point it broke. Might be as simple as something named incorrectly.
Zac Gordon
KeymasterThis is a good question.
In general I think using Fragments is a solid approach that is also quite common in React and some vanilla JS work.
The ability to pass arrays here I like but it doesn’t always work best.
-
AuthorPosts