monaco-languageclient icon indicating copy to clipboard operation
monaco-languageclient copied to clipboard

app playground: listening for load progress

Open rubenfiszel opened this issue 11 months ago • 2 comments

Hi,

If you load https://typefox.github.io/monaco-languageclient/ghp_appPlayground.html, you should see that first it loads a white editor and then the theme is loaded and it becomes properly themed. That's content/color shift that I'd like to avoid for our users. It would likely be enough for us to wait for the themeService to be loaded and waiting for that to show a properly themed overlay/progress bar. I was wondering if there were any suggestions around getting:

  • progress of items being loaded so we can bump the progress bar
  • know when the themeService is sufficiently loaded that it would display the proper colors
  • know when the full editor + workspace has been loaded in case we want to avoid all content shift.

rubenfiszel avatar Jan 06 '25 13:01 rubenfiszel

In VSCode, the storage service is used to load the current theme faster (if it didn't change since the last visit)

So you can try:

  • loading the storage service
  • make sure the theme is set in the configuration BEFORE loading the services (by using initUserConfiguration)

CGNonofr avatar Jan 06 '25 14:01 CGNonofr

A PR is up for adding the suggestion to the wrapper.

kaisalmen avatar Jan 06 '25 15:01 kaisalmen

Issue review before new release. I will close this now. This is considered resolved.

kaisalmen avatar Sep 19 '25 11:09 kaisalmen