-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remove @astrojs/lit #11680
Remove @astrojs/lit #11680
Conversation
This removes the Lit integration as an official integration. The reasons for doing so in 5.0: - Only 1% of Astro users use this integration. - SSR support in Lit is at a lower-level of support due to be a Labs project: https://lit.dev/docs/libraries/labs/, and has been in this state since we added support a couple of years ago. - The maintenance cost of fixing bugs in this integration is too high given the low usage. Some PRs for upgrading Lit versions have taken quite a long time. We can't justify the core team being responsible for this going forward. - There used to be community contributions to fix bugs but this has fallen off for various reasons. Given that, this PR removes the integration as one that is officially supported by the Astro core team. Interested community members are encouraged to fork the integration and continue the development in another repository.
|
There's a hack here you might be able to remove too:
(there's also a mention of the integration in that same file) |
in packages/astro/src/runtime/server/render/component.ts there's also a mention of the integration for the error message |
Please don't remove Lit, this small lib has not alternative. SSR support is on the way. FYI @justinfagnani |
That's unfortunate, I have been actively using this integration for the past 2 years. Lit support was the main reason for choosing to try out Astro in the first place. Does that mean we won't be able to use lit with Astro 5? |
I was drawn to Astro because of Lit and its philosophy, so it's a bit unfortunate to see Lit support phased out in Astro 5, though I understand the reasons behind it :/ Now, let's create some extremely exciting code with React (yes, irony ahah) |
Note that it's most definitely allowed and encouraged to fork the integration and continue using it in Astro 5, it should work just fine. |
You cannot know this for certain, your telemetry of usage can only see what is reported. The ratio of people who choose not to provide telemetry data, to those who do allow telemetry reporting, is probably quite high among the demographic of people who would use Lit instead of React, Svelte, or Vue, all of whom have privacy implications built in to them. A great number of EU users, and an increasing number of US users, are not keen on allowing Facebook a backdoor to their website just to compile React, for example. Just as well, 1% of 100,000 users is 1000 users.
There is a community for these things, and you all used to operate as a nice open source stack community, but is that no longer happening?
I'm guessing then is it time to fork the whole project, now that this has become official? It seems that there are legitimate concerns that would go unaddressed without some dedicated people working on it--those people could be volunteers, or if there are companies who depend on the integration, they could put dev resources into maintaining the parts that suit them--, in the least the community could have been asked to support this before killing it, as is the tradition in open source software dev. |
The Lit integration gets 2-3k downloads per week on npm, stat which you cannot opt-out of, outside of complex setups. Matthew also summarised our numbers at 1%, but it's in truth lower than that. A 1000 active users would be amazing. Last month, The Lit integration is fairly small (something like 300 lines roughly, I believe) and we have asked around for people to fork and support it in the community, it should definitely be doable for anyone motivated enough. Bonus point for any companies using it. A few years ago the Lit team was interested and used to send PRs, but I'm not sure if those people still work at Google. Anedoctally, from asking around and support threads, we've also found that people sometimes used the Lit integration only for the Lit part and not really the SSR, making the integration not useful (and actually making the components made with it worse, as they went through an unnecessary wrapper). In both cases however, you can still use Lit and Lit SSR directly without a dedicated integration, though for the latter it might be less ergonomic. We're sorry for the inconvenience, in a perfect world, we'd maintain everything. |
I think it's mainly the feeling of disappointment about yet another project that drops support for Lit. I've been a staunch Lit advocate for many years now and it always feels like we are swimming against the current. I really wish more people saw the value proposition Lit provides and that more people used it, but that's unfortunately not the case and I completely understand when projects don't want to dedicate resources for such a small user base. The only thing I will say is, that small user base greatly appreciates the work you have done to give Lit a home within Astro, and although it does hurt to lose official support, hopefully we can figure out a path forward to ensure Lit keeps its place within Astro. |
Thank you @Princesseuh
I understand, and this makes sense. There's probably not that much benefit to the SSR integration, agreed. Since Lit is basically web components made ergonomic, I do think that it could still be seen as a baseline way to deal with client-side script without resorting to suggesting loading React or Vue, which do seem to somewhat undermine the whole point of Astro. So, this is a super pertinent point you make.
I understand and appreciate that you've at least put a lot of thought and consideration into the decision. It probably isn't as inconvenient as I initially suspected, as you pointed out; and as @kr05 mentioned, it's probably mostly just the disappointment of yet another project dropping support for Lit. 🔭...At risk of tangenting into ticket-scope-creep.... I think it would be ideal that Lit be the de facto method of demonstrating islands and client side interaction in Astro, given its lightweight nature and that you don't need to know or understand React or Vue to get there. That adjustment might even have a complementary effect of making Astro more approachable generally, especially to people who don't prefer React. Then the use of Vue and React become dressing, and not default. As well, it would highlight the framework agnostic nature of Astro better than demoing React. I'd note that a lot of UI libraries and templates for Astro are really just React and so don't take advantage of Astro very well, and still require me to load React into my project, and that's frustrating. (I'm specifically using Astro because it is not React and Vue, and I don't often need to reach for Lit... but there are times when client-side interaction is necessary, so I find the tutorials referencing React to be cumbersome and prevalent. This is verging on a whole other issue. I'm happy to create a new ticket if this is not the place for this documentation discussion, but it felt relevant. 🙏🏼) |
I like and use Lit often. I never personally used it in Astro though. If I did I would be maintaining an integration for it. It's really not that difficult, just a small amount of code, and you already have the existing code to start from. The fact that there isn't one already is because no one is motivated enough to do the very small amount of work required. Such is life. |
Changes
This removes the Lit integration as an official integration. The reasons for doing so in 5.0:
Given that, this PR removes the integration as one that is officially supported by the Astro core team. Interested community members are encouraged to fork the integration and continue the development in another repository.
Testing
Docs