Skip to content

[UI] Mouse Drag-and-Drop for Tab Reordering and Panel Resizing #87

@yashksaini-coder

Description

@yashksaini-coder

Goal

Bring modern TUI interaction with mouse drag support.

Description

Implement mouse drag event handling in src/ui/input.rs:

  1. Tab reordering: Detect a mouse press-and-drag on the tab bar. Track the drag position and swap tab order when released over a different tab slot.
  2. Panel resizing: Detect a drag on the border between the package list and details pane. Update a split_ratio: f32 field in App (e.g., default 0.5) that the layout in draw.rs uses for the Constraint::Percentage split.

Crossterm provides MouseEventKind::Drag and MouseButton — enable mouse capture with crossterm::event::EnableMouseCapture.

Note: Mouse support in terminals is optional and varies — always maintain full keyboard fallback functionality.

Tech

Rust, Crossterm Mouse Events, Ratatui

Difficulty

Level 3 – Advanced

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions