Skip to content

feat(extension): オンボーディング画面のダークモード対応 - #513

Merged
ujiro99 merged 5 commits into
dev-1.4.0from
feat/dark-mode-onboarding
Oct 23, 2026
Merged

ujiro99 merged 5 commits into
dev-1.4.0from
feat/dark-mode-onboarding

Conversation

@ujiro99

@ujiro99 ujiro99 commented Oct 22, 2026

Copy link
Copy Markdown
Owner

概要

#495 のダークモード対応の第3段階です。オンボーディング画面をダークモードに対応しました。

このPRは #512 の上に積んでいます。 #512 をマージすると、ベースは feat/dark-mode、その後 dev-1.4.0 へと順に切り替わります。

変更内容

  • テーマの適用: OnboardingPage で useTheme(document.documentElement) を呼び、テーマを適用します。themeContext も配っているので、オンボーディング内のポップアップにもダーク用の既定色とアイコンの塗り替えが効きます。
  • 直書きの色: 既存のクラスの隣に dark: 付きのクラスを追加しました(約70箇所)。既存のクラスは消していないので、ライト時の見た目は変わりません。
  • ページ背景: レイアウト、ウェルカム画面、読み込み中の空画面は、オプション画面と同じ bg-background を使います。バリアント D でウェルカム画面からステップへ切り替わるとき、背景が一致するようにしています。
  • ロゴ: SelectionCommandLogo.png は透過背景に暗い文字なので、暗い背景では読めません。そこでダーク用の SelectionCommandLogo_dark.png を追加し、useLogoUrl() でテーマに応じて切り替えます。
    • 文字部分だけ明度を反転し、色相・彩度は保っています。アイコン部分は元のままです。
    • CSS の invert と hue-rotate でも試しましたが、アイコンの白い杖まで黒くなるため採用しませんでした。

ABテストへの影響

オンボーディングは ABテスト中です(バリアント C / D)。ダークテーマは全バリアントに同じように効くので、バリアント間の比較は偏りません。ただし、OS がダークのユーザーでは見た目が変わるため、この変更をリリースした前後で指標を比べる際は注意してください。

確認

  • tsc -b、yarn lint(エラー0件)、vitest(全件成功)、yarn build
  • 追加したテスト: useLogoUrl
  • e2e ビルドの ?variant= ?step= ?phase= を使い、Playwright でダーク時の次の画面を撮影して確認しました。
    • ウェルカム(C / D)
    • INTRO(A)
    • SEARCH(説明時と完了時)、AI_PROMPT、LINK_PREVIEW、CUSTOMIZE、COMPLETE
  • ライト時について、変更前(feat(extension): オプション画面のダークモード対応 #512 時点)と変更後で上記8画面を reducedMotion: reduce でピクセル比較しました。
    • 6画面は同一でした。
    • 残り2画面で差が出たのは、レールの現在ステップの点(20px 四方)だけです。この点は reduced-motion でも止まらない animate-ping を使っているので、撮影タイミングの差です。

対象外(後続PRで対応)

  • ページアクション、トーストなど content script の UI

Refs #495

🤖 Generated with Claude Code

https://claude.ai/code/session_019DvJ25jdbq4pvn4K8Wk7Mx

Apply the theme to the onboarding page and add dark counterparts to its
hard-coded colors next to the existing ones, so the light theme renders
as before. The brand color (sky-950) gets a lighter shade that keeps
buttons and progress pills visible on the dark background.

The logo image has dark text on a transparent background, so a dark
variant (wordmark lightness inverted, hue and icon kept) is added and
chosen by theme. The page background uses the same token as the options
page.

Refs #495

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019DvJ25jdbq4pvn4K8Wk7Mx
Base automatically changed from feat/dark-mode-options to dev-1.4.0 October 23, 2026 03:05
ujiro99 and others added 4 commits October 23, 2026 12:06
- Paint the dark background from inline styles in onboarding_page.html
  and options_page.html, before scripts and styles load
- Apply data-sc-theme in a layout effect so the first paint already uses
  the dark styles
- Fix the noscript message typo in options_page.html

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Match the callout arrow fill to the callout body in dark mode
- Use a darker selection demo highlight in dark mode so the light text
  stays readable
- Brighten the "click anywhere" indicator in dark mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ujiro99
ujiro99 marked this pull request as ready for review October 23, 2026 03:59
@ujiro99
ujiro99 merged commit e83a14e into dev-1.4.0 Oct 23, 2026
2 checks passed
@ujiro99
ujiro99 deleted the feat/dark-mode-onboarding branch October 23, 2026 03:59
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