-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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: Add clipboard paste functionality for screenshots #12181
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12181 +/- ##
==========================================
+ Coverage 90.82% 91.15% +0.33%
==========================================
Files 554 584 +30
Lines 57306 59631 +2325
Branches 9122 9457 +335
==========================================
+ Hits 52046 54358 +2312
- Misses 3640 3653 +13
Partials 1620 1620
|
nijel
reviewed
Aug 5, 2024
nijel
reviewed
Aug 5, 2024
nijel
reviewed
Aug 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user clicks paste. Then the clipboard is read if the permesion is given and the context is secure (as required by the clipboard API). Then the image is pasted into the select file input. Otherwise if no image is available we only inform the user about that. NOTE: Implemented only in the add screenshot form in /screenshots page and not in the modal. Related: WeblateOrg#6710
The previous commit added pase screenshot in screenshot/ pages. This adds it in the modal box that opens when Add Screenshot button clicked while checking individual strings. Related: WeblateOrg#6710
The paste button now is rendered by django screenshot form isntead of being in the template.
nijel
force-pushed
the
paste-screenshot-6710
branch
from
August 7, 2024 13:00
c7013bb
to
4fde151
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Added: Paste screenshot from clipboard.
The user clicks paste. Then the clipboard is read if the permesion is given and the context is secure (as required by the clipboard API). Then the image is pasted into the select file input. Otherwise if no image is available we only inform the user about that.
Closes: #6710
Checklist
Other information