CorentinTh / it-tools

Collection of handy online tools for developers, with great UX.
https://it-tools.tech
GNU General Public License v3.0
23.1k stars 2.8k forks source link

fix(dependency) Icon overhaul / Replace @vicons/tabler & MDI with @tabler/icons-vue #1373

Open gitmotion opened 3 weeks ago

gitmotion commented 3 weeks ago

@CorentinTh

Related to: https://github.com/CorentinTh/it-tools/pull/1369

Unsure about the duplication of icons lib, but it seems tree shaked so no big deal for now

Icon overhaul for consistent theming:

@tabler/icons-vue @vicons/tabler
Tree-Shaking and Bundle Size This library is designed specifically for Vue 3 and optimized for tree-shaking. It includes each icon as an individual component, making it easy for build tools like Vite or Webpack to only include the icons you actually use, keeping the final bundle size smaller. Also supports tree-shaking but is part of the @vicons collection, a wrapper for multiple icon packs. While it can be tree-shaken, the structure might include more metadata or common code shared across different icon libraries, which may lead to slightly larger bundle sizes when using multiple icons.
Rendering Efficiency These icons are implemented as native Vue components, which allows for more efficient DOM updates and state management. Icons can be customized directly with props like size and color, without requiring additional wrapper components. Provides a consistent API across different icon sets, but the generic approach may lead to slightly more overhead when rendering in Vue. However, it still provides good performance, as it’s designed to be lightweight.
Dependency Size and Installation Generally, this package tends to have fewer dependencies since it’s purpose-built for Vue 3 and Tabler icons. Installation sizes are typically smaller, and it’s less likely to pull in extra dependencies that aren’t essential to its core functionality. Since it’s part of a larger, multi-library package, there can be more dependencies, especially if you’re using other libraries from @vicons. While they’re generally minimal, it might increase installation time and disk usage.

Before Vs. After

Most icons had direct equivalents - below is a visual representation of example changes or updated representations of their former/previous icon with "biggest" differences: | **Previous Icons** | **Updated Icons** | |--------------------|-------------------| | ![Previous Icon 1](https://github.com/user-attachments/assets/2a8d63af-1971-41c8-834d-0641efe8f67b) | ![Updated Icon 1](https://github.com/user-attachments/assets/5b911a2c-4e8e-41a6-b9c8-a2fa1bdefabd) | | ![Previous Icon 2](https://github.com/user-attachments/assets/e736ea17-1540-40ce-843e-667ceaa28d67) | ![Updated Icon 2](https://github.com/user-attachments/assets/359dc35d-04bc-4cb4-b7e8-8fb7728cef42) | | ![Previous Icon 3](https://github.com/user-attachments/assets/a31c4eaf-92b6-4b6d-95da-d4ab71abc976) | ![Updated Icon 3](https://github.com/user-attachments/assets/980c5624-974c-4c29-9e45-a5d276aeb145) | | ![Previous Icon 4](https://github.com/user-attachments/assets/d8030f49-0556-4803-bfdf-3584da6cdc16) | ![Updated Icon 4](https://github.com/user-attachments/assets/6cdff025-0942-4533-88b4-f752be7b0860) | | ![Previous Icon 5 (dev only)](https://github.com/user-attachments/assets/fdd375ec-7b40-4650-afc7-50d019faa336) | ![Updated Icon 5 (dev only)](https://github.com/user-attachments/assets/b6d4388f-aec1-486f-b045-e55eb9766094) |

For Devs:

You can now find a full list of all available icons at: https://tabler.io/icons as a single source of truth for icons | ![image](https://github.com/user-attachments/assets/d1b65624-fa9e-423d-b29f-f33b346de66d) | ![image](https://github.com/user-attachments/assets/fed12196-3ed5-44e5-a0bb-9fea40dcba4e) | |--------------------|-------------------| | [tabler.io/icons](https://tabler.io/icons) | VSCode Intellisense |
vercel[bot] commented 3 weeks ago

@gitmotion is attempting to deploy a commit to the Corentin Thomasset's Team Team on Vercel.

A member of the Team first needs to authorize it.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud