Feature request: Productivity dashboard System / Light / Dark theme selector

オープン
#1,218 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
78/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
css, html, javascript
領域
frontend

調査の方向性

Start with productivity/skills/dashboard.html and review the referenced implementation and dashboard-only diff. Check the theme initialization, CSS variables, selector markup, and affected dashboard views, then run the available automated regression and browser checks. Done means System, Light, and Dark work with persistence and blocked storage without changing task or memory files.

索引モデルが issue の本文から書いたものです。

説明

Feature request

Please add a System / Light / Dark theme selector to the Productivity dashboard (productivity/skills/dashboard.html).

The current dashboard uses a fixed light palette. A dark option would make it more comfortable to use in low-light environments and consistent with a device's appearance preference.

Proposed behaviour
  • System is the default and follows prefers-color-scheme, including changes while the dashboard is open.
  • Light and Dark provide explicit overrides.
  • Remember the selection in browser storage when available; switching should still work when storage is blocked.
  • Apply the selected theme before styles load to avoid a flash of the wrong theme.
  • Keep task cards, list view, memory views, dialogs and native form controls consistent, with a labelled, keyboard-accessible selector.
  • Theme changes should not modify task or memory files.

Sample implementation and diff

I have implemented a working example in a fork:

The dashboard-only sample diff is included below. This is a feature request with a reference implementation, rather than a pull request.

Validation

  • 10 automated regression tests passed.
  • Browser checks passed for live system changes, both manual overrides, persistence after reload, keyboard selection, and blocked storage.
  • Board, List, Memory and dialog views were exercised with synthetic data.
  • Header controls remained reachable at 1280px, 768px and 390px widths.
  • Task content remained unchanged when switching themes.
  • Both palettes were visually reviewed.
Dashboard-only sample diff
diff --git a/productivity/skills/dashboard.html b/productivity/skills/dashboard.html
index e2ca8a7..f570d7c 100644
--- a/productivity/skills/dashboard.html
+++ b/productivity/skills/dashboard.html
@@ -4,6 +4,44 @@
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Productivity</title>
+  <script id="theme-init">
+    // Apply the saved choice before styles load to avoid a flash of the wrong theme.
+    (() => {
+      const storageKey = 'productivity-theme';
+      const systemTheme = window.matchMedia('(prefers-color-scheme: dark)');
+      let preference = 'system';
+
+      try {
+        const saved = localStorage.getItem(storageKey);
+        if (['light', 'dark', 'system'].includes(saved)) preference = saved;
+      } catch {
+        // Local files and privacy settings can make browser storage unavailable.
+      }
+
+      function applyTheme() {
+        document.documentElement.dataset.theme = preference === 'system'
+          ? (systemTheme.matches ? 'dark' : 'light')
+          : preference;
+      }
+
+      applyTheme();
+      systemTheme.addEventListener('change', applyTheme);
+
+      document.addEventListener('DOMContentLoaded', () => {
+        const selector = document.getElementById('themeSelect');
+        selector.value = preference;
+        selector.addEventListener('change', () => {
+          preference = selector.value;
+          applyTheme();
+          try {
+            localStorage.setItem(storageKey, preference);
+          } catch {
+            // The selection still works for this page when it cannot be saved.
+          }
+        });
+      });
+    })();
+  </script>
   <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='4' y='2' width='24' height='28' rx='4' fill='%23faf9f5' stroke='%23D97757' stroke-width='2'/%3E%3Crect x='8' y='0' width='16' height='5' rx='2.5' fill='%23D97757'/%3E%3Cpath d='M9 13l3 3 5-5' fill='none' stroke='%23D97757' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Crect x='20' y='12' width='5' height='2' rx='1' fill='%23c4c4c2'/%3E%3Crect x='9' y='20' width='10' height='2' rx='1' fill='%23c4c4c2'/%3E%3Crect x='9' y='25' width='7' height='2' rx='1' fill='%23c4c4c2'/%3E%3C/svg%3E">
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
@@ -12,6 +50,7 @@
     * { box-sizing: border-box; margin: 0; padding: 0; }
 
     :root {
+      color-scheme: light;
       --bg-primary: #faf9f5;
       --bg-secondary: #F5F4EF;
       --bg-card: #ffffff;
@@ -20,12 +59,31 @@
       --text-muted: #8c8c8a;
       --accent: #D97757;
       --accent-hover: #c4684a;
+      --text-on-accent: #241610;
+      --accent-soft: rgba(217, 119, 87, 0.05);
       --border: #e5e4df;
       --border-light: #eeeee9;
       --shadow: rgba(20, 20, 19, 0.04);
       --shadow-hover: rgba(20, 20, 19, 0.08);
     }
 
+    :root[data-theme="dark"] {
+      color-scheme: dark;
+      --bg-primary: #181918;
+      --bg-secondary: #21221f;
+      --bg-card: #272925;
+      --text-primary: #f0f0e9;
+      --text-secondary: #c3c5bb;
+      --text-muted: #a0a397;
+      --accent: #e89a7d;
+      --accent-hover: #f3ad92;
+      --border: #4b4e46;
+      --border-light: #363932;
+      --accent-soft: rgba(232, 154, 125, 0.12);
+      --shadow: rgba(0, 0, 0, 0.2);
+      --shadow-hover: rgba(0, 0, 0, 0.35);
+    }
+
     body {
       font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
       background: var(--bg-primary);
@@ -40,6 +98,8 @@
 
     header {
       display: flex;
+      flex-wrap: wrap;
+      gap: 12px;
       justify-content: space-between;
       align-items: center;
       margin-bottom: 16px;
@@ -58,6 +118,7 @@
 
     .header-left {
       display: flex;
+      flex-wrap: wrap;
       align-items: flex-start;
       gap: 0;
     }
@@ -91,7 +152,30 @@
       box-shadow: 0 1px 3px var(--shadow);
     }
 
-    .buttons { display: flex; gap: 12px; }
+    .buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
+
+    .theme-control {
+      display: inline-flex;
+      align-items: center;
+      gap: 8px;
+      color: var(--text-secondary);
+      font-size: 13px;
+    }
+
+    .theme-control select {
+      background: var(--bg-card);
+      color: var(--text-primary);
+      border: 1px solid var(--border);
+      border-radius: 8px;
+      padding: 10px 12px;
+      font: inherit;
+      cursor: pointer;
+    }
+
+    .theme-control select:focus-visible {
+      outline: 2px solid var(--accent);
+      outline-offset: 2px;
+    }
 
     button {
       background: var(--bg-card);
@@ -113,7 +197,7 @@
 
     button.primary {
       background: var(--accent);
-      color: white;
+      color: var(--text-on-accent);
       border-color: var(--accent);
     }
 
@@ -196,7 +280,7 @@
     }
 
     .cards.drag-over {
-      background: rgba(217, 119, 87, 0.05);
+      background: var(--accent-soft);
       border-radius: 8px;
     }
 
@@ -315,7 +399,7 @@
       content: '';
       width: 5px;
       height: 9px;
-      border: solid white;
+      border: solid var(--text-on-accent);
       border-width: 0 2px 2px 0;
       transform: rotate(45deg);
       margin-bottom: 2px;
@@ -332,7 +416,7 @@
       padding: 14px 28px;
       background: var(--accent);
       border: none;
-      color: white;
+      color: var(--text-on-accent);
     }
 
     .empty-state button:hover {
@@ -433,7 +517,7 @@
     }
 
     .list-section.drag-over {
-      background: rgba(217, 119, 87, 0.05);
+      background: var(--accent-soft);
       border-radius: 8px;
       margin: 0 -12px 32px;
       padding: 0 12px;
@@ -1214,6 +1298,14 @@
       </div>
     </div>
     <div class="buttons">
+      <label class="theme-control" for="themeSelect">
+        Theme
+        <select id="themeSelect">
+          <option value="system">System</option>
+          <option value="light">Light</option>
+          <option value="dark">Dark</option>
+        </select>
+      </label>
       <button id="openTaskBtn">Select File</button>
       <button id="openMemoryBtn" style="display: none;">Open Folder</button>
       <button id="saveBtn" class="primary" disabled style="display: none;">Save</button>
主要言語
Python
スター
36.8k
フォーク
4.1k
平均マージ
1日 23時間
マージ済み PR(30日)
17

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anthropics/knowledge-work-plugins のほかの issue

anthropics/knowledge-work-plugins の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。