Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: delete and duplicate selection #937

Merged
merged 20 commits into from
Oct 4, 2023

Conversation

AraxTheCoder
Copy link
Contributor

@AraxTheCoder AraxTheCoder commented Sep 29, 2023

This adds the ability to delete and duplicate the selection as requested in #170.
These two new options get shown in the toolOptions collapsible menu, as seen in the screenshot.

A screenshot of Saber on an Android device with a new select bar at the bottom with a duplicate button and delete button

I still need to copy the "Delete" from imageOptions of all languages to selectionOptions, but when I tried it so far, other translations got replaced with the missing English translation.
Any help on how I can do this correctly is welcome.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Attention: 60 lines in your changes are missing coverage. Please review.

Comparison is base (a06f283) 35.40% compared to head (eb8e8bd) 35.10%.
Report is 3 commits behind head on main.

❗ Current head eb8e8bd differs from pull request most recent head 841d3e1. Consider uploading reports for the commit 841d3e1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #937      +/-   ##
==========================================
- Coverage   35.40%   35.10%   -0.30%     
==========================================
  Files          97       98       +1     
  Lines        7041     7101      +60     
==========================================
  Hits         2493     2493              
- Misses       4548     4608      +60     
Files Coverage Δ
lib/data/tools/select.dart 66.12% <0.00%> (-7.09%) ⬇️
lib/components/toolbar/toolbar.dart 73.52% <0.00%> (-2.62%) ⬇️
lib/components/toolbar/select_modal.dart 0.00% <0.00%> (ø)
lib/pages/editor/editor.dart 32.93% <0.00%> (-1.09%) ⬇️

... and 1 file with indirect coverage changes

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

lib/components/toolbar/select_modal.dart Outdated Show resolved Hide resolved
lib/components/toolbar/select_modal.dart Outdated Show resolved Hide resolved
lib/components/toolbar/select_modal.dart Outdated Show resolved Hide resolved
lib/components/toolbar/toolbar.dart Outdated Show resolved Hide resolved
lib/components/toolbar/toolbar.dart Outdated Show resolved Hide resolved
lib/pages/editor/editor.dart Outdated Show resolved Hide resolved
@adil192
Copy link
Member

adil192 commented Sep 30, 2023

I still need to copy the "Delete" from imageOptions of all languages to selectionOptions, but when I tried it so far, other translations got replaced with the missing English translation. Any help on how I can do this correctly is welcome.

I typically do this as a separate commit/PR to keep the diff readable.
That being said, were you using a command like

dart run slang edit copy path.to.imageOptions.delete path.to.selectionOptions.delete

lib/i18n/strings.i18n.yaml Outdated Show resolved Hide resolved
@AraxTheCoder
Copy link
Contributor Author

I still need to copy the "Delete" from imageOptions of all languages to selectionOptions, but when I tried it so far, other translations got replaced with the missing English translation. Any help on how I can do this correctly is welcome.

I typically do this as a separate commit/PR to keep the diff readable. That being said, were you using a command like

dart run slang edit copy path.to.imageOptions.delete path.to.selectionOptions.delete

Ok so you take care of this yourself?

@AraxTheCoder AraxTheCoder marked this pull request as draft October 2, 2023 13:50
@AraxTheCoder AraxTheCoder marked this pull request as ready for review October 2, 2023 14:24
@adil192 adil192 linked an issue Oct 4, 2023 that may be closed by this pull request
5 tasks
@adil192 adil192 merged commit 6c098bc into saber-notes:main Oct 4, 2023
2 checks passed
@adil192
Copy link
Member

adil192 commented Oct 4, 2023

Thank you!

@AraxTheCoder AraxTheCoder deleted the selection-functions branch October 4, 2023 09:00
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.

Selection/move tool
2 participants