Skip to content

Adding moves

In the getting started guide, you learned how to initialize the extension with a sample demo. In this guide, you will learn how to add your scene moves to the act configuration.

In version 1.9.0, Demo Time introduced a new Act Editor GUI that makes it easier to create and manage your scenes and its related moves. That means that you now have the option to create your scenes in a more visual way, without having to edit JSON or YAML files directly. You can still have the option to switch back to the code view if you prefer by setting the demoTime.openInConfigEditor setting to false.

Adding your first moves

Now that you have initialized the extension, you can start adding your first moves.

You can open the newly created demo.json file in the .demo folder manually, or you can click on the “eye” icon in the Demo Time view to open the moves editor.

Open the first act file

Once the demo.json file is opened, you will see the visual editor to create new scenes and moves.

Act Editor

Click on the Add Scene button to create your first scene.

Adding your first scene within the Act Editor

In the Scene Information section, you can define the settings for your scene like:

  • Title: The title of your scene.
  • Description: A brief description of what your scene does.
  • Scene ID: The unique identifier for your scene, which can be used to trigger the scene via the API, URI Handler, or runById action.
  • Icons: The icons that will be used in the tree view panel.
  • Notes: Any additional notes or information about your scene.

Adding moves

After the first scene is created, you can start adding moves. Each move that you add to a scene will be automatically ran in sequence when the scene is triggered. Click on the Add Move button to create your first move.

Adding your first step within the Act Editor

In the Action dropdown, you can pick the action to perform for your step. The GUI will guide you through the available options per action.

Provided the step settings for the create action

Once a move is configured, you can add additional moves, or new scenes. Here is an example to open the file after the create action:

Open the newly created file

In the header of the Act Editor, you can see the validation status. If you click on the message, you can see the detailed validation errors and warnings for your demo configuration.

Validation status in the Act Editor

Adding moves from a file

When you have a file open in the editor, you can add a move to your act file by using the command Demo Time: Add scene.

For example, if you want to highlight a piece of code, you can select the code and do the following:

  1. Open the command palette by pressing Ctrl+Shift+P or Cmd+Shift+P.
  2. Search for the Demo Time: Add scene command.
  3. Click on the highlight action in the command palette.
Add a move from the "Demo Time: Add scene" command
  1. Select the act file in which you want to add the step (only if you have multiple act files).
  2. Select if you want to add it to an existing demo or create a new one.

Executing the demo

Each demo you add will be available in the Demo Time view. You can execute each step by clicking on the scene title or starting the presentation mode.

First demo implementation

Adding notes to your scenes

You are also able to add notes to your scenes. These notes can be used to provide additional information for yourself or others who will be executing the scene.

The notes should be created as a markdown file.

When you open one of your acts in the Act Editor. Under the Scene Information section, you have the option to link a markdown file containing your notes or create a new one.

Configure notes in the Act Editor

By checking the Show notes file when demo is triggered option, the notes file will automatically open to the side of your editor when the demo is triggered.

Implementing other scenes and moves

You can add more scenes and moves to the scenes array. In the actions section of the documentation, you can find all the available actions you can use to create your scenes.