jonassiewertsen / statamic-livewire

A Laravel Livewire integration for Statamics antlers engine
83 stars 14 forks source link

Any plans for v3? #31

Closed afonic closed 11 months ago

afonic commented 1 year ago

Hello all!

This is not really an issue but I was wondering if there are any plans to update this to work with Livewire v3. I've seen a comment by @jonassiewertsen that he doesn't use Antlers & Livewire anymore and since we are starting a major rewrite of a component in Livewire v3 I am trying to see what options we have.

Thanks!

robdekort commented 1 year ago

Curious as well. Maybe this should become an addon for the Rad Pack if Jonas doesn't / can't support it anymore.

jonassiewertsen commented 1 year ago

I am on holiday right now, but still thinking about the best way to support Version 3:

Using it in Antlers is a great feature, but much slower than in Blade, especially if working with big templates. I build the Antlers support some time ago, when the Blade support has only been really basic. Today it's much better.

What's your take on this? Should it still support Antlers? Is it used in Antlers at all? Is it used a lot in Antlers?

Getting some insights might help to determine, if we should keep up the Antlers support or if it should be dropped.

robdekort commented 1 year ago

I solely use Livewire with Antlers. And with the runtime parser it's blazing fast. So I'd def. prefer Antlers support myself.

afonic commented 1 year ago

Enjoy your holiday, Livewire can wait!

We're also using it exclusively with Antlers. I think using Statamic + Blade you could probably just use Livewire v3 even without this plugin, no? That's a nice project for the weekend. 😄

For me the best feature is that you can install this and just use Livewire in your Antlers website. This makes much more sense for additional components development where a user usually adds something to an already developed site. Mix and matching Blade and Antlers (ex. using Blade just for Livewire components) while it usually works, it can often lead to shortfalls, especially if you use things like stacks.

And even though it's not my decision to make, @robdekort's suggestion about adding this to the Rad Pack makes sense since I feel that Livewire is about the take off even more, with the addition of Volt and the closer integration with the official Laravel channels. Statamic "officially" supporting Livewire at the frontend would be a great selling point.

robdekort commented 1 year ago

Ik think so too @afonic. And indeed: enjoy your vacation @jonassiewertsen. ❤️

marcorieser commented 1 year ago

Have used Livewire so far with Antlers, as well as Blade. In the context of Statamic, however, I want to use only Antlers in the future. Therefore, I also vote for the support of v3.

Offering it as a Rad Pack addon sounds great too. I could also see myself helping with maintaining it.

Furthermore, it can be combined with the Antlers Components Addon by @Stillat. It might also be interesting to see what his plans are now that v3 and Volt is around the corner. Could also be a combined addon in my opinion.

Either way, a v3 integration with Antlers would be very desirable!

marcorieser commented 1 year ago

Using it in Antlers is a great feature, but much slower than in Blade, especially if working with big templates. I build the Antlers support some time ago, when the Blade support has only been really basic. Today it's much better.

I assume that you have taken measurements at Spiegel. Do you always use Blade instead of Antlers? Is Blade faster than Antlers in general or does that only apply to the Livewire part?

sheldonkotyk commented 12 months ago

I'd prefer an antlers implementation as well.

marcorieser commented 12 months ago

Started a PR for v3 yesterday: #32 Not finished yet. Especially the caching part but my components get rendered by v3. Open for discussion and @jonassiewertsen: just let me know if you don't want me to continue or if you have other plans. Whatever...

jonassiewertsen commented 11 months ago

Thanks for the PR @marcorieser

The feedback is excellent: We need a Antlers implementation, which is 100% clear now. Thanks for answering!

I'll get to it as soon as possible.

aerni commented 11 months ago

We should maybe also register localized routes based on the configured Statamic sites. I haven't tested if the new behavior causes any issues with Statamic multi-sites. But it might. So just a heads up. https://livewire.laravel.com/docs/upgrading#localization

marcorieser commented 11 months ago

We should maybe also register localized routes based on the configured Statamic sites. I haven't tested if the new behavior causes any issues with Statamic multi-sites. But it might. So just a heads up. https://livewire.laravel.com/docs/upgrading#localization

Wondering if this should be managed by the addon automatically (and maybe configurable / disableable) or if the users should take care of this themselves?

jonassiewertsen commented 11 months ago

https://github.com/jonassiewertsen/statamic-livewire/releases/tag/v3.0.0-beta.1

aerni commented 11 months ago

Wondering if this should be managed by the addon automatically (and maybe configurable / disableable) or if the users should take care of this themselves?

If this behavior breaks Statamic multi-sites, I believe it makes sense to make it part of this addon. If multi-sites work as expected, then it shouldn't be part of this addon.

jonassiewertsen commented 11 months ago

I agree.

Is anybody using Livewire in a multi-site context?

It would be best to have a real-world issue. That's why it's a beta version, so we can fix edge cases like multi-sites etc.

aerni commented 11 months ago

I quickly tested on a sample multi-site with a simple form component with validation. The validation messages are translated as they should be. This was my main concern.

There might be more complex scenarios where Livewire's new route behavior might inflict issues. I don't have a bigger real-world multi-site Livewire project to test on, though. I think we can disregard this for now and come back to it if someone raises an issue.

jonassiewertsen commented 11 months ago

Sounds good to me and thanks for tesing!

sheldonkotyk commented 11 months ago

I've got a 40+ multi-site. What specifically needs to be tested?