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

Add support for visionOS and macOS #20

Merged
merged 15 commits into from
Feb 16, 2024
Merged

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Feb 4, 2024

Optimize text input on visionOS

♻️ Current situation & Problem

The current approach for textfield selection does not work on visionOS. This PR addresses the issue by replacing the current solution via a simple "tap" on visionOS. Our automatic text input correction should catch the case where the tap will set the cursor in the middle of the text.

This resolves #19.

Further, keyboards and alerts are in separate processes in visionOS. This PR accounts for that and updates the respective implementations.

⚙️ Release Notes

  • Fix smaller issues with visionOS.

📚 Documentation

Minor adjustments.

✅ Testing

  • Added a new test case that explicitly checks the use case of entering text in a text field, prefilled with long text.
  • Added CI support for visionOS.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@Supereg
Copy link
Member Author

Supereg commented Feb 4, 2024

Would require an updated branch protection 👍

@Supereg
Copy link
Member Author

Supereg commented Feb 4, 2024

Couple issues here with the visionOS builds. com.apple.springboard seems to not exists there. Also the keyboard is launched as a separate app and we can't access it with the same application. There is probably a way to access it via UI tests but I'm not sure how.

@Supereg Supereg changed the title Optimize text input on visionOS Add support for visionOS Feb 13, 2024
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

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

Comparison is base (fb7fcee) 73.01% compared to head (1ce9fe5) 78.83%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #20      +/-   ##
==========================================
+ Coverage   73.01%   78.83%   +5.83%     
==========================================
  Files           4       10       +6     
  Lines         263      392     +129     
==========================================
+ Hits          192      309     +117     
- Misses         71       83      +12     
Files Coverage Δ
Sources/XCTestApp/TestAppTestCase.swift 0.00% <ø> (ø)
...stExtensions/XCUIApplication+DeleteAndLaunch.swift 85.72% <100.00%> (+9.40%) ⬆️
...es/XCTestExtensions/XCUIApplication+Keyboard.swift 72.73% <100.00%> (ø)
...es/XCTestExtensions/XCUIApplication+VisionOS.swift 100.00% <100.00%> (ø)
...urces/XCTestExtensions/XCUIElement+TextEntry.swift 92.82% <100.00%> (+0.45%) ⬆️
...xtensions/XCTestCase+DisablePasswordAutofill.swift 26.32% <50.00%> (ø)
Sources/XCTestApp/TestAppTestsView.swift 79.17% <58.34%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb7fcee...1ce9fe5. Read the comment docs.

@Supereg
Copy link
Member Author

Supereg commented Feb 13, 2024

@PSchmiedmayer this PR is ready to review and merge. The branch protection rules would need an update due to changes to the job names.

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you for the additions 🎉

@Supereg Supereg changed the title Add support for visionOS Add support for visionOS and macOS Feb 16, 2024
@Supereg Supereg merged commit e29d29d into main Feb 16, 2024
11 checks passed
@Supereg Supereg deleted the feature/visionos-text-input branch February 16, 2024 19:38
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.

Text input is very slow on visionOS.
2 participants