buresdv / Cork

A fast GUI for Homebrew written in SwiftUI
https://corkmac.app
2.26k stars 132 forks source link

Feature: Top Level view or Tree view #267

Open kenbankspeng opened 8 months ago

kenbankspeng commented 8 months ago

Feature Suggestion

Mandatory Information

Description Cork provides a flat 'brew list' view of the installed packages. This certainly is needed. But I suggest users are most interested in the top level packages they installed. The sub-packages that were installed as part of the formula are just technical details.

Consider a simple Top Level view filter, or even better, a Tree view.

1) Top Level view This is just a filter selection to only view the top level packages (leaves) in your flat package view. cli equivalent: brew leaves | xargs brew list --versions

2) Tree view This would show the packages in a tree hierarchy similar to a folder/file tree. Users could drill into the sub-package details as needed. cli equivalent: brew deps --tree --installed

Type UI

Mockups No

kenbankspeng commented 8 months ago

I now see you have a setting to view all packages or only manually installed. I suggest this be a filter button in the UI either embedded within your search box component or placed right beside it.

The Tree view would be the ultimate, but would take more work.

buresdv commented 7 months ago

Thanks for the idea. The filtering of packages installed intentionally using a search filter is already implemented, but the search filters don't show up due to a SwiftUI bug caused by Apple. See #191, which tracks this problem.

The tree view is currently way above my programming abilities, but I might revisit it in the future

mrvincenzo commented 5 months ago

Show leaves as @kenbankspeng suggested would be great. Personally, I care about the top level dependencies installed (brew leaves). I care less about the dependencies of my leaves' dependencies I installed. Also, showing all formulaes is not optimal as the user can try to uninstall a dependency of a leaf dependency, which will result in broken leaf dependency.

buresdv commented 5 months ago

@mrvincenzo how relevant is this issue for you? #247

mrvincenzo commented 5 months ago

@mrvincenzo how relevant is this issue for you? #247

It is close but it shows more formulaes than i see when running brew leaves, formalaes that i didn't installed directly

buresdv commented 5 months ago

brew leaves actually tends to leave some packages out from a ton of testing I did back when this feature was first implemented. Cork checks the metadata of the package directly, so it tends to be more accurate on average.

It only becomes a bigger problem if you manually modify a package that you haven't installed manually. At that point, it start being considered "manually modified", which gives it the same status as other packages you installed manually.