This module provides UI and Drush commands for getting the list of Inline Blocks created by the Layout Builder module. This helps site builders as well as developers for better maintenance and doing other stuffs.

Project link

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

CommentFileSizeAuthor
#3 phpcs.png32.77 KBsakthi_dev

Comments

sakthi_dev created an issue. See original summary.

vishal.kadam’s picture

Title: List Inline Block » [1.0.x] List Inline Block
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 smoother 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, Application workflow, What to cover in an application review, and Tools to use for reviews.

The important notes are the following.

  • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
  • Reviewers should show the output of a CLI tool only once per application.
  • It may be best to have the applicant fix things before further review.

For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.

sakthi_dev’s picture

Status: Active » Needs review
StatusFileSize
new32.77 KB

Please review. Attaching the screenshot as a proof for reviewers.

avpaderno’s picture

Issue summary: View changes
Status: Needs review » Needs work
  • What follows is a quick review of the project; it doesn't mean to be complete
  • For each point, the review usually shows some lines that should be fixed (except in the case the point is about the full content of a file); it doesn't show all the lines that need to be changed for the same reason
  • A review is about code that doesn't follow the coding standards, contains possible security issue, or doesn't correctly use the Drupal API; the single points aren't ordered, not even by importance

list_inline_block.module

/**
 * @file
 * Hook Implemenations of list_inline_block.
 */

The description for a module is Hook implementations for the [module name] module. where [module name] is the module name given in the .info.yml file.

src/Commands/GetBlockList.php

  /**
   * Constructs a new object of \Drupal\list_inline_block\Commands\GetBlockList.
   *
   * @param \Drupal\Core\Database\Connection $database
   *   The database connection.
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
   *   The entity type manager.
   */

The documentation comment for constructors is not mandatory anymore, If it is given, the description must be Constructs a new [class name] object. where [class name] includes the class namespace.

  public function __construct(
    Connection $database,
    EntityTypeManagerInterface $entityTypeManager
  ) {

Function and method declarations are written on a single line.

$link = $this->t('/@type/@id', [
          '@type' => $record->layout_entity_type,
          '@id' => $record->layout_entity_id,
        ]);

Links are not build with $this->t(). Translators should not asked to built that type of link, as there is nothing in that link that depends from the language used for the page.

/src/Controller/ListBlock.php

  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('pager.manager'),
      $container->get('request_stack'),
      $container->get('database'),
      $container->get('entity_type.manager')
    );

There is no need to inject the request stack in a controller, as a parameter type to \Symfony\Component\HttpFoundation\Request for the page method will pass that value to the page method.

sakthi_dev’s picture

Status: Needs work » Needs review

Hi @apaderno, Thanks for reviewing. Updated the changes in 1.0.x dev branch. Please review.
Composer command: composer require 'drupal/list_inline_block:^1.0.x-dev@dev'

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Needs review » Reviewed & tested by the community

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.

I thank all the reviewers.

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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