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

[FEATURE] Extend configuration #141

Merged
merged 9 commits into from
Feb 13, 2024
Merged

Conversation

DominikBucher12
Copy link
Collaborator

What this PR do:

  • Extends Configuration to contain things like autocorrection type and Spell checking.

How to test it

  • Run the app, tests etc. Try different configurations

@@ -191,7 +191,7 @@ extension RichTextCoordinator {
extension ColorRepresentable {

#if iOS || os(tvOS) || os(visionOS)
static var textColor: ColorRepresentable { .label }
public static var textColor: ColorRepresentable { .label }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we can even keep this it is in dependent PR for themes (default text color etc.) Just a note 😅

@@ -45,9 +45,10 @@ final class RichTextViewComponentTests: XCTestCase {
func testSettingUpWithEmptyTextWorks() {
let string = NSAttributedString(string: "")
view.setup(with: string, format: .rtf)
view.configuration = .standard
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This raises question if configuration shouldn't be passed to setup instead... This feels like API is all over the place, your thoughts @danielsaidi ?

Copy link
Owner

Choose a reason for hiding this comment

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

I'm thinking we should inject it into the environment in SwiftUI.

@DominikBucher12
Copy link
Collaborator Author

Btw this fixes #132 😍

@danielsaidi danielsaidi merged commit 4e7e9c8 into main Feb 13, 2024
1 check passed
@danielsaidi danielsaidi deleted the feature/only_config_it_can_be branch February 13, 2024 16:11
@danielsaidi
Copy link
Owner

Great job!

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.

2 participants