-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add site wide configuration processing #268
Comments
@KevinBatdorf You're the best. A dev that really cares about his product and the users. You don't see many people like you anymore in this world. Thanks. |
I believe this should be the absolute priority, as setting config for each and every code block is tiresome. I have a name suggestion "Profiles" just like how vscode has profile for managing different config/setup. maybe in future uses can import their vscode configs too. For future or for the pro/premium version of the plugin you can store the code block content in custom table just like shared blocks which will make the sharing code between editors easier and also helps with listing all code blocks in one place for bulk updates on style changes/moderation. I'm not good with good with react/js but i'll try to see if I can do a prototype for global configs/profiles. p.s. thanks for such an amazing plugin |
Yep, I was just testing your plugin and I was looking for this. It'll be a big time saver.
Super cool what you have here. ~ Smaller thumbs for theme selection on the panel, or maybe a setting option for smaller or none. |
This can't really exist in a perfect form because the tokens are dependent on the theme+language. Every theme has specific tokens that define what colors go where. There's a basic "CSS Vars" theme included in the theme pack, but that is also limited as it just tries to make a generic theme (so it's likely to not look as good as pre-built ones). I wrote a bit about it here: #168 In the coming months I'm going to rewrite a big chunk of the plugin to better support css variables at the individual theme level, but it's going to have breaking changes and I'm unsure how to provide a graceful upgrade path. WordPress itself isn't designed to support complex breaking changes, or mass updates to static blocks. I may just have to include a new block and provide the option to disable the old one |
Want to list out some goals and thoughts on adding a global approach to converting and processing code blocks.
Here's what I want to solve for with a global approach to managing Code Block Pro (CBP) blocks
Challenges
The way the CBP works is it uses shiki, which uses the same webassembly engine that VS Code uses (oniguruma + textmate) to tokenize and colorize the code. This happens so fast that you don't notice it happening as you type. This is unlike other solutions that process the code on page load on the front end.
The tradeoff is that this pre-processed code is stored in the database. So when you want to someday change your color scheme, or you want to remove your data from your WordPress site all together, you have to go and manually convert every CBP block one by one. That's annoying.
Solutions
Create an admin page that will let users load in every page that has a CBP block (or non-CBP block if converting to one), and will:
The main challenge here will be presenting the interface in a useful way, and ensuring any changes are recoverable. Here are some notes on that:
This is an important feature for the future of the plugin so I want to make sure I get it right. Here are some of the principles I will follow when developing and rolling this out:
I may edit to this list over time. Also, this of course would be a free tool.
The text was updated successfully, but these errors were encountered: