Problem/Motivation

In #3517033: Add a style utility API, I realized that it was not possible to reference a library which contains a dot in an icon pack.

Libraries with dot are quite common, so it should be possible.

Steps to reproduce

Declare an icon pack with:

library: core/ckeditor5.alignment

Obtain:

Drupal\Core\Theme\Icon\Exception\IconPackConfigErrorException: ui_suite_bootstrap:bootstrap Error in definition `bootstrap`:[library] Does not match the regex pattern ^\w+/[A-Za-z]+[\w-]*$ in Drupal\Core\Theme\Icon\Plugin\IconPackManager->validateDefinition() (line 430 of core/lib/Drupal/Core/Theme/Icon/Plugin/IconPackManager.php).

Proposed resolution

Allow dot in the regex

Remaining tasks

- Update JSON schema
- Add tests.

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

Needed?

Issue fork drupal-3553601

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review
gxleano’s picture

It looks good to me @grimreaper!!

gxleano’s picture

Status: Needs review » Reviewed & tested by the community

nod_’s picture

Category: Feature request » Task
Status: Reviewed & tested by the community » Fixed

Committed and pushed adddba60e2b to 11.x and d5fe4c8715d to 11.2.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • nod_ committed d5fe4c87 on 11.2.x
    Issue #3553601 by grimreaper, gxleano: Icon API: Allow dot in library
    
    (...

  • nod_ committed adddba60 on 11.x
    Issue #3553601 by grimreaper, gxleano: Icon API: Allow dot in library
    
grimreaper’s picture

Thanks for the quick merge :)

Status: Fixed » Closed (fixed)

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