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

Use NSTextStorageDelegate instead of method swizzling #520

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

@tomekzaw
Copy link
Collaborator Author

Regression: Cursor is shifted to the right when adding a newline after a blockquote

Screen.Recording.2024-10-17.at.11.38.34.mov

@tomekzaw
Copy link
Collaborator Author

Bug: spellcheck completely disappears when adding Markdown syntax

Screen.Recording.2024-10-21.at.20.50.18.mov

example/src/App.tsx Outdated Show resolved Hide resolved
apple/RCTMarkdownUtils.mm Outdated Show resolved Hide resolved
apple/MarkdownTextInputDecoratorView.mm Outdated Show resolved Hide resolved
apple/MarkdownTextInputDecoratorView.mm Show resolved Hide resolved
apple/MarkdownTextInputDecoratorView.mm Outdated Show resolved Hide resolved
apple/MarkdownTextFieldObserver.h Outdated Show resolved Hide resolved
apple/MarkdownTextFieldObserver.h Outdated Show resolved Hide resolved
apple/MarkdownTextStorageDelegate.h Outdated Show resolved Hide resolved
apple/MarkdownTextInputDecoratorView.mm Outdated Show resolved Hide resolved
@tomekzaw
Copy link
Collaborator Author

tomekzaw commented Nov 5, 2024

Regression: Emojis are not visible

edit: [attributedString addAttributes:defaultTextAttributes range:fullRange]; breaks emoji font

edit2: fixed in 67968ec and explained better in 6e40703

@tomekzaw
Copy link
Collaborator Author

tomekzaw commented Nov 5, 2024

Regression: toggling text color doesn't work (it only works when you toggle markdownStyle first)

edit: it works if text doesn't contain any emojis

edit2: fixed in d377043 and explained better in 6e40703

@tomekzaw tomekzaw force-pushed the @tomekzaw/NSTextStorageDelegate branch from 9a4f995 to 40abeba Compare November 5, 2024 11:57
@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@tomekzaw

This comment was marked as resolved.

@289Adam289
Copy link

BUG iOS:
#34 still reproducible on E/App. Behavior is a bit different. Spellcheck disappears immediately.

Screen.Recording.2024-12-13.at.15.58.02.mov

@289Adam289
Copy link

BUG iOS:

  • Block quote ribbon size changes
  • Block quote jumps after new line character
Screen.Recording.2024-12-13.at.16.00.37.mov

@289Adam289
Copy link

289Adam289 commented Dec 13, 2024

BUG iOS:
Typing fast and hitting enter causes input jumping. Bug does not occur when there is delay between typing last character and hitting enter.

Screen.Recording.2024-12-13.at.16.32.49.mov

@tomekzaw
Copy link
Collaborator Author

#520 (comment) should be fixed with b503121.

@tomekzaw
Copy link
Collaborator Author

#520 (comment) is most likely caused by UI/JS thread jump lag, it gets worse if you add sleep(500); inside App component during its render.

@tomekzaw
Copy link
Collaborator Author

As for #520 (comment), I confirm that spellcheck is broken if there's some Markdown syntax but for plain strings this should work correctly. I wasn't able to reproduce this:

Screen.Recording.2024-12-16.at.13.03.20.mov

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.

4 participants