Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Android: Allow pasting of non text content#700

Merged
langleyd merged 2 commits intomainfrom
langleyd/android_fix_image_pasting
Jun 1, 2023
Merged

Android: Allow pasting of non text content#700
langleyd merged 2 commits intomainfrom
langleyd/android_fix_image_pasting

Conversation

@langleyd
Copy link
Copy Markdown
Contributor

@langleyd langleyd commented Jun 1, 2023

  • Only special-case onTextContextMenuItem paste behaviour if it is text that is pasted, otherwise default to EditText implementation.
  • Add tests for pasting of images, plain text and html

- Only special-case onTextContextMenuItem paste behaviour if it is text that is pasted, otherwise default to EditText implementation.
- Add tests for pasting of images, plain text and html
@langleyd langleyd requested a review from jonnyandrew June 1, 2023 08:38
@langleyd langleyd changed the title Allow pasting of non text content Android: Allow pasting of non text content Jun 1, 2023
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 1, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.36 ⚠️

Comparison is base (9d6b58c) 88.12% compared to head (96fbacc) 87.76%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #700      +/-   ##
============================================
- Coverage     88.12%   87.76%   -0.36%     
- Complexity      272      274       +2     
============================================
  Files           143      114      -29     
  Lines         16291    14902    -1389     
  Branches        762      218     -544     
============================================
- Hits          14356    13079    -1277     
+ Misses         1753     1656      -97     
+ Partials        182      167      -15     
Flag Coverage Δ
uitests 65.62% <0.00%> (-9.20%) ⬇️
uitests-android 65.62% <0.00%> (+0.38%) ⬆️
uitests-ios ?
unittests 88.65% <ø> (+0.97%) ⬆️
unittests-android 58.28% <ø> (ø)
unittests-ios ?
unittests-rust 89.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../java/io/element/android/wysiwyg/EditorEditText.kt 52.96% <0.00%> (+2.28%) ⬆️

... and 30 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Copy Markdown
Contributor

@jonnyandrew jonnyandrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just one comment about the UriContentListener

import androidx.core.view.ContentInfoCompat
import androidx.core.view.OnReceiveContentListener

class UriContentListener(
Copy link
Copy Markdown
Contributor

@jonnyandrew jonnyandrew Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is only used as a test utility, could you move it into the test directory?

(Or if it is supposed to be exposed as a library utility, then we should add some documentation and use it in the example app)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jun 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@langleyd langleyd merged commit f0c7813 into main Jun 1, 2023
@langleyd langleyd deleted the langleyd/android_fix_image_pasting branch June 1, 2023 17:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants