This project provides an SVG icon field which can be part of any content entity. It comes with field plugin, widget and formatter and also an icon service. Icons are on CC0 licence which means it can be used without attribution or permission on commercial and private projects. It also allows to provide own set of icons by a hook_svg_icon_field_categories_alter.

In the future there should be extra options added to define categories and icons by fetching data from an external API and by defining a taxonomy (as category) and icons as custom entity, but that's not part of the current branch.

Here is the screenshot of a widget during adding/editing an entity with the SVG icon field added:
svg icon field

Project link

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

CommentFileSizeAuthor
screenshot_78.png41.57 KBdawid_nawrot

Comments

dawid_nawrot created an issue. See original summary.

vishal.kadam’s picture

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.

vishal.kadam’s picture

Issue summary: View changes
scott_euser’s picture

Status: Needs review » Reviewed & tested by the community

I did an initial review of the module:

  1. It is leveraging core for all filesystem related reading, but the filesystem reads are by default actually anyways just reading folders within the module as they are asset sub-directories.
  2. Unlike other SVG modules, this one is not about uploading SVG's as a user so does not have the security issues related to SVG's in that way.
  3. It does not duplicate other modules. svg_image is focused on user uploaded SVG images. This module is complimentary as it is more about browsing categorised libraries of icons and could one day even provide an integration between it and svg_image
  4. Phpstan/Phpcs/cspell/etc all passing with gitlab ci standard template in place.
vishal.kadam’s picture

Status: Reviewed & tested by the community » Needs work

1. 8.x-1.x-issue-3236682, 8.x-1.x-issue-3236672, 8.x-1.0-alpha1 and 8.x-1.0-alpha2 are wrong names for a branch. Release branch names always end with the literal .x as described in Release branches.

2. FILE: svg_icon_field.libraries.yml

version: VERSION

VERSION is only used by Drupal core modules. Contributed modules should use a literal string that does not change with the Drupal core version a site is using.

3. FILE: svg_icon_field.module

/**
 * @file
 * Contains svg_icon_field.module.
 */

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

4. FILE: README.txt

Replace README.txt with README.md and it should follow the content and formatting described in README.md template.

5. FILE: src/Plugin/Field/FieldWidget/IconWidgetType.php

  /**
   * {@inheritdoc}
   */
  public function __construct(

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.

dawid_nawrot’s picture

I've updated the branch according to your requests.

As for release branches. Branches were never used to create releases for this project. I always used tags. Here is the list of releases:

https://www.drupal.org/project/svg_icon_field/releases

As for branches, I can remove it sure and leave 8.x-1.x, but is it required?

vishal.kadam’s picture

Yes, see the application checklist here. It should follow the naming standards reported in Release naming conventions for branch names

dawid_nawrot’s picture

Ok, I removed all of the dangling branches, so now it's only 8.x-1.x

vishal.kadam’s picture

Remember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.

scott_euser’s picture

Status: Needs work » Needs review

Just checked the MR that Dawid merged in and it looks like that - combined with the branch clean-up - has addressed the issues you raised. Gitlab CI continues to flag no issues.

Having had you @vishal.kadam and me review from utilisation of Drupal core functionality/no unsafe usage of SVG, should we switch to RTBC?

vishal.kadam’s picture

Status: Needs review » Reviewed & tested by the community

Rest looks fine to me.

Let’s wait for a Code Review Administrator to take a look and if everything goes fine, you will get the role.

dawid_nawrot’s picture

Awesome, thanks :)

avpaderno’s picture

Assigned: Unassigned » avpaderno

Thank you for your contribution and for your patience with the review process!

I am going to update your account so you can opt into security advisory coverage any project you create, including the projects you already created.

These are some recommended readings to help you with maintainership:

You can find more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!
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 the dedicated reviewers as well.

avpaderno’s picture

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

Thank you :)

Status: Fixed » Closed (fixed)

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

avpaderno’s picture