Skip to content

Use flags to trigger behaviour - #997

Merged
kaisalmen merged 5 commits into
mainfrom
issue-996
Nov 24, 2025
Merged

Use flags to trigger behaviour#997
kaisalmen merged 5 commits into
mainfrom
issue-996

Conversation

@kaisalmen

@kaisalmen kaisalmen commented Nov 18, 2025

Copy link
Copy Markdown
Collaborator

Use flags reprocessConfig to trigger a editor config re-processing. This can trigger an on-demand re-processing of the text/model and editor options (test with statemachine react example)
Use enforceLanguageClientDispose to dispose the language client on demand: This was moved from the config to the react component as it is only used here.
Debug logging was improved.
This resolves #996

@kaisalmen
kaisalmen requested a review from CGNonofr as a code owner November 18, 2025 15:37

@CGNonofr CGNonofr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, lots of unrelated changes (logs) included though :)

@kaisalmen

kaisalmen commented Nov 18, 2025

Copy link
Copy Markdown
Collaborator Author

@CGNonofr yes, forgot to mention. The debug logging is improved (better timestamp and better and more precise messages).

…d enforceLanguageClientDispose to dispose the language client on demand
@kaisalmen

Copy link
Copy Markdown
Collaborator Author

A new next release is available (only the component this time):
https://www.npmjs.com/package/@typefox/monaco-editor-react/v/7.4.0-next.0

@kaisalmen

Copy link
Copy Markdown
Collaborator Author

@martin-fleck-at is this a possible solution for you?

@martin-fleck-at

Copy link
Copy Markdown

@kaisalmen I am a bit swamped today. I might have a chance to try this out but I might only be able to have a more detailed look tomorrow. Sorry for the delay!

@kaisalmen

Copy link
Copy Markdown
Collaborator Author

@martin-fleck-at now worries. Take your time. I will wait for you feedback.

@kaisalmen

Copy link
Copy Markdown
Collaborator Author

@martin-fleck-at martin-fleck-at left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I can confirm that issue #996 is resolved for me with that one. I could not longer reproduce the fast typing issue. Great work, thank you very much @kaisalmen!

I did add some minor comments but nothing that should prevent this PR from being merged.

Comment thread packages/wrapper-react/src/index.tsx Outdated
Comment thread packages/wrapper-react/src/index.tsx Outdated
Comment thread packages/wrapper-react/src/index.tsx Outdated
@kaisalmen

Copy link
Copy Markdown
Collaborator Author

@martin-fleck-at thanks for the useful comments. I will incorporate your feedback tomorrow.

…hat needs to be increased to trigger. Fixed enforceLanguageClientDispose
@kaisalmen

kaisalmen commented Nov 21, 2025

Copy link
Copy Markdown
Collaborator Author

@CGNonofr and @martin-fleck-at I have implemented the review comments. Additionally, I changed triggerReprocessConfig to a number. Effectively, the config is only re-processed if you increment it. Also, enforceLanguageClientDispose does not lead to restart of the language client as soon as you type something.

New next releases are available:
https://www.npmjs.com/package/monaco-languageclient/v/10.4.0-next.2
https://www.npmjs.com/package/@typefox/monaco-editor-react/v/7.4.0-next.2

@kaisalmen
kaisalmen merged commit 067681a into main Nov 24, 2025
1 check passed
@kaisalmen
kaisalmen deleted the issue-996 branch November 24, 2025 09:04
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.

[React Editor] Very fast typing may reset the curser and insert text incorrectly

3 participants