New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Support css classnames for <category> blocks #1850
Comments
To be clear, you want this to be on the If so, I'm happy to accept a PR for this. |
Here's where a single category is being created in the toolbox: https://github.com/google/blockly/blob/develop/core/toolbox.js#L320 The Blockly toolbox extends the closure library toolbox. The relevant classes are TreeControl and TreeNode. They're defined in the closure library but extended in various ways in the second half of toolbox.js. |
I'm not sure I agree that we should do this, but I'm also not sure I fully understand the proposl Is the proposal that the xml would look something like |
This idea would also be helpful to me. The overall idea is to provide labels and additional navigation aids for the toolbox at the topmost (category) level. |
@alschmiedt fyi |
This is still not a feature, however it might be worth considering when we take a look at redesigning the toolbox. @samelhusseini |
@samelhusseini what do you think ? |
The request makes sense to me. In the same way category style is being added here. You can read the category's |
@MarkusBordihn It's nice for this feature. before blockly providing this feature itself, how you can acheive the customized UI like that? how is the detail way to use an loop and adding css classnames dynamically over javascript ? Thank you. |
At https://github.com/google/coding-with-chrome/blob/master/src/ui/blockly/blockly_toolbox.js#L79 you can see how this implementation is done on my side. |
@MarkusBordihn got it! THANKS so much. |
You can now add a css class to a specific category. |
Problem statement
Currently it is not possible to set individual css classnames for the different blocks which limits the current styling options.
Expected Behavior
It should be possible to pass the css class names like:
Which should be translated to:
Additional Information
I currently solving this by using an loop and adding css classnames dynamically over javascript.
The text was updated successfully, but these errors were encountered: