feat: add instructions guide link and update demo instructions - #1603
Merged
Conversation
maxelkins
temporarily deployed
to
previews/1603/merge
August 18, 2026 14:32 — with
GitHub Actions
Inactive
maxelkins
force-pushed
the
instructions-guide-link
branch
from
August 18, 2026 14:50
e01afaa to
2b005b5
Compare
maxelkins
temporarily deployed
to
previews/1603/merge
August 18, 2026 14:50 — with
GitHub Actions
Inactive
maxelkins
temporarily deployed
to
previews/1603/merge
August 19, 2026 10:03 — with
GitHub Actions
Inactive
maxelkins
temporarily deployed
to
previews/1603/merge
August 20, 2026 10:25 — with
GitHub Actions
Inactive
maxelkins
temporarily deployed
to
previews/1603/merge
August 20, 2026 10:26 — with
GitHub Actions
Inactive
maxelkins
temporarily deployed
to
previews/1603/merge
August 20, 2026 10:27 — with
GitHub Actions
Inactive
maxelkins
temporarily deployed
to
previews/1603/merge
August 20, 2026 10:32 — with
GitHub Actions
Inactive
maxelkins
marked this pull request as ready for review
August 20, 2026 10:35
Panels could only add buttons to their header. A `headerContent` node prop lets a panel put anything else there - a link, status text, a filter control - rendered as-is below the heading and buttons, with the panel owning its styling. The alternative was to keep reusing the existing `buttons` slot, which does accept arbitrary nodes, but it is named and laid out for buttons and forms part of the host sidebar-plugin contract, so overloading it would blur both. `buttons` is left untouched, so the other panels and existing plugins are unaffected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Teachers writing project instructions had no pointer from the editor to the help centre guide on how to write them, so the instructions panel header now links to it. The link is gated on `instructionsEditable` rather than a new teacher flag. There is no role concept in this codebase; hosts set `editable_instructions` only for people authoring instructions, so it is already the de facto teacher signal, and reusing it keeps the gate consistent with the rest of the panel's edit UI. A dedicated attribute would have meant plumbing through web-component.jsx, WebComponentLoader and WebComponentProject for no difference in behaviour today. Styled with the design system's `rpf-link` rather than a bespoke class, so it picks up link colours and focus states in both themes for free. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The demo instructions a teacher gets when they first enable instructions described three Markdown features and demonstrated none of them. Because the panel renders the content, the document can be its own worked example: a teacher toggling between Edit and View sees the syntax and the result side by side, with no screenshots to keep in sync. The rewrite covers every feature the renderer actually supports — text styling, headings, paragraphs and line breaks, lists, links, inline code, code blocks, block-type colouring, real blocks, and escaping — and opens by telling the teacher to replace the text, since many will start typing at the top and never scroll.
Every line of prose is a translation key, so translators receive whole sentences rather than fragments to reassemble. The alternative was keeping the Markdown markers in the template and keying only the words between them, which would stop a translator breaking a `**` pair, but it splits most sentences into two or three keys and makes the template hard to read. Whole lines won on clarity.
The human-facing strings inside the two code examples are translated too, but the surrounding code is not: scratchblocks only draws real blocks when the block wording matches the editor exactly, so a translated `say` or `when green flag clicked` would render as an unrecognised grey block.
The Python greeting uses an f-string, `print(f"{{...pythonGreeting}}")` with the key holding `Hello, {name}`, rather than the concatenation it replaces. Keying `"Hello, "` for use with `+ name` would have put grammar in the template and a trailing space at the end of a translation string, where it is likely to be trimmed. The f-string hands the translator the punctuation, the spacing and the word order together. `populateMarkdownTemplate` only substitutes double-braced placeholders, so the single-braced `{name}` reaches the rendered Python untouched.
Only en.json is updated; Crowdin overwrites the other locales, and missing keys fall back to English until it syncs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
maxelkins
force-pushed
the
instructions-guide-link
branch
from
August 20, 2026 10:46
512a8c4 to
f7e32c3
Compare
maxelkins
temporarily deployed
to
previews/1603/merge
August 20, 2026 10:46 — with
GitHub Actions
Inactive
zetter-rpf
reviewed
Aug 20, 2026
Comment on lines
+49
to
+62
| ## {{instructionsPanel.demoInstructions.colouringHeading}} | ||
|
|
||
| {{instructionsPanel.demoInstructions.colouring}} | ||
|
|
||
| ## {{instructionsPanel.demoInstructions.realBlocksHeading}} | ||
|
|
||
| {{instructionsPanel.demoInstructions.realBlocks}} | ||
|
|
||
| ```blocks | ||
| when green flag clicked | ||
| say [{{instructionsPanel.demoInstructions.blocksGreeting}}] for (2) seconds | ||
| ``` | ||
|
|
||
| {{instructionsPanel.demoInstructions.blockSyntaxReference}} |
Contributor
There was a problem hiding this comment.
Could this be confusing to people adding instruction to python/html projects?
Contributor
Author
There was a problem hiding this comment.
Yeah take your point. We could have different instructions per project type. But I think I'm comfortable enough for it to stay in for now but I'll add a bit about it being useful in Blocks projects.
zetter-rpf
approved these changes
Aug 20, 2026
maxelkins
temporarily deployed
to
previews/1603/merge
August 20, 2026 13:12 — with
GitHub Actions
Inactive
…een added. Reference in the empty state.
maxelkins
temporarily deployed
to
previews/1603/merge
August 20, 2026 13:16 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Teachers writing project instructions had no pointer from the editor to the help centre guide on writing them, so the instructions panel header now links to it. The link is gated on
instructionsEditable, which hosts set only for people authoring instructions, so students never see it.Changes
headerContentprop toSidebarPanelso panels can put arbitrary content in their header, not just buttonsrpf-linkrather than a bespoke classinstructionsPanel.guideLinkstring toen.jsonNote
The instruction styles aren't great. There is weird spacing etc. But thats a bigger job for another issue.
Screenshots