Closed (fixed)
Project:
Single Directory Components Styleguide
Version:
1.1.0-beta1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
21 May 2024 at 17:28 UTC
Updated:
25 Jun 2024 at 23:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
agentrickardTypeError: Drupal\sdc_styleguide\Form\SDCExplorerForm::__construct(): Argument #1 ($componentPluginManager) must be of type Drupal\sdc\ComponentPluginManager, Drupal\Core\Theme\ComponentPluginManager
Comment #3
agentrickardI think I get what this is trying to do.
It wants a `my_component.demo.NAME.yml` file for each item to display in the Styleguide.
Two immediate questions:
Consider the following component:
How do we represent that as a demo file?
Comment #4
alemadleiHello!
Question, what do you mean it is not compatible with Drupal 10.3 and higher?
Right now the code has an unstable Form that I'm deprecating in favor of the controller.
Regarding the slots, I need to push the code update that adds support for those. For the complex array, I'm guessing this is for the title_suffix or attributes.
Those items might be part of a larger discussion. Personally I'm of the opinion that having an SDC to know about Drupal classes is a no go. I'm more of the idea that a component should be pure and ideally be something that you can use in other technologies. Any Drupalism should be part of a slot and the component itself should never use them explicitly. That is, using |t or other specific Drupal filters I consider should be discouraged. If you really need them, then I guess they can be a slot as well. I'm open to discussing this though.
Comment #5
alemadleiI have released 1.0.0-beta2 which now includes an explorer at `/styleguide/explorer`.
There's a submodule that provides a demo component with 2 demos. If you enable this submodule, you should see the demos in the explorer.
The explorer has a resize featuer and that way you can test your component responsiveness.
Comment #6
agentrickardNot compatible:
1) SDC module is deprecated and should not be a dependency in the info file
2) The "'plugin.manager.sdc'" service has moved to a new class.
These are both fixed in the MR.
Comment #9
alemadleiThis has been corrected on release 1.1.0-beta1.
Thanks agentrickard!
Comment #10
alemadlei