The guided tour¶
Audience: new users · ~5 min · Prerequisites: Install
What it is¶
A six-step tour that shows the whole loop on a tiny program: look at a model, break it, see the editor catch it, run it, generate code from it. It points at the real parts of the screen with a highlight and a small card, and it waits for you to do each action yourself. It differs from the getting-started walkthroughs, which are a checklist in a tab: the tour works on the live editor.
It never starts by itself.
Start it¶
- Welcome page: choose Take the tour (in the Help group).
- Command palette: run Take the Tour.
- In the browser editor with no project open, the Take the tour button on the empty screen does the same.
Starting it opens the Guided tour sample (samples/tour/): a five-line shopping total. Starting it again starts over.
The seven steps¶
| Step | What you do | The tour moves on when |
|---|---|---|
| 1. This is a model, not text | Read the card; click any word to see it is editable. | You press Next. |
| 2. Break it | On the line shown = total, click shown, type total, click away. The line now assigns a variable to itself. |
The editor reports a new problem. |
| 3. The editor noticed | Look at the underlined line; hover it for the message. | You press Next. |
| 4. Run it | Run > Execute > Run Program (F5). The warning does not stop the run, and the output shows Total: 120. |
A run starts. |
| 5. Generate code | Run > Run Generator. The Python for the program opens. | The generated code opens. |
| 6. Operators go on either side | Close the generated code (its ✕ button). Click the 3 on quantity = 3, press End, type + (gives 3 + _). Press Home and type + to put it on the other side. Hold Alt to see every key. Press Alt+Enter on any node for what you can do with it, such as showing it in another notation. |
An operator wraps a cell. See Operators and side-transformations. |
| 7. Space shows what can follow | Click price on total = price * quantity, press End and then Space. A menu lists what can follow a finished value: operators, a call, a member. Pick one with the arrow keys and Enter, or press Escape. |
You press Finish. |
On steps 2, 4, 5 and 6 the button reads Skip this step until you have done the action. Skip tour closes it at any time. The highlight never blocks the editor or the menus: the card sits in the bottom-right corner on the two menu steps so a menu's dropdown is never covered.
The "Design a language" tutorial¶
A second, nine-step tutorial uses the same highlight and card, but teaches the other half of struktJS: building a language. It never starts by
itself either. Start it with Design a language on the Welcome page or the empty editor screen, or run Help > Design a Language (Tutorial).
It does not open a sample: it works on your own project, building a small Shapes language from nothing.
| Step | What you do | The tutorial moves on when |
|---|---|---|
| 1. A language is a set of concepts | Read the card. | You press Next. |
| 2. Create the language | Right-click Languages in the Explorer, New Language…, name it Shapes, keep the Blank card. |
A language of yours exists. |
| 3. Name its first concept | Type Circle when the editor asks. |
A concept exists. |
| 4. Give it a slot | On the Structure tab add a line radius: number. |
A slot exists. |
| 5. Decide how it looks | Open the Appearance tab. | You press Next. |
| 6. Add a rule | Look at the Rules tab. | You press Next. |
| 7. Say what it prints | In Language settings, look at the Transformations section. | You press Next. |
| 8. Write a model in it | Explorer: right-click the project's name at the top, New model…. In the new model press Import a language…, pick Shapes and press OK, leaving the alias empty. |
A model written in your language exists. |
| 9. Compare with the finished one | File > Load Sample… > Basic Shapes shows the same idea finished. | You press Finish. |
Only languages you created count toward a step; bundled languages never complete one. As in the tour, a step you complete by acting reads Skip this step until you have done it, and Skip tutorial closes it at any time.
After the tour¶
The sample stays open, still edited. It is an ordinary project folder: use Undo, or git in a checkout, to go back to the original. For what comes next see Getting started and Writing and running tests.
What was verified
The tour was checked by an automated browser test against the standalone editor (which is also the hosted demo): start, all seven steps completed by really editing, running and generating, Skip tour, and a check that the overlay never takes clicks from the page. It has not yet been exercised inside the Theia IDE or the desktop app; there, the highlight on the Run menu depends on that menu bar's markup, and if it cannot be found the card is simply centred without a highlight.