The Decoupled Blocks: Twig is a submodule of the Decoupled Blocks module. It allows to create blocks using regular Drupal stuff like twig templates and PHP classes with all its capabilities. These blocks are encapsulated into a folder with all the stuff needed for it. The blocks will be available for use on any UI capable of using blocks like Block Layout or Layout Builder.

The module provide some other features like a ComponentManager that allows to programatically create these blocks and support for translation files inside the encapsulated folder of the block.

Some additional documentation is still needed at the moment and I will be working on that during this week.

Project link

https://www.drupal.org/project/pdb_twig

Comments

emacoti created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes

Thank you for applying!

Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smother review.

The important notes are the following.

  • If you have not done it yet, you should run phpcs --standard=Drupal,DrupalPractice on the project, which alone fixes most of what reviewers would report.
  • For the time this application is open, only your commits are allowed.
  • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
  • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

To the reviewers

Please read How to review security advisory coverage applications, What to cover in an application review, and Drupal.org security advisory coverage application workflow.
Reviewer's task is describing what needs to be changed, not providing patches to fix what reported in a review.

vinaymahale’s picture

Status: Needs review » Needs work

Please fix the below PHPCS issues:

FILE: /pdb_twig/modules/pdb_twig_examples/components/twig_example_hello_word/twig_example_hello_word.info.yml
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
 1 | WARNING | "core_version_requirement" property is missing in the info.yml file
---------------------------------------------------------------------------------------------------------


FILE: /pdb_twig/modules/pdb_twig_examples/components/twig_example_css_js/twig_example_css_js.info.yml
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
 1 | WARNING | "core_version_requirement" property is missing in the info.yml file
---------------------------------------------------------------------------------------------------------


FILE: /pdb_twig/modules/pdb_twig_examples/components/twig_example_class/twig_example_class.info.yml
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
 1 | WARNING | "core_version_requirement" property is missing in the info.yml file
---------------------------------------------------------------------------------------------------------


FILE: /pdb_twig_examples/components/twig_example_context_node/twig_example_context_node.info.yml
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
 1 | WARNING | "core_version_requirement" property is missing in the info.yml file
---------------------------------------------------------------------------------------------------------


FILE: /pdb_twig/src/Event/PdbTwigPreRenderAlterEvent.php
-----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
 110 | ERROR | Type hint "array" missing for $class_instance
-----------------------------------------------------------------------------------------------
emacoti’s picture

Thanks for the review @vinaymahale.

About the "core_version_requirement" property is missing in the info.yml file, those are not actual extension like modules, those are yml file for the blocks and a custom discovery and parser will read and process them, thus making the core_version_requirement not needed. Would prefer to not add that not needed property in this case. Does that makes sense?

Will fix the other one.

emacoti’s picture

ok just pushed the fix for this one

FILE: /pdb_twig/src/Event/PdbTwigPreRenderAlterEvent.php
-----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
 110 | ERROR | Type hint "array" missing for $class_instance
-----------------------------------------------------------------------------------------------

It was a mistake on the method documentation, had array but was object type instead.

emacoti’s picture

Status: Needs work » Needs review
vinaymahale’s picture

As per comment #4 yes that can be ignored. Other than that there are no more PHPCS issues.
Let's wait for other reviewers.

vinaymahale’s picture

Priority: Normal » Major

I am changing priority as per Issue priorities

vinaymahale’s picture

Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community

No issues found
Changing status to RTBC!

avpaderno’s picture

Assigned: Unassigned » avpaderno

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the Slack #contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed
emacoti’s picture

Thank you! I will keep that in mind and try to participate and review other projects.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.