Skip to content
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

Drop Antlers support after all? #39

Closed
aerni opened this issue Sep 19, 2023 · 14 comments
Closed

Drop Antlers support after all? #39

aerni opened this issue Sep 19, 2023 · 14 comments
Labels
question Further information is requested wontfix not related to the addon itself

Comments

@aerni
Copy link
Contributor

aerni commented Sep 19, 2023

Given the latest addition of the @antlers Blade directive, I'm very curious if there is any reason to keep supporting Antlers with this addon? I've been exclusively using Blade with Livewire for a while, because Antlers is just too limiting in some advanced scenarios. With Antlers you also have to rebuild Livewire features as tags, e.g. entangle. With the new @antlers directive, you can have the best of both worlds.

Just opening the discussion around this topic. I haven't done any testing. In theory, this addon could be reduced to a simple tag to include a Livewire component in an Antlers view.

@edalzell
Copy link

In theory, this addon could be reduced to a simple tag to include a Livewire component in an Antlers view.

With the new tag do you even need this package, cuz then it would be the same as this? https://github.com/Stillat/antlers-components#livewire-components

@aerni
Copy link
Contributor Author

aerni commented Sep 19, 2023

That's an excellent point. I wasn't aware of that addon. Curious to hear Jonas' thoughts.

@jonassiewertsen
Copy link
Owner

This has been my wanted approach in the first place, but I got the response that people want to use Livewire wirh Antlers. So here we are 😇

#31 (comment)

@jonassiewertsen
Copy link
Owner

jonassiewertsen commented Sep 19, 2023

On top of that: This addon brings synthesizers in a experimental state to the table.

I am unsure how and if it‘s getting used, but it offers a great value to the comunity on seeing how it works.

with those provided it‘s easy to copy, paste and adjust as needed, if helpful in your application.

@jonassiewertsen
Copy link
Owner

That's an excellent point. I wasn't aware of that addon. Curious to hear Jonas' thoughts.

Yes. If not using Livewire with blade or if not using synthesizers, you don‘t need this package for livewire to work wirh auto registering those tags (which feature i dont like that much. Too much magic)

@edalzell
Copy link

So this addon could be a wrapper around the blade directive and synthesizers for the data, like Entry, Term, etc

@marcorieser
Copy link
Collaborator

marcorieser commented Sep 20, 2023

@edalzell @aerni just a quick note. The antlers components package depends on this one (at least the Livewire part and at least for now).

@robdekort
Copy link
Contributor

robdekort commented Sep 20, 2023

How would the proposed thing work? You would use blade components, wrapping all Antlers in Antlers tags so you can write Antlers, except the parts where you use entangle etc? Or am I misunderstanding?

Me not following along with this discussion, makes me wonder - and a bit frightened for - how complex this proposed solution could be, but I really can't judge this stuff as I really don't understand it. However, I remember Marco explaining to me you can already use Livewire magic like entangle and this by using the Alpine code it translates to when using the Blade directives for them. One thing I should probably do is try Blade for my next Livewire component. 😬

Last but not least, of course I don’t want to burden anyone with the maintenance Antlers would require.

@jonassiewertsen jonassiewertsen added wontfix not related to the addon itself question Further information is requested labels Sep 20, 2023
@jonassiewertsen
Copy link
Owner

Thanks for all the feedback and thoughts on this question. I appreciate the discussion and the honesty in this discussion. ❤️

It feels like this discussion is about the meaning of this addon. What should it achieve? What should it be good at? Where should it help to do its magic, and where don't?

In my eyes, this is a solid request, but it does not serve the purpose of this addon and is against what this addon always did and what it's being used like by the community: #31 (comment)

It has been its key feature to support Livewire in Antlers because this is simply beautiful and simple. I want to keep that simplicity.

You can use the @antlers blade directive of course, which i a nice way to do so. You need to know Blade, though. Not everybody working with Statamic does or does not want to mix Antlers and Blade, especially for simple Livewire tasks.

The synthesizers are nice too. Everybody should feel free to use the one from this addon as a great starting point and adjust those depending on your needs. If you want to. Feel free to add more of those via a PR, if you are using them and want to use them in the future.
Disabling those as default does avoid overhead by not loading them at all. So it will not slow down your application.

I feel best by keeping the antlers syntax, as it's simply beautiful and if you need a complex setup with blade only, you can avoid this addon completely if you want. So I don't see those two ways fighting each other, I only see this addon helping out if you want it to.

Using entangle and this does not work with Antlers at the moment. This might be an improvement, but maybe it's fine too?

I'll keep this Issue open for the next couple of days. Feel free to try changing my mind. At this point in time, I like having the Antlers support. Feel free adding to this discussion with your own opinion.

@marcorieser
Copy link
Collaborator

Using entangle and this does not work with Antlers at the moment. This might be an improvement, but maybe it's fine too?

How do you mean? I believe these two are working.

@jonassiewertsen
Copy link
Owner

With Antlers you also have to rebuild Livewire features as tags, e.g. entangle.

Haven't used them with the Antlers syntax myself. So it's just something missing in the docs?

@marcorieser
Copy link
Collaborator

With Antlers you also have to rebuild Livewire features as tags, e.g. entangle.

Haven't used them with the Antlers syntax myself. So it's just something missing in the docs?

https://github.com/jonassiewertsen/statamic-livewire#this-accessing-the-livewire-component
https://github.com/jonassiewertsen/statamic-livewire#entangle-sharing-state-between-livewire-and-alpine

@jonassiewertsen
Copy link
Owner

😂 perfect! I should read that documentation more often myself.

In that case I don't know about any edge cases, where there are issues with entangle or why this needs to be rewritten.
I am sure @aerni has a solid point, but I am not aware of open issues in that case, as the last entangle issue has been resolved.

#7

@aerni
Copy link
Contributor Author

aerni commented Sep 20, 2023

I was using @entangle as an example for Blade directives that would need to be ported to Antlers. I don't have a particular use case in mind. I just found it interesting that you can now use Antlers within Blade using the new @antlers directive. This got me thinking about why we need to copy the Blade functionality into Antlers tags.

But your point is fair! In my opinion, this addon's place is to have a great integration with Statamic and Livewire, like the experimental synthesizers. If people find the Antlers tags useful, then there's no reason to remove them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix not related to the addon itself
Projects
None yet
Development

No branches or pull requests

5 participants