Skip to content

Add box selection tool - #1718

Open
Donut-Muffin wants to merge 8 commits into
saber-notes:mainfrom
Donut-Muffin:main
Open

Add box selection tool#1718
Donut-Muffin wants to merge 8 commits into
saber-notes:mainfrom
Donut-Muffin:main

Conversation

@Donut-Muffin

Copy link
Copy Markdown

Previously there was only one lasso selection tool which users would have to drag around object to make selections.

This pull request adds a box selection tool that allows users to make rectangular selections around objects, rather than drawing around them.

Test cases have been implemented (based on the original lasso selection tests). The lasso selection tool has been refactored for clarity.

Sorry if the project structure needs improvement. This is my first time using Flutter and Dart.

Addresses issue #1675

box_select_demo.mp4

@codecov

codecov Bot commented Apr 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.26%. Comparing base (8ae8af4) to head (01ced81).
⚠️ Report is 119 commits behind head on main.

Files with missing lines Patch % Lines
lib/pages/editor/editor.dart 25.92% 20 Missing ⚠️
lib/components/canvas/select_result.dart 11.11% 8 Missing ⚠️
lib/components/toolbar/toolbar.dart 68.42% 6 Missing ⚠️
lib/data/tools/select.dart 0.00% 1 Missing ⚠️
lib/data/tools/select_box.dart 98.57% 1 Missing ⚠️
lib/data/tools/select_lasso.dart 98.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1718      +/-   ##
==========================================
+ Coverage   51.90%   52.26%   +0.35%     
==========================================
  Files         131      134       +3     
  Lines        9363     9456      +93     
==========================================
+ Hits         4860     4942      +82     
- Misses       4503     4514      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Donut-Muffin

Copy link
Copy Markdown
Author

It appears like a lot of code has been added/removed but a significant portion is refactors since I renamed the Select tool to SelectLasso

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant