Introduce a filter to disable the CoBlocks bundled svg icons#1403
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
|
Looking good! One last bit: can you add a quick doc article that references this - using this doc page as a template? After that it's good to merge. |
|
@EvanHerman I downloaded a .zip of your branch I then went to create a new Page and add an Icon block and see this: I have It says the |
|
@colorful-tones I don't think that there's anything missing, from what you describe. I am also seeing the same error now, but I'm not sure what may have changed. I didn't notice the error because during my testing I added the icon block to the page, published it, and then added the filter, which removes all of the bundled icons without throwing any errors. I am going to do some testing and see if I can narrow it down and fix things up. I will post back here when I've figured it out. |
|
@colorful-tones I found the issue. Things were breaking when the block was added because the default icons array was set to the icons that we removed through the filter. I've pushed up some code that resets the default svg icons array when the default icons are disabled and custom icons exist. Feel free to pull things down and re-test. Let me know if you encounter any issues, and again I can dive back in and we can figure it out. Thanks! |
|
@EvanHerman works like a charm! 👏 One thing seemed confusing, but not a blocker to release this IMO. So I opened a new Feature Request #1405 |

Resolves #1394, #1405
Description
Introduce a new filter to disable the bundled icons that ship with CoBlocks. This allows users who implement custom icons to remove the excess icons that they may not ever use.
Screenshots
Types of changes
New filter:
coblocks_bundled_icons_enabledNote: I named the filter this way to match the syntax of the typography controls filter,
coblocks_typography_controls_enabled.Usage
How has this been tested?
Manually tested.
Checklist: