frostyfan109 / tranql

A Translator Query Language
https://researchsoftwareinstitute.github.io/data-translator/apps/tranql
MIT License
0 stars 1 forks source link

Autocomplete #47

Closed stevencox closed 5 years ago

stevencox commented 5 years ago

Autocomplete is not working. Investigate making it work with CodeMirror2 or, if not, reverting to CodeMirror.

/beta2

frostyfan109 commented 5 years ago

Fixed.

stevencox commented 5 years ago

This is coming along really nicely.

One thing to think about, when I start with this and choose a predicate via autocomplete:

image

The complete-to-arrow logic seems to overwrite characters in the query rather than inserting so the next state is:

image

Anyway, this feature will be a big help.

frostyfan109 commented 5 years ago

Huh, that's strange. It's supposed to replace the selection of characters already entered into the predicate. For example, if I had select gene-[direct it would replace direct with something like directly_interacts_with. This is so that you don't end up with select gene-[directdirectly_interacts_with]-> I guess rather than replacing it must be overwriting from the starting index.

Update: It looks like codemirror's autocomplete doesn't work quite how I thought it had and already natively inserts text rather than overwriting it. Since I had it trying to insert instead of overwrite even though it already inserts, it ended up overwriting instead.

frostyfan109 commented 5 years ago

Fixed