tcmulder / aquamin

Aquamin WordPress Theme
3 stars 1 forks source link

Consider handling block edits differently. #73

Closed tcmulder closed 6 months ago

tcmulder commented 11 months ago

I'm not 100% certain the solve, but "block-library" and "block-edits" seems weird, b/c things like format types (like Year) go into "block-edits" even though they're brand new features.

Could either look at renaming "block-edits" to something like "global-blocks" or something, with documentation pointing out their assets get loaded globally.

Or, is it possible to have a simple toggle within wp aquamin block create that asks if it needs to be globally loaded? Or some simple toggle in the PHP or JavaScript file (like the enqueue depends array or something) that causes the CSS to be loaded globally? Even just add a new enqueue_style/script line to index.php to globally load the things (assuming CSS can load like that, and that it doesn't double-load the style sheet—shouldn't since it's going off the asset's unique slug...).

Or, some way of changing the filenames? Like my-block-global.css (in addition to my-block-style.css and my-block-editor.css). Don't want to make things overly complicated though.

tcmulder commented 6 months ago

I've not called these block-editor (which matches Gutenberg's directory structure better). It's a little weird that some block-editor-related things (style.css and script.js) get loaded via theme.bundle.js now, but I can live with it.