Skip to content

[Icons] Add support for icon aliases during icon:lock command #2354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jvancoillie opened this issue Nov 9, 2024 · 1 comment · Fixed by #2356
Closed

[Icons] Add support for icon aliases during icon:lock command #2354

jvancoillie opened this issue Nov 9, 2024 · 1 comment · Fixed by #2356

Comments

@jvancoillie
Copy link
Contributor

Context

Currently, the IconFinder only scans templates to identify used icons, using the following regex:

$token = '[a-z0-9]+(?:-[a-z0-9]+)*';
$pattern = "#(?:'$token:$token')|(?:\"$token:$token\")#i";

This approach means that only icons directly referenced in templates are locked when running the icon:lock command.

Problem

Some icons are defined as aliases in the ux_icons configuration file. These aliased icons are not detected by IconFinder and therefore are not locked automatically, which can lead to inconsistencies during deployment.

Request

Would it be possible to add support for scanning icon aliases defined in the ux_icons file, in addition to using the regex to search templates? This enhancement would ensure that all icons actually used in the application are properly locked.

@jvancoillie jvancoillie added the RFC label Nov 9, 2024
@carsonbot carsonbot added the Icons label Nov 9, 2024
@jvancoillie jvancoillie changed the title [RFC][Icons] Add Support for Icon Aliases During icon:lock Command [Icons] Add Support for Icon Aliases During icon:lock Command Nov 9, 2024
@jvancoillie jvancoillie changed the title [Icons] Add Support for Icon Aliases During icon:lock Command [Icons] Add support for icon aliases during icon:lock command Nov 9, 2024
smnandre added a commit to smnandre/ux that referenced this issue Nov 9, 2024
@smnandre
Copy link
Member

smnandre commented Nov 9, 2024

Hello @jvancoillie ! You can check #2356 it should fix things for you

Nice catch and good idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants