Skip to content

Add box selection tool#1718

Open
Donut-Muffin wants to merge 5 commits intosaber-notes:mainfrom
Donut-Muffin:main
Open

Add box selection tool#1718
Donut-Muffin wants to merge 5 commits intosaber-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
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

❌ Patch coverage is 79.45946% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.00%. Comparing base (3a51ed7) to head (8513069).

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 63.15% 7 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.64%   52.00%   +0.35%     
==========================================
  Files         131      134       +3     
  Lines        9376     9469      +93     
==========================================
+ Hits         4842     4924      +82     
- Misses       4534     4545      +11     

☔ View full report in Codecov by Sentry.
📢 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