-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
[Icons] allow configuring multiple local directories and optionally prefixing them #1596
base: 2.x
Are you sure you want to change the base?
Conversation
I need something similar for the rendering options... in the end we maybe will need to merge the syntax into something a bit more complex, lire the transports, or the doctrine connections. I guess thoses are "read-only" ? (as we won't be able to write in "vendors" with the import command) |
->scalarNode('icon_dir') | ||
->info('The local directory where icons are stored.') | ||
->defaultValue('%kernel.project_dir%/assets/icons') | ||
->arrayNode('icon_dir') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I rename this to icons_dirs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe paths
if they can be relative?
Something like? ux_icons:
icon_dir:
- path: some/path
prefix: fa
readonly: true
more: ...
All but the first one, yeah. We could make configurable as shown above. |
ux_icons:
paths:
vendor/fortawesome/font-awesome/svgs: fa ? ... then normalize to |
Also, it seems the concept is pretty close to Twig namespaces. It could be good if we reuse same concept that we already know, so "prefix" could be named "namespace" and the usage could |
I'd use the "prefix" as key, like a namespace. As it's the only thing we need to garantee the unicity. So maybe dfgdfsdfd: # word i don't have; set ? packs ? groups ? ns ?
bi:
path: assets/bootstrap
ld:
alias: lucide
bi-reg:
dir: vendor/fortawesome/font-awesome/svgs: Do you agree to make it the "primary key" ? |
Yeah, prefixing with a key seems best - this will allow choosing the path to import into when using the import command. And @yceruto, namespacing is an interesting idea. Maybe something like: ux_icons:
paths:
default: some/path
fa:
path: vendor/some/path
readonly: true
namespace: fa About the |
I'd say...
Regarding "name/identifier":
|
How can we move on this ? What do you need @kbond ? Or can maybe start in parralel the attributes configuration per directory and we see later how to merge ? |
I think we need to allow a directory even when a prefix is used. For instance, |
Configure multiple paths:
Additionally, you can suffix the path with
@<alias>
to add a prefix for icons in this directory:Now you can render icons in this directory by prefixing the name with
fa:
: