Hi,
We noticed this morning that you have launched a new CRMScript "editor".
But, we quickly found a few errors that is causing our day to day to become much harder.
1. Indentation does no longer work.
Ctrl + A and then Shift + Tab would indent the code, not it just moves everything to the left.
2. Bracket highlights does not always work.
Works just fine
The else does not.
Seems quite hard to recreate when i try to do it "manually", but we have seen this issue in multiple customer enviroments, and, the code works just fine
3. String highlights does not always work.
As you see on the log, the debug16 part should be green.
Any suggestions?
Alle Svar (31)
Co-sign. I noticed all of the same things Pär mentions.
Another thing is that I find the colors too muted. For example when you've added one too many parantheses, the red background color indicating there's too many is barely visible:
Compared to before where the parantheses itself was highlighted in a clear red - much easier to see:
Also, the tracing is very wonky now. If you drag and slide the trace bar back and forth, the same variables will be added multiple times.
On a positive note: Yay for search and replace functionality!
New editor
Old editor
Highlighting goes wrong here in new editor.
=====
New intellisense - maximum of 7 items in window
Old Intellisense
Much more items are available in the intellisense window.
========
"F11" for "full-screen" editing not working anymore
The new editor also breaks a lot of the indenting in scripts if you tab for indentation:
😥
Hi guys,
Sorry for making your working environment more difficult. We will look into the defects you have pointed out and try to fix them.
Sverre
Hi guys,
I have comitted a fix for some of this:
- Shift-Tab will reindent section (not de-indent).
- F11 will toggle full screen.
- Mismatching bracket will be red.
- Intellisense list is larger (3x).
I am unable to reproduce the incorrect bracket matching you pointed out, Bas. Do you have some more code for this?
I do not think the new editor is the cause for the tracing-variable bug. I have seen that one for quite some time. It should be fixed, but that is outside this particular task.
The language mode i no longer "c-like" (from codemirror v3), but "cpp". There is no c-like mode anymore. I think this has some subtle impacts on the functionality, without knowing exactly what they are.
The changes will become available in standard nightly-upgraded SOD sites by tomorrow, Wednesday 13. Dec. Could you please try out the editor there and let me know how it works?
Sverre
That's great news!!!
Regarding my earlier reported issue - you can reproduce it via the following code:
#setLanguageLevel 4;
String source = "test blabla etc";
String[] words = source.split(" ");
Integer[] customerIds;
Integer[] categoryIds;
- Exclamation marks are yellow in old editor, "same blue color" in new editor (less visible/less recognizable)
- Parentheses are less recognizable in new editor, "same blue color", in old editor they were marked as white.
Building on what Bas said about exclamation marks. It's actually all operators. They used to be yellow, now they're all light blue, same as the rest of the text. Makes it much harder to read.
Before:
Now:
Just had/have a problem at a customer using Release_10.2.11_2023.12.07-04 we where not able to update a script.
Every time we pressed save after changing the script - the script reloaded the original script into the editor (we used MS Edge).
Is this related to 'The New CRMScript Editor' or is this another problem(I have never had this problem before)?
We tried to log out and in again.
(I really love the search and replace feature and caseinsensitive intellisence)
In the old version you got all suggestions when pressing ctrl + space. now you only get one suggestion.
I don't like at all that seleting part of code will automatically select all other parts. I get confused and scared that I will remove the wrong codeline when this happens.
Hi all,
Again, thanks for your feedback. I have fixed the select and select-matches colors like this:
(Bottom is selection, the two others are the matched ones). These colors are quite subtle, but I wanted to keep the selection color the same as the old editor. And consequently, when the matched ones should be less strong, it became quite close to the background.
Multiple autocomplete options has also been fixed.
Yellow operators have been fixed.
And finally, I have fixed the bug Morten reported which is quite critical. In some conditions (perhaps only using Edge), there is a race condition allowing the submit of the form to be processed before the blur of the editor, causing the content of the editor to not update the CGI-variable, and consequently loosing the changes in the editor. A temporary workaround would be to click outside the editor before clicking the Ok/Apply button. But the fix I am submitting now should fix this properly.
Sverre
I assume these changes will be available tommorow in SOD? I just saw we have a new build in our SOD and production sandbox environments now (SuperOffice CRM Online 10.2 Build Release_10.2.11_2023.12.15-06)
Re the indenting, I still see this issue in scripts created with the 'old' editor.
Hi David,
I changed the column width of tab yesterday from 4 to 2, same as indenting width. Did it help?
Sverre
Hi,
No change:
Build 'SuperOffice CRM Online 10.2 Build Release_10.2.11_2023.12.18-02'.
If i paste the same code into the classic editor, it is indented correctly:
In the old editor, without it being in "edit" modus, you were able to use the "Find" function. In the new version, CTRL + F no longer works which makes it difficult to search inside code when you are looking at it in "read-only" mode. This is especially harmful when you are evaluating a trace-result and want to do "handson-searching" inside the code (tested in Chrome).
Cursor alignment when going to the new line is also broken,
Previous editor
(see the cursor position on line 37 after pressing enter at the end of line 36)
New editor:
(see the cursor position on line 626 after pressing enter at the end of line 625)
Do note that I am indenting with tab.
Tested on release SuperOffice CRM Online 10.2 Build Release_10.2.11_2023.12.18-02
Hi David,
Can you show some more of the code that is not working? From my experience, it works in some cases and not in others. I have not had time to narrow it down, but it seems for instance that foreach() will break it. Which I guess makes sense, since it is not a legal C++ keyword.
Sverre
Hi Sverre, I did some experimenting, it breaks when an array declaration is involved.
Notice the cursor position when going to the next line (using enter)
No array:
With array:
tested on version SuperOffice CRM Online 10.3 Build Release_10.3.1_2024.01.12-04