Goal
Help users make informed decisions by comparing two packages in a split-screen view.
Description
Allow selecting two packages and pressing a key (e.g., c) to open a comparison view:
┌─ Package A ─────────────┐ ┌─ Package B ─────────────┐
│ Name: neovim │ │ Name: vim │
│ Version: 0.10.0 │ │ Version: 9.1.0 │
│ Provider: pacman │ │ Provider: apt │
│ Description: ... │ │ Description: ... │
└─────────────────────────┘ └─────────────────────────┘
Implementation:
- Add a
compare_selection: Option<Package> field to App
- First
c press marks the focused package; second c press opens the comparison view
- Fetch details for both packages via
get_details() and render side-by-side using two Paragraph widgets in a horizontal layout
- Press
Esc to exit the comparison view
Tech
Rust, Ratatui (horizontal split layout)
Difficulty
Level 3 – Advanced
Goal
Help users make informed decisions by comparing two packages in a split-screen view.
Description
Allow selecting two packages and pressing a key (e.g.,
c) to open a comparison view:Implementation:
compare_selection: Option<Package>field toAppcpress marks the focused package; secondcpress opens the comparison viewget_details()and render side-by-side using twoParagraphwidgets in a horizontal layoutEscto exit the comparison viewTech
Rust, Ratatui (horizontal split layout)
Difficulty
Level 3 – Advanced