From fbc65b0e4058b4fb1eeb28664449430f23c91cf6 Mon Sep 17 00:00:00 2001 From: "smalruby3-editor-bot[bot]" <297607354+smalruby3-editor-bot[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 13:25:46 +0000 Subject: [PATCH] =?UTF-8?q?fix(classroom):=20=E3=81=BF=E3=82=93=E3=81=AA?= =?UTF-8?q?=E3=81=AE=E8=AA=B2=E9=A1=8C=E3=82=AB=E3=82=BF=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=81=AE=E9=96=89=E3=81=98=E3=82=8B=E3=82=92=E3=80=8C=E6=88=BB?= =?UTF-8?q?=E3=82=8B=E3=80=8D=E3=81=AB=E5=A4=89=E6=9B=B4=EF=BC=88#1121?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「みんなの課題からさがす」画面のヘッダーボタンのラベルを「閉じる」から「戻る」に変更。 押すとカタログを閉じて課題一覧(1つ前の画面)に戻る挙動は既存のまま。ja/ja-Hira/en ロケールも整合。 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../classroom-modal/shared-assignment-catalog.jsx | 4 ++-- packages/scratch-gui/src/locales/en.js | 2 +- packages/scratch-gui/src/locales/ja-Hira.js | 2 +- packages/scratch-gui/src/locales/ja.js | 2 +- .../components/shared-assignment-catalog.test.jsx | 13 +++++++++++++ 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/scratch-gui/src/components/classroom-modal/shared-assignment-catalog.jsx b/packages/scratch-gui/src/components/classroom-modal/shared-assignment-catalog.jsx index c7308af6deb..edc94587b0d 100644 --- a/packages/scratch-gui/src/components/classroom-modal/shared-assignment-catalog.jsx +++ b/packages/scratch-gui/src/components/classroom-modal/shared-assignment-catalog.jsx @@ -438,8 +438,8 @@ const SharedAssignmentCatalog = ({ group, isLoading, shared }) => { diff --git a/packages/scratch-gui/src/locales/en.js b/packages/scratch-gui/src/locales/en.js index a72769defa6..9a65eee2726 100644 --- a/packages/scratch-gui/src/locales/en.js +++ b/packages/scratch-gui/src/locales/en.js @@ -373,7 +373,7 @@ export default { 'gui.classroom.shared.published': 'Published to みんなの課題: "{title}" (© {author} / CC BY 4.0)', 'gui.classroom.shared.openCatalog': 'Find in みんなの課題', 'gui.classroom.shared.catalogTitle': 'みんなの課題 — assignments shared by teachers nationwide', - 'gui.classroom.shared.catalogClose': 'Close', + 'gui.classroom.shared.catalogClose': 'Back', 'gui.classroom.shared.tabAll': 'Browse all', 'gui.classroom.shared.tabMine': 'My posts', 'gui.classroom.shared.filterAllLevels': 'All school levels', diff --git a/packages/scratch-gui/src/locales/ja-Hira.js b/packages/scratch-gui/src/locales/ja-Hira.js index 0f00609dda4..942c8d5fc9f 100644 --- a/packages/scratch-gui/src/locales/ja-Hira.js +++ b/packages/scratch-gui/src/locales/ja-Hira.js @@ -431,7 +431,7 @@ export default { 'gui.classroom.shared.passcodeImportBtn': 'このクラスにとりこむ', 'gui.classroom.shared.openCatalog': 'みんなのかだいからさがす', 'gui.classroom.shared.catalogTitle': 'みんなのかだい — ぜんこくのせんせいがきょうゆうしたかだい', - 'gui.classroom.shared.catalogClose': 'キャンセル', + 'gui.classroom.shared.catalogClose': 'もどる', 'gui.classroom.shared.tabAll': 'すべて', 'gui.classroom.shared.tabMine': 'じぶんのとうこう', 'gui.classroom.shared.filterAllLevels': 'すべてのがっこうしゅ', diff --git a/packages/scratch-gui/src/locales/ja.js b/packages/scratch-gui/src/locales/ja.js index a018aff8d67..7698d067acf 100644 --- a/packages/scratch-gui/src/locales/ja.js +++ b/packages/scratch-gui/src/locales/ja.js @@ -422,7 +422,7 @@ export default { 'gui.classroom.shared.passcodeImportBtn': 'このクラスに取り込む', 'gui.classroom.shared.openCatalog': 'みんなの課題からさがす', 'gui.classroom.shared.catalogTitle': 'みんなの課題 — 全国の先生が共有した課題', - 'gui.classroom.shared.catalogClose': 'キャンセル', + 'gui.classroom.shared.catalogClose': '戻る', 'gui.classroom.shared.tabAll': 'すべて', 'gui.classroom.shared.tabMine': '自分の投稿', 'gui.classroom.shared.filterAllLevels': 'すべての学校種', diff --git a/packages/scratch-gui/test/unit/components/shared-assignment-catalog.test.jsx b/packages/scratch-gui/test/unit/components/shared-assignment-catalog.test.jsx index 7c4fbaaf808..26ea45e1c44 100644 --- a/packages/scratch-gui/test/unit/components/shared-assignment-catalog.test.jsx +++ b/packages/scratch-gui/test/unit/components/shared-assignment-catalog.test.jsx @@ -163,6 +163,19 @@ describe('SharedAssignmentCatalog (issue #1070)', () => { expect(shared.handleLoadMoreCatalog).toHaveBeenCalled(); }); + test('the header back button is labelled "Back" and returns to the assignment list (issue #1121)', () => { + const shared = sharedState(); + renderCatalog(shared); + const back = byTestId('shared-catalog-close'); + expect(back).toBeInTheDocument(); + // Label must read "戻る" (Back), not "キャンセル"/"閉じる". + expect(back.textContent).toBe('Back'); + // Clicking it only closes the catalog, returning to the assignment + // board (課題一覧) — it must not navigate to the class list. + fireEvent.click(back); + expect(shared.handleCloseCatalog).toHaveBeenCalled(); + }); + test('the mine tab hides the filters and marks unlisted items', () => { renderCatalog(sharedState({ catalogTab: 'mine',