Skip to content

Controller - Build has completed callback #155

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

Closed
adrian-moisa opened this issue Oct 24, 2022 · 0 comments
Closed

Controller - Build has completed callback #155

adrian-moisa opened this issue Oct 24, 2022 · 0 comments
Assignees

Comments

@adrian-moisa
Copy link
Collaborator

adrian-moisa commented Oct 24, 2022

We need a callback for detecting when the document plain text has changed but timed to be triggered after the build. Such that we can extract the latest rectangles as well. the current callbacks don't work:

  • onReplaceText() - Called way to early, even before the document.changes stream
  • document.changes - The stream emits only changes (not complete docs) before the build is completed
  • onBuildComplete() - This one emits way too often, on hovering highlights, on selection changes, etc

Add new callback: onTextReplaceComplete(). Thanks to this new callback we can avoid comparing via onBuildComplete() the new text and the old text to see if the text has changed. Therefore the editor will be more performant, especially for large documents.

@adrian-moisa adrian-moisa self-assigned this Oct 24, 2022
@adrian-moisa adrian-moisa changed the title Controller - Callback for document change after the build has completed Controller - Build has completed callback Nov 5, 2022
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

No branches or pull requests

1 participant