tui-widgets icon indicating copy to clipboard operation
tui-widgets copied to clipboard

feat: Implement interactive popup dragging and resizing

Open sabry-awad97 opened this issue 9 months ago • 1 comments

This commit introduces interactive dragging and resizing functionality to the tui-popup crate.

Changes include:

  • Added an interactive example demonstrating the new features.
  • Updated PopupState to manage interaction state (dragging and resizing).
  • Modified Popup widget to render a resize handle.
  • Implemented mouse event handling for dragging and resizing.
  • Added constraints to keep the popup within terminal bounds and enforce minimum size.

These changes allow users to interactively reposition and resize popups within the terminal, improving the user experience.

sabry-awad97 avatar Mar 01 '25 02:03 sabry-awad97

Codecov Report

Attention: Patch coverage is 76.28458% with 60 lines in your changes missing coverage. Please review.

Project coverage is 72.28%. Comparing base (cad0d3e) to head (e322341).

Files with missing lines Patch % Lines
tui-popup/src/popup_state.rs 78.01% 42 Missing :warning:
tui-popup/src/popup.rs 70.96% 18 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   71.51%   72.28%   +0.76%     
==========================================
  Files          15       15              
  Lines        2503     2742     +239     
==========================================
+ Hits         1790     1982     +192     
- Misses        713      760      +47     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 01 '25 06:03 codecov-commenter