Problem/Motivation
This module is a "hard" dependencies in info.yml because of the use of Drupal\ui_styles\Render\Element::isAcceptingAttributes() in BuilderPanel island plugin.
However, not every projects needs styles.
Proposed resolution
Can we make it a "soft" dependency?
It may not be as straightforward as duplicating ::isAcceptingAttributes(), ::isThemeHookAcceptingAttributes(), ::isRenderElementAcceptingAttributes()
We already have BuilderPanel::useAttributesVariable(), called by ::buildSingleComponent(), can we call it also from ::buildSingleBlock() ? So, kind of easy :)
Also, we need to check if StylesPanel is not raising any error when UI styles is missing.
Issue fork display_builder-3529495
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
grimreaperComment #3
grimreaperComment #4
pdureau commentedComment #5
pdureau commentedComment #6
pdureau commentedComment #9
rodrigoaguileraOk, I think I managed to remove UI styles as a dependency. Tested manually with the styles panel enabled and the UI styles module uninstalled and the panel simply does not show.
Not sure if we need tests to check the absence of the module
Thanks for the nudging to work on this. It was the push that I needed to dive into the code :)
Comment #10
pdureau commentedThanks Rodrigo, I will have a look
Comment #11
pdureau commentedOK for me:
ui_styles, the panel is not available anymore but everything else still works the same (and the third party settings stay stored, so we have the styles abck if we reinstall the module)Comment #13
mogtofu33 commented