statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
32 stars 1 forks source link

Publish or configure set icon folder #1039

Closed mikemartin closed 8 months ago

mikemartin commented 1 year ago

Would be really great if we could easily publish the folder for the Replicator and Bard set svg icons.

I would expect to publish the icons to /resources/svg/icons/ and then extend it with my own icons.

Alternatively, a simple configuration to set the icon folder would also work but that would involve manually copying the Statamic icons over which is a little more work for the user.

jackmcdade commented 1 year ago

Did you mean to open this FR 5 times?

mikemartin commented 1 year ago

@jackmcdade Oh did it? I was using the GitHub app and it wasn’t saving. I guess it did. 🙈

mikemartin commented 1 year ago

@jackmcdade I've closed the other issues. What an awful way to get your attention. 🤣

duncanmcclean commented 8 months ago

You're now able to customize the directory used for the Replicator & Bard set icons (see statamic/cms#8931).

Choose a different icon set for bard/replicator set icons...

\Statamic\Fieldtypes\Sets::setIconsDirectory(folder: 'light');

Choose a different base directory altogether...

\Statamic\Fieldtypes\Sets::setIconsDirectory(directory: resource_path('custom-icons'));
mikemartin commented 8 months ago

This is rad. Thanks @duncanmcclean!