Entity Ref Bootstrap Accordion / Tab Formatter:

Simple Bootstrap Accordion / Tab Field formatter for field types "entity_reference , entity_reference_revisions".
So it will be available Paragraphs module as well.

No library used except Bootstrap.

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

git clone --branch 8.x-1.x https://git.drupal.org/project/entity_bs_accordion_tab_formatter.git

Comments

netsliver created an issue. See original summary.

PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2902793

Project 2: https://www.drupal.org/node/2902792

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Status: Needs review » Needs work

Git clone command for the sandbox is missing in the issue summary, please add it.

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

netsliver’s picture

Issue summary: View changes
netsliver’s picture

Title: [D8] Entity Ref Bootstrap Accordion / Tab Formatter » [D7 & D8] Entity Ref Bootstrap Accordion / Tab Formatter & Table Bootstrap Formatter
Issue summary: View changes
Issue tags: +filter
netsliver’s picture

Status: Needs work » Needs review
PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgprojectentity_bs_accordion_...

I'm a robot and this is an automated message from Project Applications Scraper.

netsliver’s picture

Status: Needs work » Reviewed & tested by the community
netsliver’s picture

Status: Reviewed & tested by the community » Needs work
PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

netsliver’s picture

Status: Closed (won't fix) » Needs review
nehajyoti’s picture

Hi,

There are numerous Code sniffer and Indentation Issues:
Please fix - https://pareview.sh/node/2616

nehajyoti’s picture

Status: Needs review » Needs work

Hi,

There are numerous Code sniffer and Indentation Issues:
Please fix - https://pareview.sh/node/2616

Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: ...epos/pareviewsh/pareview_temp/js/bootstrap-responsive-tabs/README.md
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
4 | WARNING | Line exceeds 80 characters; contains 418 characters
8 | WARNING | Line exceeds 80 characters; contains 91 characters
--------------------------------------------------------------------------

FILE: ...mp/src/Plugin/Field/FieldFormatter/EntityBSAccordionTabFormatter.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
241 | ERROR | [x] Inline control structures are not allowed
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

netsliver’s picture

Status: Closed (won't fix) » Needs review
netsliver’s picture

Title: [D7 & D8] Entity Ref Bootstrap Accordion / Tab Formatter & Table Bootstrap Formatter » [D7 & D8] Entity Ref Bootstrap Accordion / Tab Formatter & Table Bootstrap Formatter / Webform Simplenews Handler
Issue summary: View changes
Issue tags: +webform

New project Webform Simplenews Handler

apaderno’s picture

Status: Needs review » Needs work

Thank you for your contribution!

We review a single project and a single branch of that project. The purpose of the application is changing the roles assigned to the user who created the project, not the status of the project.

Please choose the branch you want reviewed and edit the application to reflect your choice.

netsliver’s picture

Title: [D7 & D8] Entity Ref Bootstrap Accordion / Tab Formatter & Table Bootstrap Formatter / Webform Simplenews Handler » [D8] Entity Ref Bootstrap Accordion
Issue summary: View changes
netsliver’s picture

Status: Needs work » Needs review
netsliver’s picture

Issue tags: -filter, -webform
netsliver’s picture

Title: [D8] Entity Ref Bootstrap Accordion » [D8] Entity Ref Bootstrap Accordion / Tab Formatter
apaderno’s picture

Issue tags: -field formatter
apaderno’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#2969440: [D8] Table Bootstrap Formatter

Thank you for your contribution!

We just accept one application per user. Any application opened after the first one is closed settings its status to Closed (duplicate).
The purpose of these applications is not reviewing every project, but give users the vetted role, which allows them to change the status of their projects (the ones they already created or the ones they will create).

kiamlaluno credited vuil.

apaderno’s picture

Status: Closed (duplicate) » Needs work
Related issues: -#2969440: [D8] Table Bootstrap Formatter
vuil’s picture

Thank you for the contribution!

Please fix the following issues:

1. Please update your js/bootstrap-responsive-tabs/README.md file - each row can not be exceeds 80 chars per line.

More info: Drupal Coding Standard

2. ESLint has been found some issues related to Javascript coding standard:

/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/bootstrap-responsive-tabs/.eslintrc:
	Configuration for rule "consistent-return" is invalid:
	Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed 'true').

Error: /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/bootstrap-responsive-tabs/.eslintrc:
	Configuration for rule "consistent-return" is invalid:
	Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed 'true').

    at validateRuleOptions (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/config/config-validator.js:109:15)
    at Object.keys.forEach.id (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/config/config-validator.js:156:13)
    at Array.forEach ()
    at Object.validate (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/config/config-validator.js:155:35)
    at Object.load (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/config/config-file.js:559:19)
    at loadConfig (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/config.js:63:33)
    at getLocalConfig (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/config.js:130:29)
    at Config.getConfig (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/config.js:260:26)
    at processText (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/cli-engine.js:224:33)
    at processFile (/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/node_modules/eslint/lib/cli-engine.js:303:18)

3. Please remove implements ContainerFactoryPluginInterface because it exists in the extended FormatterBase.

The class declaration above is in Drupal\entity_bs_accordion_tab_formatter\Plugin\Field\FieldFormatter\EntityBSAccordionTabFormatter.

4. Please add the two parameters ($entity_type_id, $bundle) in the PHPDoc (annotation) because they are missing:

/**
   * Helper function.
   */
  private function getEntityFields($entity_type_id, $bundle) {

5. You can simply use (in public function settingsSummary()):

    return [];

instead of:

    $summary = [];
    // Implement settings summary.
    return $summary;

until you decide the future solution.

6. It is better to handle all possible exceptions which will be raised (eventually) in method viewElements.

7. Please don't use deprecated classes / interfaces as Drupal\Core\Entity\EntityManagerInterface which is deprecated in Drupal 8.0 and is removed from Drupal 9.0.

Please see https://www.drupal.org/node/2549139

8. Please replace your parameter $plugin_definitions to be a parameter:

\Drupal\Core\Field\FieldDefinitionInterface $field_definition

instead of FieldConfig $field_definition.

All points from 3. to 8. are in plugin class EntityBSAccordionTabFormatter.

ankushgautam76@gmail.com’s picture

Fix below issue also :

ankushgautam@GGN-199732-C02ZT1F1MD6V contrib % drupal-check -ad entity_bs_accordion_tab_formatter
4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

------ -------------------------------------------
Line entity_bs_accordion_tab_formatter.install
------ -------------------------------------------
17 Function libraries_get_path not found.
------ -------------------------------------------

------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/EntityBSAccordionTabFormatter.php
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
76 Unsafe usage of new static().
💡 Consider making the class or the constructor final.
179 Method Drupal\entity_bs_accordion_tab_formatter\Plugin\Field\FieldFormatter\EntityBSAccordionTabFormatter::viewElements() should return array but return statement is missing.
201 Call to an undefined method Drupal\Core\Entity\EntityInterface::get().
207 Call to an undefined method Drupal\Core\Entity\EntityInterface::get().
212 Call to an undefined method Drupal\Core\Entity\EntityInterface::get().
214 Variable $style might not be defined.
224 Variable $style might not be defined.
225 Variable $style might not be defined.
237 Variable $style might not be defined.
238 Variable $style might not be defined.
244 Variable $style might not be defined.
254 Variable $style might not be defined.
256 Variable $component_id might not be defined.
257 Variable $style might not be defined.
260 Variable $style might not be defined.
265 Variable $style might not be defined.
266 Variable $component_id might not be defined.
269 Variable $style might not be defined.
270 Variable $style might not be defined.
273 Variable $style might not be defined.
275 Variable $style might not be defined.
281 Variable $style might not be defined.
291 Variable $style might not be defined.
301 Variable $delta might not be defined.
305 Variable $component_id might not be defined.
308 Variable $style might not be defined.
309 Variable $delta might not be defined.
310 Variable $delta might not be defined.
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[ERROR] Found 29 errors

netsliver’s picture

Everything is ok except Call to an undefined method Drupal\Core\Entity\EntityInterface::get() which I don't understand because the code works.

$content = $this->entityTypeManager->getStorage($entity_type_id)->load($id);
...
$title = $content->get($title_field)->getValue()[0]['value'];
shaktik’s picture

Fix below issue :

Shakti-Kumar:entity_bs_accordion_tab_formatter shakti.kumar$ ../../../../vendor/bin/drupal-check -ad .
 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------
  Line   src/Plugin/Field/FieldFormatter/EntityBSAccordionTabFormatter.php
 ------ ------------------------------------------------------------------------
  76     Unsafe usage of new static().
         💡 Consider making the class or the constructor final.
  202    Call to an undefined method Drupal\Core\Entity\EntityInterface::get().
  208    Call to an undefined method Drupal\Core\Entity\EntityInterface::get().
  213    Call to an undefined method Drupal\Core\Entity\EntityInterface::get().
 ------ ------------------------------------------------------------------------


 [ERROR] Found 4 errors
netsliver’s picture

OK it's fixed!

shaktik’s picture

Hi @netsliver,

Tested no error found.

4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

[OK] No errors

apaderno’s picture

Priority: Normal » Minor
apaderno’s picture

Status: Needs work » Needs review

Remember to change status, when the project files have been changes as per reviews. Reviewers don't look at applications whose status is Needs work.

klausi’s picture

Status: Needs review » Fixed

config schema is missing, see https://www.drupal.org/docs/8/api/configuration-api/configuration-schema...

Otherwise looks good to me.

Thanks for your contribution, Sylvain!

I updated your account so you can opt into security advisory coverage now.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, 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.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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