Skip to content

feat(theme): add preset theme editor and expand theme token coverage#2046

Closed
Alexlangl wants to merge 9 commits intofarion1231:mainfrom
Alexlangl:feat/593-theme-editor
Closed

feat(theme): add preset theme editor and expand theme token coverage#2046
Alexlangl wants to merge 9 commits intofarion1231:mainfrom
Alexlangl:feat/593-theme-editor

Conversation

@Alexlangl
Copy link
Copy Markdown
Contributor

@Alexlangl Alexlangl commented Apr 13, 2026

Summary / 概述

  1. 补齐主题系统和 preset/custom theme editor 的基础能力
  2. 让一批常用界面的颜色和状态样式真正跟随主题,而不是继续写死

主题编辑能力

增加 preset 主题选择,支持 default / bubblegum / custom
支持在设置页里调整 custom theme 的基础配色
补齐了 system + custom preset 场景下的变量同步逻辑,保证系统明暗切换时自定义主题能正确更新
调整了主题设置页文案,让主题编辑器的界面表达和实际行为保持一致,现在明确为编辑基础配色

一批常用界面的主题适配

把一批高频页面和组件改成尽量走主题 token,而不是继续依赖固定颜色,包括:

usage 图表和摘要卡片
settings / import-export / WebDAV 相关提示状态
sessions 批量管理相关状态色
provider / config 表单里的一批 success / warning / error 样式
preset 预览和 preset 按钮的一些显示细节

Related Issue / 关联 Issue

Fixes #593

Screenshots / 截图

Before / 修改前 After / 修改后

Checklist / 检查清单

  • pnpm typecheck passes / 通过 TypeScript 类型检查
  • pnpm format:check passes / 通过代码格式检查
  • cargo clippy passes (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)
  • Updated i18n files if user-facing text changed / 如修改了用户可见文本,已更新国际化文件

@Alexlangl Alexlangl changed the title Feat/593 theme editor feat(theme): add preset theme editor and expand theme token coverage Apr 14, 2026
@yovinchen
Copy link
Copy Markdown
Collaborator

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90fb7e49c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const rect = hueRef.current?.getBoundingClientRect();
if (!rect) return;
const x = Math.max(0, Math.min(rect.width, clientX - rect.left));
const hue = rect.width === 0 ? 0 : (x / rect.width) * 360;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Clamp hue slider below 360°

When the pointer reaches the far right of the hue track, hue is computed as exactly 360, but hsvToHex normalizes that to 0, so the selected color wraps and the thumb snaps to the left edge. This makes the endpoint interaction feel broken during drag (especially at the right boundary) and can cause visible jitter between near-360 and 0 values.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已处理

@Alexlangl
Copy link
Copy Markdown
Contributor Author

已处理并增加回归测试

@Alexlangl Alexlangl closed this Apr 22, 2026
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.

[feature request]希望能够引进tweakcn主题管理来提升程序的美化程度

2 participants