Closed russdanner closed 2 years ago
@russdanner autocomplete issues were because of the editor version, I updated it to the newest version and issues like the autocomplete options still showing after closing a tag are gone. Also the autocomplete for studio examples is better (it was not accurate before), now you can type something like if
, loop
, studio-support
etc and it will show better matches (it looks for studio snippets labels).
Since we're completely relying on editor config things like <@
<#
or ${
can't be added yet (unless they're part of the snippet label).
Please give it a try with the new version and let me know how it goes (I'll assign when PR is merged)
https://www.loom.com/share/a7d0daa50a3f4532ba837e80cedf4aa3 Jose have a look at this feedback. I still feel like the autocomplete needs work. I think if we are going to make suggestions they need to be contextually and syntactically correct otherwise we're create too much noise and it's more harmful than helpful.
Much better though!
@russdanner Issue when trying to add a specific variable is fixed now.
After a discussion with @rart, we decided to make the autocomplete options configurable from the code-editor-config.xml
file, adding the option to disable the live autocomplete and leave autocomplete only on Ctrl + space
, or disabled autocomplete at all.
Latest version of ace breaks studio due to the publishing of require/define to the global scope. 😕
@jvega190 please update to use the no conflict min build of ace: https://github.com/ajaxorg/ace-builds/
@rart done, updated to min no conflict build https://github.com/craftercms/studio-ui/pull/1362
@jvega190 please check in with @rart regarding the commenting out of settings in BPs, we would like them to be commented out and the light|dark
comment removed, as shown below:
<code-editor-config>
<!--
<theme>light</theme>
<enable-basic-autocompletion>true</enable-basic-autocompletion>
<enable-live-autocompletion>true</enable-live-autocompletion>
<font-size>11pt</font-size>
<tab-size>4</tab-size>
-->
<snippets>
<!--
<snippet>
<key>freemarker-example</key>
<label>Freemarker Example</label>
<type>freemarker</type>
<content>
<![CDATA[
<#assign imageSrc = contentModel.image!"" />
]]>
</content>
</snippet>
-->
</snippets>
</code-editor-config>
https://github.com/craftercms/studio/pull/1807 Editor configuration updated
I don't think giving the blueprint the ability to configure the feature solves the issue (although that is a useful feature.) I think we should move this ticket to 3.1.5 and continue to improve the type-ahead rules.
I've lowered the priority and changed the type of issue to enhancement now that we've added the ability to configure the feature on/off.
This feature has been disabled
Describe the bug
Code editor auto complete is too aggressive and replaces in code that user is typing. This is hard to describe in written form but I have captured a video of some of the basic issues.
https://www.loom.com/share/cc851300487342278b1b3c2e56420622
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
https://www.loom.com/share/cc851300487342278b1b3c2e56420622
Specs
Version
OS
Any
Browser
Any