-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update ComponentsService.php #14
Update ComponentsService.php #14
Conversation
Added the ability to pass a full namespace into the sprig tag.
I see where you’re coming from, but the idea is that all Sprig components share the same namespace and therefore live in the same folder, similar to front-end templates. |
Is there any way we can add a hook so this can be overridden? I need this
for client plugins, but I understand not wanting to add it to the core.
…On Mon, May 13, 2024 at 11:39 AM Ben Croker ***@***.***> wrote:
I see where you’re coming from, but the idea is that all Sprig components
share the same namespace and therefore live in the same folder, similar to
front-end templates.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC3XVIATJEH35GP2LB3KPDZCDNBTAVCNFSM6AAAAABHUFYDJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBYGA2DGOBTGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
No, this is currently not modifiable. Can you perhaps help me understand your use-case so I can consider it? |
Ideally reusable internal plugins using Sprig, so it would be nice to keep
the namespace inside of the plugins so I can drop into multiple client
projects.
…On Mon, May 13, 2024 at 11:48 AM Ben Croker ***@***.***> wrote:
No, this is currently not modifiable. Can you perhaps help me understand
your use-case so I can consider it?
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC3XVPZ3X3KZ3SRLWWYZKLZCDOD3AVCNFSM6AAAAABHUFYDJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBYGA3TCMZQGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
That makes sense. I opted to make the namespaced component class a fallback, rather than a priority, in 4695cea. Can you take a look and let me know if that works for you? |
That's great, thank you!
…On Mon, May 13, 2024 at 12:18 PM Ben Croker ***@***.***> wrote:
That makes sense. I opted to make the namespaced component class a
fallback, rather than a priority, in 4695cea
<4695cea>.
Can you take a look and let me know if that works for you?
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC3XVMBCBFZQC54Z7OQESLZCDRXBAVCNFSM6AAAAABHUFYDJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBYGEZTGMJZGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Added the ability to pass a full namespace into the sprig tag.
This use case would be in the case of having a class component in a custom plugin/module and wanting to keep the code in the same namespace.
As an example:
{{ sprig("\modules\sprig\ClassComponent" }}