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?
Feb 28, 2020 07:35 AM
Agree 100%. One of the gems of this new feature.
Feb 28, 2020 05:42 PM
Thanks for the report – this is not intentional. Using the spread operator should be fine. We will remove the warning.
Mar 02, 2020 09:15 AM
The scripting block uses Monaco, which is actually the editor that powers VS Code!
Mar 08, 2020 06:27 AM
Thank you for letting us know more about the scripting block editor. I am accustomed to a different editor and my transition to this editor has been rough.
By the way, I am having some trouble with the editor. For me, the keyboard shortcuts for select all code and Undo last action do no work as documented on the support website in the screenshot below. (Ctrl+V also has two documented actions, but for me it only does the first.)
Mar 08, 2020 07:00 AM
Which editor?
I also had some issues initially with VS Code, but overall, the transition has produced far greater benefits.
Mar 08, 2020 07:12 AM
I currently use Atom.
Mar 09, 2020 08:14 AM
Thanks for flagging this! These appear to be errors in our support documentation — we’ll get those fixed ASAP.
On Windows:
On Mac:
Mar 09, 2020 09:02 AM
For me, on Windows, these do not work.
Ctrl+A has a different behavior. Ctrl+Y does nothing.
Ctrl+Z also does nothing.
I could go on, but I assume that Airtable has Q/A people testing stuff like this and will get them fixed soon (along with several other quirky things I see in scripting block).
There also appears to be a lot of undocumented keyboard shortcuts. Some of them are really useful. However, I understand if you want to leave some keyboard shortcuts undocumented for now.
Mar 09, 2020 09:20 AM
Is the editor focused? I am able to successfully use these shortcuts on Windows.
Yes, we intentionally don’t document all the keyboard shortcuts to keep the support article light. You can use the F1 key to pull up the command palette, which can assist in discovering new commands and keyboard shortcuts.