Skip to content
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

iconifyのアップデート #201

Merged
merged 1 commit into from
Jul 19, 2024
Merged

iconifyのアップデート #201

merged 1 commit into from
Jul 19, 2024

Conversation

sh0go07
Copy link
Collaborator

@sh0go07 sh0go07 commented Jul 19, 2024

User description

close #200


PR Type

Enhancement, Dependencies


Description

  • @iconify/vueを使用するようにアイコンコンポーネントをリファクタリングしました。
  • 不要な@purge-icons/generatedのインポートを削除しました。
  • vite-plugin-purge-iconsを削除し、Vite設定を簡素化しました。
  • パッケージ依存関係を更新し、不要なパッケージを削除しました。

Changes walkthrough 📝

Relevant files
Enhancement
AIcon.vue
`@iconify/vue`を使用したアイコンコンポーネントのリファクタリング                                   

src/components/UI/AIcon.vue

  • @iconify/vueを使用するように変更
  • computedスタイルの削除
  • Iconコンポーネントの使用
+3/-13   
main.ts
不要なインポートの削除                                                                                           

src/main.ts

  • @purge-icons/generatedのインポートを削除
+0/-1     
vite.config.ts
不要なViteプラグインの削除                                                                                   

vite.config.ts

  • vite-plugin-purge-iconsの削除
+1/-2     
Dependencies
package-lock.json
パッケージ依存関係の更新                                                                                         

package-lock.json

  • @iconify/iconifyと関連パッケージの削除
  • @iconify/vueの追加
  • vite-plugin-purge-iconsの削除
  • +25/-251
    package.json
    パッケージ依存関係の更新                                                                                         

    package.json

  • @iconify/iconifyと関連パッケージの削除
  • @iconify/vueの追加
  • vite-plugin-purge-iconsの削除
  • +1/-3     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    コードのリファクタリング
    @iconify/vueを使用してアイコンコンポーネントがリファクタリングされました。新しいIconコンポーネントの使用が適切に行われているか、プロパティのバインディングが正しく設定されているかを確認してください。

    不要なインポートの削除
    @purge-icons/generatedのインポートが削除されました。これによる影響が他のファイルやコンポーネントにないか確認が必要です。

    プラグインの変更
    vite-plugin-purge-iconsが削除され、VuePluginのみがプラグインとして設定されています。設定の変更によるビルドや実行時の問題がないか確認してください。

    Copy link

    github-actions bot commented Jul 19, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    @iconify/vue のバージョン更新に伴う互換性の確認を提案します。

    @iconify/vue
    のバージョンが更新されていますが、依存関係における他のパッケージとの互換性を確認することをお勧めします。特に、メジャーバージョンの更新がある場合は、破壊的変更が含まれている可能性があるため、注意が必要です。

    package.json [24]

    -"@iconify/vue": "^4.1.2",
    +"@iconify/vue": "^4.1.2",  // 互換性の確認後、問題がなければこのまま使用
     
    Suggestion importance[1-10]: 8

    Why: The suggestion is important as it emphasizes the need to check for compatibility issues when updating package versions, especially for major updates that might introduce breaking changes.

    8
    Enhancement
    コンポーネントのサイズプロパティにデフォルト値を設定して、柔軟性を向上させます。

    コンポーネントの :width:height プロパティにバインドされている size プロパティは、デフォルト値として 24
    が設定されていますが、この値はプロップスのデフォルト値として設定されるべきです。これにより、コンポーネントの再利用性が向上し、外部からサイズを動的に設定できるようになります。

    src/components/UI/AIcon.vue [15]

    -<Icon :icon="name" :class="$style.icon" :width="size" :height="size" />
    +<Icon :icon="name" :class="$style.icon" :width="size || 24" :height="size || 24" />
     
    Suggestion importance[1-10]: 7

    Why: The suggestion correctly identifies that setting a default value for the size prop directly in the component enhances reusability and flexibility. However, the current implementation already sets the default size in withDefaults, making this change minor.

    7
    アイコン最適化のための代替プラグインの導入を提案します。

    PurgeIcons
    プラグインが削除されたことにより、アイコンの最適化が影響を受ける可能性があります。代替のアイコン最適化手法を検討するか、必要に応じて他のプラグインを導入することを検討してください。

    vite.config.ts [30]

    -plugins: [VuePlugin()]
    +plugins: [VuePlugin(), IconOptimizePlugin()]
     
    Suggestion importance[1-10]: 6

    Why: The suggestion is valid as it highlights a potential issue with icon optimization after the removal of PurgeIcons. However, the proposed IconOptimizePlugin() is hypothetical and not a concrete solution.

    6

    @sh0go07 sh0go07 requested a review from Pugma July 19, 2024 13:58
    Copy link
    Collaborator

    @Pugma Pugma left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    OKです!ありがとう!!!

    @sh0go07 sh0go07 merged commit de0edaf into master Jul 19, 2024
    9 checks passed
    @sh0go07 sh0go07 deleted the package_update branch July 19, 2024 14:07
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    iconify周りのパッケージ変更
    2 participants