Skip to content

feat(menu-bar): keep tutorials and debug in the ? menu and add the other help items - #2067

Merged
smalruby3-editor-bot[bot] merged 202 commits into
topic/tutorials-upstreamfrom
topic/autopilot-2025
Nov 17, 2026
Merged

smalruby3-editor-bot[bot] merged 202 commits into
topic/tutorials-upstreamfrom
topic/autopilot-2025

Conversation

@smalruby3-editor-bot

Copy link
Copy Markdown

概要

チュートリアルを上流に戻したあとも、チュートリアルとデバッグは右上の「?」メニューの中に置く(EPIC #1935 の 3 つめ)。あわせて、人間が決めた「?」メニューの項目(2026-11-16 の答え t4)をそろえ、並びを 1 か所で変えられるようにした。

#2065(#2024 の revert)の上に積んでいる。#2065 を topic/tutorials-upstream に merge すると、この PR の差分はこの PR の分だけになる。

「?」メニューの並び(AI の提案)

まとまり 項目
1 チュートリアル / デバッグ
2 不具合を知らせる
3 ウェルカムをもう一度見る / スモウルビーについて / バージョン

理由:

  • よく使うヘルプを上に: 「?」を開く人は困っていることが多いので、チュートリアル・デバッグを一番上にした(いまの develop と同じ位置)。
  • 不具合を知らせるは別のまとまり: ヘルプとは目的が違い、押すと報告の画面が開くので、区切り線で分けた。
  • スモウルビーのことは下に、バージョンは一番下: ふだん使わない情報なので下にまとめた(help before about)。バージョンは不具合を知らせるときに見る情報なので、ほかのアプリと同じく一番下。

並べかえやすさ: 並びと区切りは src/lib/help-menu.js の HELP_MENU_SECTIONS(id の配列の配列)だけで決まる。並べかえ・区切りの変更はこの配列を書きかえるだけでよい(arrangeHelpMenu は、並びに無い項目を最後のまとまりにそのまま足す)。

変えたこと

  • src/lib/help-menu.js(新規): HELP_MENU_SECTIONS・arrangeHelpMenu(並べる純粋関数)・shortVersion(コミットの sha を 7 文字に)。
  • components/menu-bar/menu-bar.jsx(マーカー help menu): チュートリアル・デバッグ・バージョンと onClickAbout の項目を arrangeHelpMenu で並べ、まとまりごとに MenuSection で描く。
    • バージョン: バージョン: <sha 7 文字>(手元のビルドは「開発版」)。押すと version.json で新しい版を確かめ、あれば今あるロゴの吹き出しで知らせる(versionChecker.check())。
  • components/gui/gui.jsx(マーカー about menu): 「スモウルビーについて」「ウェルカムをもう一度見る」に並びの id と data-testid を付け、「不具合を知らせる」(不具合の報告の画面を開く。isBugReportConfigured() のビルドだけ)を足した。タブの右の「不具合を報告」のリンクはそのまま。
  • 翻訳: gui.menuBar.reportBug・gui.menuBar.version・gui.menuBar.versionDevelopment を en / ja / ja-Hira に。
  • data-testid: menu-bar-help-bug-report・menu-bar-help-welcome・menu-bar-help-about・menu-bar-help-version(menu-bar-help-tutorials / -debug は前から)。
  • 上流の integration テスト how-tos.test.js・tutorials-shortcut.test.js の describe.skip を外した(上流のチュートリアルが戻ったので)。how-tos は「?」メニューから開く形(前からのマーカー)。
  • test/helpers/ignorable-severe-logs.js に 8 番を足した: チュートリアル一覧の LibraryItem の id が undefined という上流の警告。上流の隠しチュートリアル(wedo2-getting-started・ev3-getting-started・whats-new)に img が無く、constructKey が undefined になるため。チュートリアルは上流のまま使うので直さず、TipsLibrary の中の警告だけを除く(上流のテストは getLogs が何も返さない不具合のためこの警告に気づいていない)。
  • docs: docs/menu-bar/README.md(項目・並びの理由・data-testid・主要ファイル)、docs/maintenance/smalruby-markers-gui.md。「?」メニューのスクリーンショットの撮り直しは docs(tutorials): チュートリアルを上流に戻したことを docs とスクリーンショットに反映する #2026。

確かめたこと

  • npm run lint(scratch-gui)
  • unit: test/unit/lib/help-menu.test.js(新規)・components/menu-bar-help-menu.test.jsx(並び・バージョンの表示・押したときの確認を追加)・helpers/ignorable-severe-logs.test.js・components/menu-bar.test.jsx・menu-bar-lessons.test.jsx・menu-bar-classroom.test.jsx
  • integration(build:dev のあと 1 つずつ): smalruby-help-menu.test.js(並びと、上流のチュートリアルが開くことを追加。6 件)・how-tos.test.js(1 件)・tutorials-shortcut.test.js(2 件)

人間に決めてほしいこと(任意)

  • タブの右の「不具合を報告」のリンクを残すか(「?」メニューにも入ったので重なっている)。この PR では残した。
  • バージョンを押したときの動き(いまは新しい版を確かめるだけ)。

Closes #2025

🤖 Generated with Claude Code

smalruby3-editor-bot Bot and others added 30 commits November 14, 2026 01:33
…ade 2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Define the hints of read-and-build challenges, the data the swimlane is
drawn from, and keep the quiz position as the EPIC says until a human decides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Put the quiz in the done balloon, allow 5 challenges and setup-loaded starts
in lessons 4 and 5, count lesson 5 by one theme, keep the mesh connection,
and let the lesson table scroll once there are 2 or more block courses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(lessons): 中 2「チャットをつくろう」の方針を design.md に書く
A challenge with `quiz: { question, choices, answer, explanation }` now shows
a 3-choice quiz inside the "You did it!" toast (also in "Lesson n complete!"
and "Assignment cleared!"). Choosing shows correct / wrong and the
explanation, and the student can choose again any number of times. The quiz
is not part of the completion check and nothing is recorded.

- courses.js: `quiz` default, `challengeQuiz(id, answer)`, `validateQuiz`
- lesson-completed-quiz.jsx: the quiz part (data-testid lesson-quiz-*)
- lessons.locale.js: quiz words in en / ja / ja-Hira
- docs/lessons: data format, testids, screenshots 0104-0106

Closes #1639

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s a11y

Address the round-1 review of PR #1812.

- Q1: tapping the task bar full text no longer dismisses a toast with a quiz.
  The toast is hidden while the full text is open (lessonMode.completedHidden,
  hideCompleted / showCompleted) and shown again with the same answer when
  the panel closes. "Keep looking" stays an explicit dismissal.
- FYI1: the quiz is a radiogroup of radios, the result starts with the
  chosen number so every pick is read, and the inner live region is gone.
- FYI2: courses.test.js checks the ja-Hira quiz words have no kanji.
- FYI3: picking a choice does not close the toast or go to the next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Draw a simple activity diagram (SVG) from the answer program of a
challenge and show it in the full task text and on hint page 1 when
the challenge sets activityDiagram: true. Mesh challenges with a
partner definition get swimlanes.

The model and layout are pure functions over the blocks that the
Ruby to blocks converter makes from the answer code.

Refs #1637

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(lessons): 「できた!」の中に 3 択のふりかえりのクイズを出す
…utopilot-1637

# Conflicts:
#	docs/lessons/README.md
#	packages/scratch-gui/src/containers/lesson-mode.jsx
#	packages/scratch-gui/src/lib/lessons/courses.js
- read the practice partner in the #1638 shape (label/onBroadcast,
  set, broadcast) and write the shape in design.md
- keep the diagram at a readable scale; the full text shows a line
  pointing to the hint when it does not fit, the hint scrolls
- test the hook cache, repeat until, nesting and empty answers
- no end symbol after forever; add a title and a text alternative

Refs #1637

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rowser

A challenge can define a data-only partner (name, buttons, automatic replies).
The panel next to the stage acts as the partner on the mesh without the server:
values go to the mesh extension's remoteData, messages start the receive hats.
It does nothing while the real mesh is connected and removes what it put in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge of the quiz branch kept the old expectation of defineChallenge
without the two new defaults, so courses.test.js failed in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the data-only partner shape, the in-browser loopback, the panel place at
1300x600 (top right of the code area, the stage column does not move) and that
the mesh group survives a challenge change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(lessons): 答えのプログラムからアクティビティ図を描き、課題の全文とヒントの 1 ページ目に出す
…utopilot-1638

# Conflicts:
#	packages/scratch-gui/.prettierignore
#	packages/scratch-gui/src/lib/lessons/courses.js
- remember the node id of each own seeded value and remove it from that node
- keep one pending reply per message name (cap 100), like fireEvent merges
- remove practice values at the step after connecting starts
- move focus to the open button / first partner button when the panel toggles
- drop the unused hasPracticePartner and document that sentBy cannot tell
  mesh messages apart

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(lessons): add the mesh practice partner that loops back in the browser
A challenge with mode: 'readDiagram' is given only by the explanation and
the activity diagram. The diagram is always shown, the task bar shows a
"read and build" tag, and the hint has only 3 pages: the diagram and the
explanation (auto-opened), a try page, and an answer page that draws the
whole answer in the balloon without replacing the student's program.
There is no last-resort page. Judging is the same as other challenges.

The hint balloon is now placed and sized below the lesson task bar, so
tall balloons next to the stage no longer hide their header under it.

Closes #1640

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Q1: the answer page draws code, or the first spriteCodes entry when
  there is no code, and names whose program it is when there is more
  than one script (e.g. "Program of Cat").
