feat(ratewise): 主題工作室預覽縮影卡、色票收斂與亮度滑桿(E7 wave-C 最終波) - #674
Merged
s123104 merged 1 commit intoJul 7, 2026
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- 預覽縮影卡改為真實元件縮影(匯率卡 surface 層次+品牌 CTA+底部導覽 active 指示,高 ≤120px) - 預覽卡只消費全站語義 token(CSS 變數),draft previewTheme inline vars 直接繼承,禁止獨立配色計算 - preview-parity 測試:預覽 CTA 與全站 addToHistory 同 bg-primary-strong token、inline 色值零殘留 - 精選色票 21→10 格收斂(品牌藍系/活力系/中性系),全票 × 全 tone 不觸發 gate 的校準測試守門 - 「自訂…」收合 react-colorful 與 HEX 為進階項,非精選主色開啟 sheet 時自動展開 - 背景色調值域擴為 enum|#RRGGBB:舊 enum 資料與 FOUC 快取簽章零破壞,derive 版本戳不 bump - normalizeContinuousToneHex 總函式夾任意 hex 進可解域,亮度滑桿雙域映射(16ms debounce 沿用) - 連續 L 抽樣 × 全輸入色 AA property 全綠;深色派生錨點擴為 max(background, elevated) - review 修正:深 tone 反映射夾至深域內側(≤0.49)消除 0.5 邊界觸碰跳變,UI 整數往返分域不變 - review 修正:拖動 hue 錨鎖定起始 tone,過程不隨 debounced 回寫漂移;放開/點圓票/關 sheet 釋放 測試:ratewise vitest 全綠、typecheck 通過、三視口 390/375/320 截圖驗證 Co-authored-by: Cursor <cursoragent@cursor.com>
s123104
force-pushed
the
feat/e7-theme-studio-wave-c
branch
from
July 7, 2026 11:50
20e2a6e to
16bdd2c
Compare
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
E7 主題工作室 wave-C(最終波),收官設計簡報
.claude/prds/custom-theme-v2-design.md第 4 節 wave-C 與第 6 節對策 #3/#6。前置:#670(wave-A)、#671(wave-B)。1. 預覽縮影卡(QA-I #3)
text-text/text-text-muted匯率文字+bg-primary-lightchip)、品牌 CTA(bg-primary-strong,與全站addToHistory同 token)、底部導覽 active 指示(text-primary-on-surface+indicator bar)。previewTheme已把派生變數即時寫入 documentElement inline vars,預覽卡直接繼承,禁止獨立配色計算(測試斷言預覽卡 inline 色值零殘留)。2. 色票網格收斂(QA-I #6)
3. 亮度滑桿連續 tone
continuousToneHexAtPosition雙域映射(前半深域 L 0.02–0.24、後半淺域近白),WCAG 死域中間灰不對外曝露——任意位置 AA 必有解。normalizeContinuousToneHex總函式:任意 hex 保留色相/飽和度、僅調明度夾進可解域(冪等,測試守門)。enum | #RRGGBB(isValidBackgroundToneValue)——舊 enum 持久化資料與 FOUC 快取簽章零破壞;enum 派生規則零改動,CUSTOM_THEME_DERIVE_VERSION不 bump;bootstrapg()加收 hex tone 進簽章比對。max(background, elevated):高飽和連續 tone(背景亮度反超去飽和 elevated)下亮字 7:1 仍達標;低飽和 preset 深檔輸出零變化。一致性測試證據
CustomThemeSheet.test.tsx「預覽縮影卡與實際渲染一致性」:預覽 CTA className 含bg-primary-strong且SingleConverter.tsx全站 CTA 同 token;previewTheme寫入的 inline 變數(10 個預覽卡消費鍵,含深色調 midnight)與deriveCustomThemeCssVarsSSOT 全等;預覽卡 inline style 零殘留。getComputedStyle().backgroundColor==rgb(var(--color-primary-strong))解析值(10 103 236全等)。vitest run9186 passed。graphiteenum 與其 background hex 派生全等、FOUC 快取簽章測試全綠。截圖矩陣(screenshots/,QA 暫存不入 commit)
E7 Epic 收官對照(簡報第 6 節 QA-I 七項對策)
(簡報第 4 節 wave 表:A ✅ #670、B ✅ #671、C ✅ 本 PR——E7 epic 全數收官)
回歸合約
測試:
pnpm --filter @app/ratewise exec vitest run9186 passed|typecheck 通過|pre-commit/pre-push 全過|changeset(minor)|002 +184Made with Cursor