Fix editor CSS handle collision with Image Slider Block; update contributors - #15
Open
RahatSheikhLeon wants to merge 2 commits into
Open
Fix editor CSS handle collision with Image Slider Block; update contributors#15RahatSheikhLeon wants to merge 2 commits into
RahatSheikhLeon wants to merge 2 commits into
Conversation
`dist/modules.css` is built from this plugin's own `controls` submodule pin, so it differs between the Essential Blocks single-block plugins. Enqueuing it as `essential-blocks-editor-css` meant the first plugin to register that handle won it outright — WP_Dependencies::add() returns false for an already-registered handle, while wp_enqueue_style() still queues it against the first registration's src and deps. `active_plugins` is sort()ed on activation, so this plugin loaded first and silently discarded Image Slider's stylesheet along with its icon picker and Font Awesome dependencies, breaking that plugin's arrow icon pickers. With the order reversed this plugin would have been the one to lose its stylesheet. Renaming to `buttongroup-block-editor-css` fixes it in both directions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Remove jamilbd07 and fencermonir from the Contributors field. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the other half of a cross-plugin asset-handle collision that broke the Arrow Prev/Next Icon pickers in Image Slider Block. Companion PR:
EssentialBlocks/slider-block#18.Root cause
dist/modules.cssis built from this plugin's owncontrolssubmodule pin, so it differs between the Essential Blocks single-block plugins. It was enqueued asessential-blocks-editor-css— a shared name.WP_Dependencies::add()returnsfalsefor an already-registered handle, whilewp_enqueue_style()still queues that handle against the first registration'ssrcanddeps. Sinceactive_pluginsissort()ed on activation,button-groupsorts beforeslider-blockand always registered first — silently discarding Image Slider's stylesheet along with itsessential-blocks-icon-picker-cssandessential-blocks-fontawesomedependencies. Those dependencies are the only route by which the icon-picker styles reach the queue, so its arrow icon pickers rendered unstyled with no Font Awesome glyphs.The bug is bidirectional: with the load order reversed, this plugin would have been the one to lose its stylesheet and receive Image Slider's
modules.cssinstead.Fix
Renamed this plugin's handle to
buttongroup-block-editor-css. Genuinely shared vendor assets (essential-blocks-animation, and Image Slider's icon-picker and Font Awesome handles) keep their shared names on purpose, so only one copy loads however many EB single-block plugins are active.An audit of every asset handle in both plugins found no other plugin-specific asset sharing a handle.
essential-blocks-animationwas verified byte-identical across both plugins (71,091 bytes), andessential-blocks-eb-animationwas verified functionally equivalent — both act on plugin-agnosticeb___classes — so both were deliberately left shared.Verification
Checked against WordPress's own
WP_Dependencies/_WP_Dependencyclasses, not mocks, across the full activation matrix:No duplicate registrations in any scenario, and dependency print order resolves correctly.
includes/helpers.phplints clean. No other code in the install referenced the old handle as a dependency, inwp_style_is(), or in a dequeue.Not verified: the picker UI in a live browser — the local WordPress instance was not running.
Also
Removed
jamilbd07andfencermonirfrom theContributorsfield inreadme.txt.Note
devis 4 commits behindlatest, so this may needlatestmerged in before it can go green.🤖 Generated with Claude Code