woodpecker-ci / woodpecker

Woodpecker is a simple yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
3.88k stars 345 forks source link

Remove `unplugin-icons` #3809

Open qwerty287 opened 1 week ago

qwerty287 commented 1 week ago

Instead, directly import icons.

qwerty287 commented 1 week ago

I somehow need to use a different way as tsc does not work with it: https://ci.woodpecker-ci.org/repos/3780/pipeline/17397/29

What do you think about using the icon sets directly instead of a "meta" package like iconify/unplugin-icons? We mostly use MDI only anyways.

anbraten commented 1 week ago

In the docs its says you have to add this to the tsconfig:

// tsconfig.json
{
  "compilerOptions": {
    "types": [
      "unplugin-icons/types/vue",
    ]
  }
}
qwerty287 commented 1 week ago

I'm currently working on migrating to the native mdi icons. This has some advantages, for example we don't have to download the whole iconify set every time (~120 MB)

anbraten commented 1 week ago

Would actually try to stick to iconify as its pretty handy and flexibel. You can just change the import from @iconify/json to @iconify-json/mdi

qwerty287 commented 1 week ago

Finished it in https://github.com/woodpecker-ci/woodpecker/pull/3809/commits/e440ea73c78a78dd1ea100ee66136e6d87eb204d.

I can revert it - but I don't really understand what you mean be "flexible". It's only flexible as long as you install all sets and that's explicitly what I not want to do

anbraten commented 1 week ago

I can revert it - but I don't really understand what you mean be "flexible". It's only flexible as long as you install all sets and that's explicitly what I not want to do

unplugin-icons has a quite unified way for importing different iconsets and seems to be well maintained in comparison to @jamescoyle/vue-icon (last update 3 years ago). I don't see a reason why we should replace it. 🤔 (Also really like the index)

qwerty287 commented 1 week ago

unplugin-icons has a quite unified way for importing different iconsets

Yes, but do we need that? We only use MDI, two icons from simple icons and one loading spinner. In terms of consistency it's even a bad idea to use more than one iconset (except special icons like brands). Is it really helpful to have such a library that requires a Vite plugin and special ts config? It's always better to use a "native" approach if possible I'd say.

seems to be well maintained in comparison to @jamescoyle/vue-icon (last update 3 years ago).

I know, but it's actually just a single vue file. Removing this is not a big problem, I wanted to do that later

(Also really like the index)

Huh why a link to icones? The index is https://icon-sets.iconify.design/