Magikcraft / product-board

Release Notes for Magikcraft - what's new and noteworthy. Also: open issues or feature requests here.
https://www.magikcraft.io
1 stars 0 forks source link

Fix Intellisense #15

Closed jwulf closed 6 years ago

jwulf commented 7 years ago

User Story

As a user I can type in my spellbook and get autocompletion.

Background

Currently, the broken Intellisense is imported from:

https://gist.githubusercontent.com/jwulf/d5aae2bb16b8d20aecfc0e31fe0923d8/raw/e72de71e6eca4c229d69322b65201d9126270fb8/magikcraft.io.d.ts

Feature Description

Intellisense should work out of the box.

The spell editor should save files as .js, but should be in TypeScript mode so that it provides autocompletion and static analysis.

Acceptance Criteria

  1. Open play.magikcraft.io
  2. Click New Spell.
  3. Start typing: magik.
  4. Observe the autocompletion.

User Acceptance Test Plan

Here is the process for testing this feature:

End-User Documentation

[Docs that can be copypasta to the user docs]

jwulf commented 7 years ago

This one works: https://gist.githubusercontent.com/jwulf/2b3af7f1809cc09c971df021da051fba/raw/888d3bbd3ca15ab37a715627e38408a9dcb331b5/Intellisense-test.d.ts

jwulf commented 7 years ago

@triyuga can we please switch the editor back to TypeScript mode by default, so that the intellisense is on.

Actually, it works in JavaScript mode too, when it is working.

jwulf commented 7 years ago

It works in TypeScript and in JavaScript.

I pushed some changes to the Play app tonight that broke it. Custom intellisense doesn't work any more. I was trying to get this one working as a default - but now neither the default works, nor do custom intellisense settings work.

triyuga commented 7 years ago

1.

I've separated the Intellisense and App Settings forms in the PlayApp, and added some documentation to make it more clear.

screen shot 2017-09-22 at 11 32 37 pm

2.

I reverted the Intellisense loading back to pre-broken state. Important Note The Intellisense URLs set via the PlayApp is global for all users, stored in MySQL, via GraphQL.

3.

Github raw URLs cache for upto 10 mins so are impractical for content like Intellisense which we need to be able to edit and have those changes reflected in the PlayApp immediately.

So to avoid the cache I am now pointing the Intellisense URL to the Content Github API and at a file in a full-fledged Git repo (no longer from a Gist!).

Example of such a URL: https://api.github.com/repos/Magikcraft/play-app-intellisense/contents/magikcraft.io.d.ts

@jwulf you can now edit the Intellisense here: https://github.com/Magikcraft/play-app-intellisense/blob/master/magikcraft.io.d.ts or via your local editor

4.

From what I can see now the Intellisense files are loading fine from the URLs, its just the actual Intellisense defs file is somehow broken.

@jwulf Please take a look at that! The above upgrades I did should now make debugging that much easier.

jwulf commented 6 years ago

This is fixed.