tailwindlabs / heroicons

A set of free MIT-licensed high-quality SVG icons for UI development.
https://heroicons.com
MIT License
21.36k stars 1.28k forks source link

Vue 2 support #230

Closed slovenianGooner closed 3 years ago

slovenianGooner commented 3 years ago

Is there a particular reason for the lack of Vue 2 support? Or should we just fork it if need it?

Thanks for these amazing icons.

appinteractive commented 3 years ago

I asume, that is also the reason for my error Ctor.options is undefined 🤔

@sschoger can you confirm, that the components only work with Vue 3 ? If so, please add this to the readme as from the latest @adamwathan poll on twitter, ~45% still using Vue 2 (and thats for new projects). Thanks!

adamwathan commented 3 years ago

Only Vue 3 correct. We might add a Vue 2 library as well since there seems to be demand for it, would welcome a PR.

lossendae commented 3 years ago

Would it be possible to indicate in the documentation that the current Vue components are only compatible with Vue 3 ?

riabiy-denis commented 3 years ago

@adamwathan Laravel Nova is still using Vue 2, sooo...much appreciated :D

iSWORD commented 3 years ago

is there a way to install an older version just to get things going with Vue 2?

ebisbe commented 3 years ago

I guess #235 will not be accepted, right?

adamwathan commented 3 years ago

@vesper8 Man it's not an "attitude", we are just trying our best to make the best decisions with the resources we have available. When we started working on Headless UI, Vue 3 was almost ready to be released. Vue 3 has tons of breaking changes, and it's impossible to build a low level library that supports both Vue 2 and Vue 3, so we had to decide which one to support. We knew the project was going to take like 9 months before we even had a v1, so we decided to focus on Vue 3 because we expected that that would be the go-to version of Vue by the time the library was ready. There's no way we could have guessed that adoption would be so slow, and even now that we know it, it's still hard to know if building a Vue 2 version of Headless UI would be smart, because it would be a completely new library written from scratch where we'd have to solve tons of hard problems without any of the new Vue 3 features that made them possible. It would take months to build, and by the time it was ready Vue 2 will only be less popular than it is now.

On top of that, the whole project is only maintained by one person, and trying to maintain two libraries is already a ton of work. We work 40 hours a week like every else and have families and stuff too, there's only so much you can get done in a day.

On the Heroicons side of things we just haven't gotten a chance to look at the PR for Vue 2 support yet. Yeah it's been a month, but it's not like I've been twiddling my thumbs for a month — we have 547 issues/PRs open across our org and some of those issues take multiple days to solve, plus on top of that we have other important projects we have to work on to keep the commercial side of the business running in order to be able to fund the OSS stuff at all.

So please man don't say this is an "attitude" problem — we are trying our best here. I've spent every day for the last several weeks fixing GitHub stuff, I just haven't gotten to this repo yet because I have to prioritize the things with the highest impact. Heroicons can easily be copy and pasted into a Vue 2 project from heroicons.com, but lots of the open bugs in Tailwind have no workaround at all and need to be fixed urgently.

I will get to the Vue 2 PR here at some point for sure, but in the mean time you can totally fork this repo, merge that patch into your own fork, and publish the library to npm yourself under your own namespace to use until we do it. You have lots of options man, cut me some slack 😕

l-portet commented 3 years ago

I'd also like to use it with Vue 2 as Nuxt isn't on Vue 3 yet.

Meanwhile, you can use vue-hero-icons as a temporary solution.

Thanks for what you're doing @adamwathan :)

adamwathan commented 3 years ago

Hey! I know I said "PR welcome" back in April but recently it's become clear to me that we have to be really careful about what we take on and commit to maintaining, so I think this is better as a separate community-maintained package 👍🏻 Thanks and hope that's understandable.