Comments (9)
I think the autocomplete box in jsdares worked pretty well, I have seen most novice learners use it without any problems. Most people start typing "robot." by example, and then see the autocomplete box. Some people copy/paste lines from the example, but eventually they discover the autocomplete box too.
It's a flexible interface for discovering new methods (not just the ones in an example). It also scales nicely to real-world programming, although there autocomplete boxes are often not as nice (no preview, or no context-awareness) ;-)
If you're going to do this, I would like to suggest doing it a bit better than jsdares and show some more information, e.g. little icons (like Bret Victor proposes), or named arguments instead of just numbers, or small method descriptions.
from codecombat.
Yeah many people expect this, including me. A lot of people already get frustrated when nothing happens after pressing CTRL+Space ( a code assist combination in many IDE's ). so maybe show a message box (maybe just when you do CTRL+SPACE) that tells that the auto complete function is not yet implemented but will be done soon.
from codecombat.
@tips48 has started integrating ACE's new autocomplete to get started, but we'll need a way to feed in the available properties from Aether.
from codecombat.
@tips48 how far did you end up getting with this? Care to share any progress?
from codecombat.
It would be enough to allow to click-insert spells from available spells interface. Right now it's tedious to write commands, therefore inherently not fun for my kids :/.
from codecombat.
@dkundel has been working on this with Zatanna.
from codecombat.
BTW I think we can close this issue? We got the autocomplete and the click to insert snippets part.
from codecombat.
Yeah, it's largely done. I see a few issues remaining with it:
1. Autocomplete often inserts invalid code
I should be able to select the autocompletion even after typing this and have it work. It should also do the semicolon for me.
2. Autocomplete requires semi-advanced keypresses
I have to press either tab-tab, down-tab, or down-enter to trigger the first autocomplete snippet. I would prefer it if we can let them also just press tab to do the first one (or even enter if what they have typed couldn't be a valid end of line). Glen mentioned Ctrl+Space–I'm not sure how common that is, but if it's really standard, we might try to support it. I think it will conflict with keyboard input method selection shortcuts a lot of the time, though.
3. Autocomplete z-layering goes above spell palette
Should be easy to fix.
4. Autocomplete tries to complete when typing in a comment or string
5. Autocomplete maybe shouldn't autocomplete numbers
While it's cool that it can do that, this seems like it would be useful less of the time than it would be confusing.
At some point soon I think we're going to need to make the snippet insertion much smarter to take advantage of the available methods and only insert valid code (especially on iPad), but we can do that one in a separate issue.
from codecombat.
- Is kind of difficult to fix. I have it in mind but for now the quickest (appropriate) fix would be to actually not prefix with
this.
and I left out the semicolon because sometimes you want to have multiple statement in the same line (i.e. in anif
statement). The problem is that some people actually referencethis
as$this
or similar which gives it a different degree of complexity also with respect of parsing and understanding the code. The question is how much benefit this would give. Alternatively we could wrap thethis.
as an argument using the${1:this.}
syntax and this way you can quickly remove the statement. - I'll look into that. I need to copy paste the default code again and override it similar as I did it with other parts of the ace code but it should be doable.
- Shall be fixed. Just need to find the
z-index
of the spell palette - If I end up copy and pasting the code from ace to Zatanna then I can add this as well. For now I only included the code that leaves out information from the commented section to be offered as autocomplete suggestions.
- I thought I excluded them already but I'll add it.
from codecombat.
Related Issues (20)
- Sometimes no background music and no enemies appear. HOT 1
- I would like to translate all dynamic content into Japanese at once using ChatGPT. HOT 2
- Portuguese (Brazil) - English content in enemy-mine level HOT 2
- Virtual ISO with CodeCombat
- Sweep: fix comment whitespace issues in translate-utils.coffee HOT 3
- Sweep: fix comment whitespace issues in translate-utils.coffee HOT 7
- Javascript: String.match() no longer works. Including the Sample code given.
- How to start?
- Unable to send translated text. HOT 2
- Hi everyone ! i can't copy a new level from a existing level HOT 1
- Unhandled error: distance's argument target... but got null HOT 2
- Seek-and-Hide Collision failure when hero is Okar HOT 1
- Terkunci semua nya all organisasi pemilik HOT 1
- Delete data HOT 1
- Fix this 2
- I can't install using docker HOT 5
- Buttons with long labels
- Unhandled error: TypeError: Cannot read properties of undefined (reading 'attackDamage') HOT 1
- "The Wizard's Door" & "Deja Brew" - level bugs - Java
- Issues with display HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codecombat.