- Issue created by @e0ipso
- e0ipso Can Picafort
I added the, previously existing issue, π Create new SDC component for Olivero (tabs) Postponed as a child to this one.
- π¨π¦Canada xmacinfo Canada
Any dependency between Olivero and SDC must be optional so that a user is not obligated to enable SDC just to use Olivero or take Olivero as a base theme.
- π¨π¦Canada xmacinfo Canada
I'd prefer that you create a clone of Olivero rather than force Olivero to use SDC.
- π¨π¦Canada xmacinfo Canada
As I mentioned in other SDC issues, SDC should always be optional and not enabled by default by any existing core theme or core modules.
- π¨π¦Canada xmacinfo Canada
As I mentioned in another ticket, when using Olivero as a base theme, will we be able to remove some or all SDC components and replace those with regular Twig templates?
In general SDC components are welcome. But I still expect to use the current theme layer as is, even if I use Olivero as a base theme. We may still built themes with or without SDC components. But if Olivero is forcing us to use SDC, some of us will not be able to use Olivero as a base theme.
- e0ipso Can Picafort
@xmacinfo it was decided, a long time ago, that single directory components are the way to approach components in Drupal core, and that core will recommend this approach for contrib, and custom modules and themes. This decision is beyond the scope of this ticket and can be reviewed at length in β¨ Single directory components in core Active and β¨ Add Single Directory Components as a new experimental module Fixed . If you disagree, or want to revise this decision, please open a new issue with that as it's clear goal. I will be happy to engage there as well.
However, since I don't want to leave you hanging until that issue happens (or not), I will address your comments here.
With that context in mind:
I'd prefer that you create a clone of Olivero rather than force Olivero to use SDC.
If Olivero is to benefit from components, it shoudl do so by using SDC (as per the decision above). We can argue weather or not Olivero benefits from components, this would definitely be in scope for this issue. I do believe it does, but I think Olivero maintainers like @mherchel can elaborate better on this, since he has already given his go ahead on this.
With regards to creating a clone, I don't think it's feasible to maintain two exact themes in core, but again this is a conversation to be had with others since I will not be on the hook for maintaining this hypothetical clone.
As I mentioned in other SDC issues, SDC should always be optional and not enabled by default by any existing core theme or core modules.
I see in our profiles that English is not the first language of either of us. I am interpreting the use of "should" here as "my preference is". Let me know if that is wrong.
Can you share your rationale of why this is your preference? Bear in mind that the community has already decided, through the appropriately painful :-P channels, that the way to do components in core is using SDC and not an alternative approach.
Obligatory reminder here is that no module or theme can enable or disable SDC more that it can enable or disable Form API, the routing system, or the batch API. These are tools that are baked into core itself.
But if Olivero is forcing us to use SDC, some of us will not be able to use Olivero as a base theme.
I am also intrigued about this. What is the reason that will make it impossible for you not to use SDC? Is it personal preference, or is it something else I am missing?
will we be able to remove some or all SDC components and replace those with regular Twig templates?
In the end Twig will still be the render engine (if you choose to keep it), so you can override the templates that embed the components to include your twig templates. For that you'll need to copy the templates of the components being embedded, create the libraries manually, and then attach them. All of that can live in your theme, the one that extends from Olivero.
Keep in mind that SDC, and the policy to use it in core, is not designed to ease the process of getting rid of it. If you feel strongly that it should, I encourage you to create an issue to that end that explains the reasons of why you think many people should want to remove SDC.
- π¨π¦Canada xmacinfo Canada
I see in our profiles that English is not the first language of either of us. I am interpreting the use of "should" here as "my preference is". Let me know if that is wrong.
The way I use βshouldβ is to to indicate correctness, like in English. In French βshouldβ = βmustβ, which misses some nuances between the two.
In other words, we, the Drupal community, should let developers use SDC or plain Twig templates. Thankfully, we can already do that. π
As a developer, and when chatting with other developers, we do not always want or need to use a components system; we create a bunch of templates and add CSS/JavaScript and that's it. However, most front-end devs (we can include themers) prefer using well define reusable components. That was, until now, hard to do in Drupal, and varied a lot between developers and themes teams. SDC helps standardizing components usage and their documentation and will push Drupal to new levels. I agree with that.
The core community wants standards and good documentation. I agree with that.
So the problem, which is not a problem, is, as a developer, do I create Twig templates as I did since Drupal 8 and use a few CSS files loaded through libraries, and be done with it, or I am forced to use the new SDC. This is not a problem as you told me. π
When building a custom them, we (the dev team on that project) will be able to use either SDC or plain old Twig templates.
Which leads to base themes. Can we use a base theme built on SDC (here I think about Olivero) and replace, letβs consider, component A and B and replace those with plain old Twig templates? If yes, then my problem is solved and I need not worry anymore.
I like Olivero so much that I use it as a base theme.
- π³π±Netherlands Martijn de Wit π³π± The Netherlands
xmacinfo did you already try the new theme/template generator in Drupal ?
- π¨π¦Canada xmacinfo Canada
@Martijn de Wit
Yes, I did. But that does not create a theme inheriting from a base theme.
- First commit to issue fork.