Extra Block Types (EBT): Core module provides basic functionality for other EBT modules. It contains templates, Field Type, Field Widget, Field Formatter for EBT settings serialized field. It also provides CSS Box settings in DOM inspector style (width/height, paddings, borders, margins).
EBT modules provide ready to use Block types for sliders, carousels, tabs, timelines, etc.
https://www.drupal.org/project/ebt_accordion
https://www.drupal.org/project/ebt_slideshow
https://www.drupal.org/project/ebt_webform_popup

Main feature for all EBT modules is inline CSS styles. You can select colors, padding, margins and options for jQuery plugins and these settings will be used with inline CSS/Javascript on the page. EBT Core doesn't provide template for printing CSS, but other EBT modules print CSS.

Similar project Paragraph Pack:
https://www.drupal.org/project/paragraphs_pack
But EBT modules provide block types and tend to be easy for content managers using Layout Builder.

Project link

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

Git instructions

git clone --branch '1.3.x' https://git.drupalcode.org/project/ebt_core.git

Comments

levmyshkin created an issue. See original summary.

levmyshkin’s picture

Status: Active » Needs work
levmyshkin’s picture

Status: Needs work » Needs review
avpaderno’s picture

Title: [D9] EBT Core » [D9] Extra Block Types (EBT): Core
Issue summary: View changes

Thank you for applying! Reviewers will review the project files, describing what needs to be changed.

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.

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

Since the project is being used for this application, for the time this application is open, only the user who created the application can commit code.

LuongGiap’s picture

Category: Task » Bug report
Status: Needs review » Active

Hi @levmyshkin,
I ran Drupal Check code, you can review and fix it.

$ drupal-check web/modules/contrib/ebt_core
 7/7 [============================] 100%

 ------ -------------------------------------------------------------------- 
  Line   ebt_core.module
 ------ -------------------------------------------------------------------- 
  48     Call to deprecated function drupal_get_path():
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use
           \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead.  
  73     Call to deprecated function drupal_get_path():
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use
           \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead.
  85     Call to deprecated function drupal_get_path():
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use
           \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead.
  97     Call to deprecated function drupal_get_path():
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use
           \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead.
 ------ --------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------
  Line   src\Services\GenerateCSS.php
 ------ -----------------------------------------------------------------------------
  91     Call to deprecated function file_create_url():
         in drupal:9.3.0 and is removed from drupal:10.0.0.
           Use the appropriate method on \Drupal\Core\File\FileUrlGeneratorInterface
           instead.
 ------ -----------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------
  Line   src\Services\GenerateJS.php
 ------ -----------------------------------------------------------------------------
  63     Call to deprecated function file_create_url():
         in drupal:9.3.0 and is removed from drupal:10.0.0.
           Use the appropriate method on \Drupal\Core\File\FileUrlGeneratorInterface
           instead.
 ------ -----------------------------------------------------------------------------

avpaderno’s picture

Category: Bug report » Task
Status: Active » Needs work
LuongGiap’s picture

Status: Needs work » Needs review
StatusFileSize
new68 bytes

Solved deprecated issue, Please review this patch.
Thanks

levmyshkin’s picture

Hi LuongGiap, thank you for your review! I replaced file_create_url(), drupal_get_path() functions and pushed changes in 1.3.x branch:
git clone --branch '1.3.x' https://git.drupalcode.org/project/ebt_core.git

Could you check it again?

avpaderno’s picture

The task of reviewers is pointing out what should be changed in the project, not providing patches.
The purpose of these applications is seeing what the user who applies understands about writing code and what reported in these applications.

LuongGiap’s picture

Status: Needs review » Reviewed & tested by the community

Hi @levmyshkin,
I reviewed it and the bug was fixed.

LuongGiap’s picture

Hi @apaderno,
Thank you for the reminder.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs work
  • What follows is a quick review of the project; it doesn't mean to be complete
  • Each review point doesn't show all the lines that should be changed; it shows a single example of what is wrong in the code
  • The review points are about code that doesn't follow the coding standards, contains possible security issue, or doesn't correctly use the Drupal API; they aren't listed in any particular order, not even in order of importance
    $this->configFactory->getEditable(static::SETTINGS)
      ->set('ebt_core_mobile_breakpoint', $form_state->getValue('ebt_core_mobile_breakpoint'))
      ->set('ebt_core_tablet_breakpoint', $form_state->getValue('ebt_core_tablet_breakpoint'))
      ->set('ebt_core_desktop_breakpoint', $form_state->getValue('ebt_core_desktop_breakpoint'))
      ->set('ebt_core_xsmall_width', $form_state->getValue('ebt_core_xsmall_width'))
      ->set('ebt_core_small_width', $form_state->getValue('ebt_core_small_width'))
      ->set('ebt_core_default_width', $form_state->getValue('ebt_core_default_width'))
      ->set('ebt_core_large_width', $form_state->getValue('ebt_core_large_width'))
      ->set('ebt_core_xlarge_width', $form_state->getValue('ebt_core_xlarge_width'))
      ->set('ebt_core_xxlarge_width', $form_state->getValue('ebt_core_xxlarge_width'))
      ->save();

There is no need to use $this->configFactory->getEditable(); $this->config() returns the same object.

      $source = [
        '#theme' => 'ebt_settings_default',
        '#ebt_settings' => $item->ebt_settings,
      ];

      $elements[$delta] = ['#markup' => \Drupal::service('renderer')->render($source)];
    }

There is no need to render a render array. See LinkFormatter::viewElements(), for example.

  /**
   * {@inheritdoc}
   */
  protected $propertyDefinitions;

{@inheritdoc} isn't used for class properties.

class GenerateCSS implements ContainerInjectionInterface {

A service doesn't implement ContainerInjectionInterface.

core: 8.x
core_version_requirement: ^8 || ^9
package: 'Extra Block Types'

dependencies:
  - drupal:block_content
  - drupal:field_group
  - drupal:media
  - drupal:media_library_form_element

core isn't used anymore.
Two of those modules aren't Drupal core modules. drupal is the namespace for Drupal core modules, not contributed modules.

function _underscore_to_camel_case($string) {
  $str = str_replace(' ', '', ucwords(str_replace('_', ' ', $string)));
  $str[0] = strtolower($str[0]);
  return $str;
}

Function names must be prefixed by the module machine name.

Since the README.txt file contains Markdown markup, its extension should be .md. The file doesn't follow the README template,

levmyshkin’s picture

Hi apaderno, thank you for your review! I fixed all items and pushed changes in 1.3.x current branch:
git clone --branch '1.3.x' https://git.drupalcode.org/project/ebt_core.git

I have a question about bunch of modules which use Extra Block Types (EBT): Core module. Should I create seprate review tickets for them too?

levmyshkin’s picture

Status: Needs work » Needs review
mmjvb’s picture

No, there is no need for separate issues for those modules. This module is used to certify you. As soon as you are you can request those modules to apply for security advisory. Similar to getting your drivers license, once you have it, you can drive any car.

avpaderno’s picture

Yes, mmjvb is correct: This application is necessary only once.
After you are given the necessary Drupal role to opt into security coverage for the projects for which you are maintainer, there isn't any need to apply again, since you will be able to opt into security coverage for every project, not just the one used for this application.

LuongGiap’s picture

Hi @levmyshkin,
I checked , bug was fixed in branch '1.3.x'

LuongGiap’s picture

Status: Needs review » Reviewed & tested by the community

Thanks

avpaderno’s picture

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

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.

Status: Fixed » Closed (fixed)

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