Skip to content

style(dncl): show the notice of restricted blocks with the design tokens - #2265

Merged
smalruby3-editor-bot[bot] merged 2 commits into
topic/japanese-mode-1731from
fix/ja-mode-notice-tokens
Nov 19, 2026
Merged

smalruby3-editor-bot[bot] merged 2 commits into
topic/japanese-mode-1731from
fix/ja-mode-notice-tokens

Conversation

@smalruby3-editor-bot

@smalruby3-editor-bot smalruby3-editor-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Summary

EPIC #1731 の確認ページ S1 の答え: 日本語タブで書いているあいだ、コードタブにブロックを制限していることと戻し方の案内を出す。

以前の日本語モードの通知バナー(「日本語タブで書いています:ブロックが制限されています」[すべてのブロックを使う]、data-testid: dncl-mode-notice)は、日本語タブを分けたあとも残っていて、日本語で書いたあとコードタブを開くとワークスペースの右上に出る(下のスクリーンショット)。文言・動き(confirm → 全ブロックに戻す)は変えず、見た目だけをデザイントークンに合わせた。

Changes Made

  • dncl-mode-notice.css: 直書きの黄色(#ffc107 など)をやめ、smalruby-tokens.css のお知らせの色($color-info-background・$color-info。components/alerts.md)、文字 $color-text、角丸 $radius-medium、余白 $space-* に。[すべてのブロックを使う]は小さい副ボタンの形(白地・$color-border・$radius-small・:focus-visible の紫の線)。
  • docs/dncl/README.md: 見た目の説明とスクリーンショット 0105-code-tab-notice-1280x800.png。

Test Coverage

  • npx jest --runInBand test/unit/components/dncl-mode-notice.test.jsx(6 件通過)。CSS は postcss-import + postcss-simple-vars でコンパイルし未定義の変数が無いことを確かめた。
  • この PR のプレビューを headless の Playwright で開き、日本語タブで書いてからコードタブを開くと、バナーがワークスペースの右上(パレットの右・ブロックの上)に見えること(elementFromPoint で一番上)、地 rgb(230, 240, 255)・枠 rgb(77, 151, 255)・文字 rgb(87, 94, 117)・ボタンの地が白であることを確かめた。その画面を docs/dncl/screenshots/0105-code-tab-notice-1280x800.png に置いた。

コードタブの通知バナー

Closes #2264

🤖 Generated with Claude Code

The notice of the Code tab while the program is written in the Japanese
tab used hard-coded yellow colors. It now uses the info colors of the
alerts and a small secondary button of the design system.

Refs #2264

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

Copy link
Copy Markdown

🚀 Preview deployed (stg API): https://preview.smalruby.app/fix-ja-mode-notice-tokens-de4b00cb/

Refs #2264

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

This branch was previously deployed

1 inactive deployment
stg — 925d43a7 Deployed Nov 19, 2026 by smalruby3-editor-bot[bot] via cleanup #446
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.

0 participants