Skip to content

Help Document Object, Function, and other built-in objects #399

Open

Description

@nwinter

(See also #1237)

Calling all Scribes! In the spell palette, we currently have documentation like this:

screenshot 2014-02-22 12 46 56

We need to fill out all sorts of new documentation Components to document JavaScript's global objects:

  • programming.UsesVector
  • programming.UsesSnippets - we could use more snippets, especially for non-JS languages
  • programming.UsesMath - thanks Bahador
  • programming.UsesString - thanks Prabh
  • programming.UsesArray - thanks Prabh and Ting-Kuan
  • programming.UsesObject - thanks Karan
  • programming.UsesFunction
  • programming.UsesDate - thanks Admsugar
  • programming.UsesJSON
  • programming.UsesGlobals
  • programming.UsesNumber
  • programming.UsesRegExp
  • programming.UsesLoDash

There's a new process with this that just uses the level editor patch system, so you don't have to set up your dev environment or anything.

0. Comment here to claim one of the Components.

1. Open the Tiny level in the level editor.

screenshot 2014-06-26 10 54 29

2. Click the Components tab.

screenshot 2014-06-26 10 55 23

3. Click on one of the programmable.UsesXYZ Components.

screenshot 2014-06-26 10 56 10

4. Click the Component's Settings sub-tab.

screenshot 2014-06-26 10 57 33

5. Open the Property Documentation at the bottom.

screenshot 2014-06-26 10 56 53

6. Document the standard properties from the MDN docs.

screenshot 2014-06-26 11 00 24

Look at programmable.UsesMath for a good example. You can use Markdown. Try to keep things short, though, since the documentation goes into a little popover. Rewrite examples to make sense according to CodeCombat's programming environment when possible.

7. Add the property names to the Config Schema subtab, too.

screenshot 2014-06-26 10 59 10

_You'll want all the property names to be in the programmable_Propertiesenum, and the most useful ones to be in thedefault array.*

8. Click "Save" to submit a patch (upper right).

screenshot 2014-06-26 17 14 14


If you get really ambitious (see also #1237), each piece of property documentation might need its syntax updated to fit with Python, CoffeeScript, Clojure, Lua, or Io–you can submit patches that add those syntax translations by changing the schema selection from a single value to an array of values by language:

screenshot 2014-06-26 11 02 55 screenshot 2014-06-26 11 04 14

Activity

  1. krans4u commented on Feb 28, 2014

    @krans4u

    I am documenting UsesObject Component

  2. krans4u commented on Feb 28, 2014

    @krans4u

    @nwinter I sent you the JSON content of programming.UsesObjects component to [email protected]. - Karan Dhamele

  3. makertech81 commented on Sep 10, 2014

    @makertech81
    Contributor

    I'm doing Uses RegExpression.

  4. makertech81 commented on Sep 10, 2014

    @makertech81
    Contributor

    I am now doing Programming.Programmable because RegExp wasn't there. @nwinter Why is that?

  5. makertech81 commented on Sep 10, 2014

    @makertech81
    Contributor

    I am back to RegExp Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions