docs(website): hint feature docs + cast (content for c84a640)
Completes the preceding empty-rename commit: the getting-help "Hints" section — F1 for a tier-3 teaching hint on the live input, `hint` to explain the most recent error — with the real rendered block and a cast showing both (the live-input hint via the demo-mode Ctrl-G→[F1] alias, since autocast can't send F1, then `hint` on an error). the-assistive-editor points at F1; CtrlG added to the cast generator's key map.
This commit is contained in:
@@ -5,6 +5,8 @@ sidebar:
|
||||
order: 8
|
||||
---
|
||||
|
||||
import Demo from '../../../components/Demo.astro';
|
||||
|
||||
The playground has help built in, so you rarely need to leave it.
|
||||
|
||||
```rdbms
|
||||
@@ -23,5 +25,35 @@ help types
|
||||
```
|
||||
Shows the type reference on its own.
|
||||
|
||||
## Hints — a deeper nudge
|
||||
|
||||
`help` is the reference; **`hint`** is the teaching nudge for what you are doing
|
||||
*right now*. A hint goes beyond the always-on colour and the ambient
|
||||
[hint line](/using-the-playground/the-assistive-editor/#hints): it explains what
|
||||
a command does, shows a worked example, and names the underlying relational
|
||||
concept.
|
||||
|
||||
<Demo src="/casts/hint.cast" title="F1 hints the command you're typing; after an error, the hint command explains it." />
|
||||
|
||||
Press <kbd>F1</kbd> while typing to get a hint for the command you are building:
|
||||
|
||||
```
|
||||
Hint
|
||||
What: Add one or more rows to a table.
|
||||
Example: insert into Customers values ('Ann', 'ann@example.io')
|
||||
Concept: A row is one record; each value lines up with a column, in order. Columns typed `serial`/`shortid` fill themselves — leave them out.
|
||||
```
|
||||
|
||||
After a command fails, the **`hint`** command explains the most recent error —
|
||||
what went wrong, an example of the fix, and the concept behind it:
|
||||
|
||||
```rdbms
|
||||
hint
|
||||
```
|
||||
|
||||
A submitted command can't see your half-typed line, which is why the live-input
|
||||
hint is on <kbd>F1</kbd> while `hint` covers the last error. Both work in simple
|
||||
and advanced mode.
|
||||
|
||||
Outside the app, run `rdbms-playground --help` for the
|
||||
[command-line options](/using-the-playground/command-line-options/).
|
||||
|
||||
@@ -45,6 +45,10 @@ would fit, the type expected at the current position, and help with the most
|
||||
recent error. When the input is empty it reminds you that <kbd>Tab</kbd>
|
||||
lists options and `help` lists commands.
|
||||
|
||||
For a deeper, teaching-grade hint — what a command does, a worked example, and
|
||||
the relational concept behind it — press <kbd>F1</kbd> while typing (or run
|
||||
`hint` after an error). See [Getting help](/using-the-playground/getting-help/).
|
||||
|
||||
## Editing the line
|
||||
|
||||
Move and edit within the line with the usual keys: <kbd>←</kbd>/<kbd>→</kbd>
|
||||
|
||||
Reference in New Issue
Block a user