Skip to content

Conversation

@JackEblan
Copy link
Owner

Closes #479

This commit refactors how icon pack data is loaded and introduces a new search feature in the icon selection dialog.

A new GetIconPackInfosUseCase has been created to encapsulate the logic of parsing and filtering icon pack components. This use case now filters icons by component name, ensuring that only relevant icons are shown for a specific application.

The EditApplicationInfoViewModel has been updated to use this new use case instead of directly accessing the IconPackManager.

Key Changes:

  • domain/use-case:

    • Created GetIconPackInfosUseCase to handle fetching and filtering of IconPackInfoComponents from an icon pack's appfilter.xml.
    • The use case filters icons based on both packageName and component, improving the relevance of the displayed icons.
  • feature/edit-application-info:

    • EditApplicationInfoViewModel now depends on GetIconPackInfosUseCase instead of IconPackManager.
    • The updateIconPackInfoPackageName function now accepts a component string to pass to the new use case for more accurate filtering.
  • ui:

    • Added a SearchBar to the IconPackInfoFilesDialog. This allows users to search for specific icons within an icon pack.
    • Minor layout adjustments were made to accommodate the new search bar.

…o UI

This commit refactors how icon pack data is loaded and introduces a new search feature in the icon selection dialog.

A new `GetIconPackInfosUseCase` has been created to encapsulate the logic of parsing and filtering icon pack components. This use case now filters icons by component name, ensuring that only relevant icons are shown for a specific application.

The `EditApplicationInfoViewModel` has been updated to use this new use case instead of directly accessing the `IconPackManager`.

### Key Changes:

*   **`domain/use-case`**:
    *   Created `GetIconPackInfosUseCase` to handle fetching and filtering of `IconPackInfoComponent`s from an icon pack's `appfilter.xml`.
    *   The use case filters icons based on both `packageName` and `component`, improving the relevance of the displayed icons.

*   **`feature/edit-application-info`**:
    *   `EditApplicationInfoViewModel` now depends on `GetIconPackInfosUseCase` instead of `IconPackManager`.
    *   The `updateIconPackInfoPackageName` function now accepts a `component` string to pass to the new use case for more accurate filtering.

*   **`ui`**:
    *   Added a `SearchBar` to the `IconPackInfoFilesDialog`. This allows users to search for specific icons within an icon pack.
    *   Minor layout adjustments were made to accommodate the new search bar.
@OldMateX
Copy link

Oh, you rockstars. That was super fast, going to have to try this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make icons searchable

3 participants