Buenas buenas!
Voy a hacer una versión en inglés de este tema el 16 de diciembre a las 9:30AM GMT-6 (hora de Costa Rica).
Más detalles acá
https://www.meetup.com/drupal-costa-rica/events/304971277/
As a fix on my project, I created a Config Override service that checks if the active route belongs to Mercury Editor as in an AJAX request.
If it does I override system.theme.default with my theme. Ideally at this point I would trigger any theme switcher rules, but for the moment nothing complex is required so I force the theme I need.
alemadlei → created an issue.
Ignore the module I mentioned.
After running some tests and checking the code I realized that the latest branch already has this plugin.
Hello, I was having the same need, and since it wasn't available, I created this module.
https://www.drupal.org/project/style_options_media →
It works as I needed, so hopefully it will also work for you.
alemadlei → made their first commit to this issue’s fork.
alemadlei → made their first commit to this issue’s fork.
2dareis2do no, they are completly different.
You can see a demo at https://youtu.be/P80WQdXZGpw?t=674
Thanks pdureau, I will try to take a look soon.
@markie, this has been updated on commit https://git.drupalcode.org/project/sdc_styleguide/-/commit/e0d197da3fa40...
And it is available on the dev version.
@markie, this commit has the fix
https://git.drupalcode.org/project/sdc_styleguide/-/commit/c3526c2a1cc43...
So it is available on the dev version.
@markie, I have fixed this on the drush generator side.
I will begin the fix for the form.
This is strange.
https://git.drupalcode.org/project/sdc_styleguide/-/merge_requests/7/dif...
I see that it is changing the code in the generator at src/Drush/Generators/SDCStyleguideDemoGenerator.php
Hey @markie,
There's a problem with pullign the code to 1.0.
Drupal 10.3 got rid of the Drupal\sdc\ComponentPluginManager and instead prefers Drupal\Core\Theme\ComponentPluginManager.
Pulling the code would break the drush generator.
Merge requests works for me on D11.0.5
smustgrave,
I've created an MR for 7.x
Hi smustgrave,
The project I was working on is on D9, so I was at the moment only able to test there.
However this morning I tested on a D10 site with BEF 7.0.1 and can confirm the same behavior happens there and that the same fix applies to both.
alemadlei → created an issue.
alemadlei → created an issue.
Hi e0ipso,
So my train of though is as follows:
* The way I write SDC I try to avoid dependency to other Drupal things. I know they are flexible enough so that you can build them any way you want, but I try to have them be completly agnostic regarding what environment they are in (my larger goal is that maybe I could use them on Wordpress or Laravel projects in the future).
* Having a theme wrapper or a module wrapper to just include a components folder kind of feels (and I know this is my own opinion) unncesesary because you are not adding anything else other than the components folder.
* Recipes right now are something that don't require a module or theme to be created. They exist and they can be used in a project by running the script. Related to recipes, checking the Drupal source, once installed recipes have their own folders, no need for modules or themes. So I feel kind of envious towards that, and think that SDCs could also have their own folder for contrib and custom. That way they can be shared trough composer or custom repositories.
Hey sea2709,
That's one way to implement it, however, you could also try to define broad CSS variables with default values or use CSS layers so that they are easy to override.
Some people also use Tailwind when defining their components, and those clases are standardized elsewhere.
alemadlei → created an issue.
Hello, I don't have an active roadmap.
For the moment (and I know is not ideal) just that things that I think of.
However, I have been granted security coverage, and some of the issues reported, and I should be able to launch one version with the green banner withing the next week or so.
This has been resolved on the dev branch.
Thanks lhridley, the update has been applied. I hadn't realized one could mark slots as required.
alemadlei → made their first commit to this issue’s fork.
Hello!
Just checking in if you are still interested in discussing further.
I received approval earlier this week.
This project is covered now.
Updating priority after 8 weeks.
Hello!
I'm super interested in discussing this. You should be able to find me in the components slack channel.
As a quick note, I think it is better to have demos or stories live outside the component definition. This because down the road it is something added next to a component definition instead of adding more clutter within the same file.
Let me know your thoughts.
Upping priority after 3 weeks.
This is currently being reviewed by the community at https://www.drupal.org/project/projectapplications/issues/3457150 → .
I just need official confirmation and then I should be able to complete.
vishal.kadam, thank you for the feedback.
I've updated based on the PHPCS output and the other comments.
One thing though, regarding constructors using the namespace, on some instances this causes the line to go over 80 characters and it raises more PHPCS issues.
So I just used the class name instead.
I've opt in for the advisories.
*
https://www.drupal.org/project/projectapplications/issues/3457151 →
for 10.3
*
https://www.drupal.org/project/projectapplications/issues/3457150 →
for < 10.3
alemadlei → created an issue.
alemadlei → created an issue.
Drupal 11 support is only set for 1.1.x branch, as this is compatible with Drupal 10.3 now that SDC is no longer experimental.
Sorry, wrong comment.
Starting this now.
Drupal 11 support is only set for 1.1.x branch, as this is compatible with Drupal 10.3 now that SDC is no longer experimental.
There have been multiple changes and the original code no longers works. As preparation for opting in the security advisory, I've addressed these and a bunch others sniffs.
These are all fixed in the dev branches.
This has been corrected on release 1.1.0-beta1.
Thanks agentrickard!
This got fixed on beta6.
However, do note that the theme you are using (stable) is deprecated. Instead you should use stable9 or a starter kit.
This got released on beta6.
alemadlei → made their first commit to this issue’s fork.
Hello, from the previous MR it sometimes worked for me. However, when having URL fields it would fail. So instead of just letting it continue, I'm shorting it so that it replaces and then continues to next token.
I didn't do anything with the test, but maybe this will help other people. On my end it work with the general tests that the previous one was passing and fixed the ones it was failing.
alemadlei → made their first commit to this issue’s fork.
Updated the naming of the sdc_styleguide module and extended a little bit its summary.
Duplicate of https://www.drupal.org/project/sdc_styleguide/issues/3451295 📌 Automated Drupal 11 compatibility fixes for sdc_styleguide Needs review
@Anjali, based on your initial comment about unnecesary groups I came up with the idea to use the grouping attribute of an SDC and instead the tree now is built using that grouping. This allowed me to simplify the structure.
The CSS has been updated so that that it overrides some of the styles that the rendering theme is using, however, the theme always has capabilities to change those. In general readability should be improved, but let me know your thoughts.
These updates have made your MR to have conflicts though.
Please raise a new issue if you find any problems.
Thank you for your interest in helping out.
There's a correction that needs to take place however.
This is changing CSS indentation which goes against formatting guidelines (2 spaces).
https://www.drupal.org/docs/develop/standards/css/css-formatting-guidelines →
alemadlei → created an issue.
I added an MR for this.
I was still able to reproduce before the MR.
Yes, that's what I'm trying to accomplish with the styleguide.
Normally when you have your components system, you have to create content (which could be erased by mistake) but it also has to load everything in Drupal in order to view them.
The idea with the demos and form is that you can have that separate from the database and have a single page where this can be reviewed and showcased to client.
Thank you for the feedback.
Next release I'm planning to have a form for the component (separate from the demos).
This is on the dev version (if cloned from the repo). I need to roll out a dev release. But it will be available once I generate the new beta release.
I took a note on allowing demos to not define slots or properties.
I have released 1.0.0-beta2 which now includes an explorer at `/styleguide/explorer`. It should render better compared to the form.
I have released 1.0.0-beta2 which should be installable with composer.
I 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.
Hello!
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.
Hello, I just submitted a merge request for this.
alemadlei → made their first commit to this issue’s fork.
alemadlei → created an issue.
Port available at https://github.com/AleMadLei/salesforce
alemadlei → created an issue.
alemadlei → created an issue.
Hola, yo podría colaborar con esto si esta abierto a la comunidad.
Previamente en las sesiones que hice por Twitch ya había cubierto este tema y lo he estado usando en un par de proyectos.
alemadlei → made their first commit to this issue’s fork.
#2 worked for me
jlbellido → credited alemadlei → .