Hello !
I just noticed that the code snippet menu (CTRL+SPACE
) on the Playground is broken.
I have used it a few days ago, so I’m pretty sure it’s a recent change
Hello !
I just noticed that the code snippet menu (CTRL+SPACE
) on the Playground is broken.
I have used it a few days ago, so I’m pretty sure it’s a recent change
cc @RaananW
Additional info:
In Chrome version 134.0.6998.165 (arm64), the helper functions are visible. However, after upgrading to version 135.0.7049.42 (arm64), they no longer appear.
If you open a new “Incognito mode” window, you should see the helper functions even in the latest version. Maybe Chrome caching might affecting the visibility.
@SimoneDev you are right pointing out a cache issue. After a forced refresh of Google Chrome, the broken snippet it gone. Either is was indeed cache, either at the same time one of the devs had changed something
Works for me:
But I am going to continue trying to reproduce, as I a sure both of you have tried refreshing etc’.
Does anyone else experience that? any error in the network/console?
Hello Raanan !
Yes sorry, maybe you missed my message just above, but on my side a forced refresh fixed it
Still, I think there is something odd with the Monaco editor cache management, that’s not the first time the editor has something broken until a full refresh. Also, I remember that @roland which is MacOS user had tons of issue with unwanted $ signs on code snippets (Auto TAB
jump being broken), I don’t know if it’s still the case
Sorry, missed that.
Was probably an issue with the typings. Either a bad build/nightly that we missed (which I am going to check, because we shouldn’t) or something temporary on the CDN. I’ll try investigating, I hope to find the reason.
Issue identified! This appears to be an async issue that occurs randomly due to network conditions. However, you can reproduce it consistently by increasing network latency (Chrome Developer Tools > Network > Fast 4G).
When the issue occurs, the following code:
is executed before the callback function that populates the this._template
:
ending with the missing helper functions in the array.
Maybe we can move the fetch in setupMonacoAsync
function and await its completion before iterating over this._templates
.
@SimoneDev now that’s a neat bug identification ! Well done !
Are you kidding we can simulate latency in Google Chrome ?
OMG I love you.
I had never looked for such option since I use to have a custom option on my side to simulate latency on my NodeJS servers !
Always put it on 3G. Simulate real-life-work-from-tunnel
Want to submit a PR? I will be happy to review it and see if it works as expected
Absolutely! On it!
Here we are!
Approved