Skip to content

feat: filter by update available package#9

Merged
Valkyrie00 merged 2 commits intoValkyrie00:mainfrom
kypkk:filterByUpdateAvailable
Mar 15, 2025
Merged

feat: filter by update available package#9
Valkyrie00 merged 2 commits intoValkyrie00:mainfrom
kypkk:filterByUpdateAvailable

Conversation

@kypkk
Copy link
Contributor

@kypkk kypkk commented Mar 14, 2025

No description provided.

@kypkk
Copy link
Contributor Author

kypkk commented Mar 14, 2025

add a feature filter by update available

@Valkyrie00 Valkyrie00 self-requested a review March 14, 2025 22:50
@Valkyrie00 Valkyrie00 self-assigned this Mar 14, 2025
@Valkyrie00 Valkyrie00 added the enhancement New feature or request label Mar 14, 2025
@Valkyrie00
Copy link
Owner

This pull request introduces a new feature to filter packages based on their update availability in the AppService. The changes include adding a new boolean field to track the filter state, updating the search functionality to apply the filter, and adding a new key binding to toggle the filter.

Key changes:

Feature Addition: Filter Packages by Update Availability

  • internal/services/app.go: Added a new boolean field showOnlyUpdateAvailable to the AppService struct to track the filter state. Updated the search method to filter the list of packages based on their update availability. [1] [2]

  • internal/services/io.go: Added a new key binding 'o' to toggle the update availability filter. Implemented the handleFilterUpdateAvailablePackagesEvent method to manage the filter state and update the search label accordingly. [1] [2]

  • internal/ui/components/legend.go: Updated the legend to include the new key binding for filtering packages with updates available.

@Valkyrie00
Copy link
Owner

Hi @kypkk! Thank you so much for you contribution 🎉 . I will review your implementation soon.

Copy link
Owner

@Valkyrie00 Valkyrie00 left a comment

Choose a reason for hiding this comment

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

Your implementation looks good! 👍 Just one thing, may I ask you to change the "label" UpdateAvailable with Outdated in all statements? Thank you so much!

  • showOnlyUpdateAvailable -> showOnlyOutdated
  • s.handleFilterUpdateAvailablePackagesEvent -> s.handleFilterOutdatedPackagesEvent
  • Search (Update available): -> Search (Outdated):
  • [o] Filter Update Available -> [o] Filter Outdated
  • Ecc...

@kypkk
Copy link
Contributor Author

kypkk commented Mar 14, 2025 via email

Copy link
Owner

@Valkyrie00 Valkyrie00 left a comment

Choose a reason for hiding this comment

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

✅ Test passed - LGTM.
Thank you so much!

@Valkyrie00 Valkyrie00 merged commit b9c0ab7 into Valkyrie00:main Mar 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants