Skip to content

[Feature] Side-by-Side Package Comparison View #84

@yashksaini-coder

Description

@yashksaini-coder

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:

  1. Add a compare_selection: Option<Package> field to App
  2. First c press marks the focused package; second c press opens the comparison view
  3. Fetch details for both packages via get_details() and render side-by-side using two Paragraph widgets in a horizontal layout
  4. Press Esc to exit the comparison view

Tech

Rust, Ratatui (horizontal split layout)

Difficulty

Level 3 – Advanced

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions