Feb 27, 2020 09:04 PM
I’m wondering if this is intentional behavior…
In the Scripting Block’s editor, when I try to use the spread operator [...]
to spread a Set()
into an array, I get syntax highlighting for an error:
Using Array.from()
on the same Set()
works just fine (no syntax highlighting). But, curiously, the Scripting Block also runs the script just fine with the Spread operator version of that line of code, even though it’s highlighted as an error.
The same code does not produce any error highlighting in a JavaScript environment in VS Code:
Not a real issue, and probably an edge case, but I figured I’d report it anyhow, just in case 1) it’s an unintended bug, or 2) I’m unaware that shouldn’t be using the Spread operator on Sets.
Side-note… The built-in editor in the Scripting Block is a surprisingly excellent experience! I’m curious if you guys rolled your own, or if you utilized some open-source editor library?
Mar 09, 2020 09:55 AM
Yes, the editor has the focus.
For me, Ctrl+A moves the cursor to the beginning of the line.
For me, Ctrl+Z has unpredictable results. Sometimes it does nothing. Sometimes it does crazy-I-have-no-idea-why-it-does-that things.
For me, Ctrl+Y does not redo the last edit. I have not not tried it nearly as often as I have tried the other two.
I’ve use F1 and I find it helpful. That is how I found some of the undocumented keyboard shortcuts. However, for me it lists keyboard shortcuts in Mac format, not in Windows format. I have tried several times to get the various Fold shortcuts to work, but I eventually gave up because I wasn’t even sure if they would work at all.
I agree with this decision, which I indicated in my previous post. However, eventually, I hope that they will get documented in a reference section. Or at least a link to Monaco’s keyboard shortcuts, provided that they are all actually supported.
Errors in documentation are very frustrating. I would rather have undocumented features than documented features that don’t work. For example, your documentation states that output.table() mirrors the console.table() functionality and provides a convenient link. Except that output.table() doesn’t actually provide all the functionality listed in that link.
In contrast, you do not document the rate limit for scripting block, unlike how you document the rate limit for the Standard API. I really wished you’d published that there was a rate limit, but I’m okay if you want to keep the actual rate limit secret for now. I ran up against what I suspected was a rate limit, made some guesses about the rate limit, and I got my code to work. No muss, no fuss.
Mar 09, 2020 10:46 AM
:thumbs_up:
At least some of the errors are already corrected!
But there are still errors. Maybe you are still in the process of making the corrections, but I thought I’d post in case some of them still slipped by.
(By the way, I mean there are still documentation errors because the documentation does not match what you described as the expected behavior in this thread. For me there are still non-documentation errors because my editor does not behave as you described in this thread.)
Mar 09, 2020 11:33 AM
!!!
This is great. Thank you. Or thank you to Monaco, if that’s the origin.
Mar 10, 2020 03:47 PM
@kuovonne It looks like the Monaco editor might be incorrectly identifying your computer as a Mac. Can you share your OS and browser version numbers?
Jun 25, 2020 12:57 PM
@Stephen_Suen My keyboard shortcuts in the scripting block editor work now! Thanks a bunch.