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 TextViewDelegate Option to Coordinators #265

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

thecoolwinter
Copy link
Collaborator

Description

Main Changes:

  • Adds the ability to conform TextViewCoordinators to TextViewDelegate (from CETV), forwarding most delegate messages to each conforming coordinator. This allows coordinators to receive detailed text change information quickly and with much more detailed information than is given in notifications.
  • Fixes a bug where delegate messages were not sent when modifying text in filters.

Details:

  • Raises ownership of coordinators to the TextViewController, which weakly references all coordinators. The controller now also handles forwarding messages, which was previously handled by the SwiftUI coordinator.
  • The SwiftUI coordinator is simplified due to not having to manage the coordinator messages.
  • Updated documentation for coordinators, explaining why the API exists and describes the new delegation API.

Related Issues

N/A

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

N/A

@thecoolwinter thecoolwinter merged commit 033b68d into CodeEditApp:main Sep 21, 2024
2 checks passed
@thecoolwinter thecoolwinter deleted the coordinator-delegate branch September 21, 2024 13:42
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.

3 participants