- Q2: courses.test.js checks every readDiagram challenge has an answer
  program; applyChallengeMode warns in development and never throws.
- FYI1: test the inline max-height of the hint below the task bar.
- FYI2: center the hint with no target in the area below the task bar.

Refs #1640

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(lessons): 説明とアクティビティ図だけで指示する「読んで作る」チャレンジ
…nswer

Add setup.sprites (replace the cat of the new project with library sprites
such as Shimaraby and Shimacat), setup.code / spriteCodes / stageCode (put the
answer of the previous step into the project when the challenge starts) and
allow a list of names in the goal trigger.message so either role of a pair
passes.

Closes #1936

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mark the project unchanged after the start set it up (no "replace the
  project?" when choosing another challenge)
- show Shimaraby / Shimacat in the words of the locale in the diagram headings
- skip a sprite or a program that fails and go on; stop when another
  challenge or project takes over
- convert in the Ruby version of the setup; take an added sprite by the diff;
  share the choice of the code sprite with "insert the program"
- check that every setup sprite is in the sprite library

Refs #1936

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e practice partner

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… from variables

- the practice partner panel shows one line: the last message the student
  project sent (with the shared value of the same name) or the last shared
  variable and its value (D3)
- a partner value may be { fromVariable } to use the value of a variable of
  the student project, or empty without it; the diagram draws it as
  "(name の値)" (D4)

Closes #1937

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(lessons): start challenges with library sprites and a previous answer
Keep the panel width; fix the line area at two lines (overflow is cut, the full text is in the
title) so the panel height never moves. Shorten the prefix to "届いた:" / "とどいた:" / "Received:".

Refs #1937

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- reattach the loopback per challenge so a challenge with the same partner
  starts over (M1)
- show only the variables the partner uses, tell at most once per frame, and
  read aloud only when a message reached the partner (Q1)
- read the partner lane of the diagram with normalizePartner, the same as the
  practice panel, including per-locale names (Q2, Q3)
- match the variable of a message by exact name first (FYI2); say "up to two
  lines" in the comments (FYI1)

Refs #1937

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… panel

Add an optional `watch` (names of student variables, per locale too) to the
partner definition. They join partnerNames, so the panel shows them even when
the partner itself does not use them (3-3: the own mood). Partners without
`watch` work as before.

Refs #1937

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
smalruby3-editor-bot Bot and others added 24 commits November 17, 2026 14:34
Course and lesson headings become buttons (aria-expanded / aria-controls,
Enter and Space). When the library opens, only the course in progress and
its current and next unfinished lessons are open; done and later lessons
fold into one line with a dot per challenge. Searching and the class
assignment library open everything. The rule is the pure initialFoldState
in lib/lessons/library-fold.js.

Refs #2148

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #2148

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #2148

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ints change

0-5 starts with turn 15 degrees and go to mouse-pointer, so hint 1 changes the number
and hint 2 the ▼ of blocks already in the code area; the goal checks both.
0-6 starts with Shimaraby (2 costumes) and only asks to choose the 2nd costume.
Hint balloons no longer cover the costume/sound list or the scripts in the code area.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(lessons): make the guide button match the hint button
…eat/lessons-l0-content-2146

# Conflicts:
#	packages/scratch-gui/src/lib/lessons/courses.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests

Lesson 2 and 3 start folded, so open them before measuring the card bands,
and pick only the lesson sections (the headings now have testids too).

Refs #2148

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(hosting): 本番の CloudFront のアクセスログを非公開バケットに残す
feat(hosting): DNS と配信内容を照合するスクリプト
# Conflicts:
#	docs/infra/smalruby-web-hosting.md
feat(lessons): give lesson 0 a two-costume sprite in 0-6 and clearer blocks in 0-5
# Conflicts:
#	docs/infra/smalruby-web-hosting.md
#	infra/smalruby-web-hosting/test/web-hosting.test.ts
feat(lessons): fold the lessons library to the lessons in progress
feat(hosting): prod に smalruby.app の Route 53 ゾーンを作り、お名前.com のレコードを写す
Re-render the map with the guide button in the task bar, and call the button
ガイド in the teacher script. Hints now open in every challenge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the minimize button

Retake the task bar and hint screenshots of lesson 0 and lesson 1 that still
showed the old part names button or the close button of the hint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(lessons): finish the first step with the guide button (0.1.2 and screenshots)
feat(lessons): first step — lesson 0 and help for stuck students
Keep the first-step lesson (#2136) and point it at lib/lessons/apply-setup.js
(applySetup / normalizeRubyVersion) instead of the moved lib/deck-setup.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot-2024

Keep the first-step lesson and the standard assignments from develop next to
the reverted tutorials: the activity diagram locale import, the sprite-library
marker row, and both the assignments and the tutorial images in the precache
exclusions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
stg — 3909838d Deployed Nov 17, 2026 by smalruby3-editor-bot[bot] via cleanup #371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant