Account created on 11 April 2009, over 15 years ago
  • Senior Drupal Architect. Acquia Drupal 9 Certified Expert at TanRen Tech 
#

Merge Requests

More

Recent comments

🇨🇷Costa Rica alemadlei

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/

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

Ignore the module I mentioned.

After running some tests and checking the code I realized that the latest branch already has this plugin.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

2dareis2do no, they are completly different.

You can see a demo at https://youtu.be/P80WQdXZGpw?t=674

🇨🇷Costa Rica alemadlei

Thanks pdureau, I will try to take a look soon.

🇨🇷Costa Rica alemadlei

@markie, I have fixed this on the drush generator side.

I will begin the fix for the form.

🇨🇷Costa Rica alemadlei

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

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

Thanks lhridley, the update has been applied. I hadn't realized one could mark slots as required.

🇨🇷Costa Rica alemadlei

Hello!

Just checking in if you are still interested in discussing further.

🇨🇷Costa Rica alemadlei

I received approval earlier this week.

This project is covered now.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

This has been corrected on release 1.1.0-beta1.

Thanks agentrickard!

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

Updated the naming of the sdc_styleguide module and extended a little bit its summary.

🇨🇷Costa Rica alemadlei

@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.

🇨🇷Costa Rica alemadlei

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

🇨🇷Costa Rica alemadlei

I added an MR for this.

I was still able to reproduce before the MR.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

Thank you for the feedback.

Next release I'm planning to have a form for the component (separate from the demos).

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

I have released 1.0.0-beta2 which now includes an explorer at `/styleguide/explorer`. It should render better compared to the form.

🇨🇷Costa Rica alemadlei

I have released 1.0.0-beta2 which should be installable with composer.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

Hello, I just submitted a merge request for this.

🇨🇷Costa Rica alemadlei

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.

🇨🇷Costa Rica alemadlei

alemadlei made their first commit to this issue’s fork.

Production build 0.71.5 2024