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

[iOS] Handle paste and key commands #759

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

aringenbach
Copy link
Contributor

  • Add an API to delegate items paste handling to the hosting application.
  • Add an API to allow the hosting application to override some key commands behaviour (e.g. press enter to send a message) => This could be expanded further in order to handle delete word / delete line for iOS user using a physical keyboard if the default behaviour needs improvement.

Unfortunately I couldn't build some UITests for this bit because the key input API for XCTest is only available for a MacOS environment and not for iOS. Will come back with some tests for this later if I find something useful.

@sonarqubecloud
Copy link

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

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 61.06% and project coverage change: -0.21% ⚠️

Comparison is base (bae7710) 90.07% compared to head (24fc26b) 89.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #759      +/-   ##
==========================================
- Coverage   90.07%   89.86%   -0.21%     
==========================================
  Files         112      113       +1     
  Lines       16137    16237     +100     
  Branches      565      612      +47     
==========================================
+ Hits        14536    14592      +56     
- Misses       1580     1624      +44     
  Partials       21       21              
Flag Coverage Δ
uitests 80.63% <61.06%> (-1.71%) ⬇️
uitests-ios 80.63% <61.06%> (-1.71%) ⬇️
unittests 88.47% <12.38%> (-0.53%) ⬇️
unittests-ios 75.51% <12.38%> (-4.96%) ⬇️
unittests-rust 89.83% <ø> (ø)

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

Files Changed Coverage Δ
...mponents/WysiwygComposerView/WysiwygTextView.swift 82.64% <51.42%> (-12.71%) ⬇️
...ents/WysiwygComposerView/WysiwygComposerView.swift 78.67% <52.27%> (-12.91%) ⬇️
...WysiwygComposerView/WysiwygComposerViewModel.swift 92.54% <82.35%> (-0.59%) ⬇️
...WysiwygComposer/Components/WysiwygKeyCommand.swift 82.35% <82.35%> (ø)

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

Copy link
Contributor

@alfogrillo alfogrillo left a comment

Choose a reason for hiding this comment

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

Don't have much context yet.
But the code LGTM!

@aringenbach aringenbach merged commit 555d7f1 into main Aug 10, 2023
@aringenbach aringenbach deleted the aringenbach/paste_and_key_command_support branch August 10, 2023 15:53
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