style(title): 标题预设卡片改为深色背景大T字紧凑布局 #1606

Merged
xiaoxia merged 2 commits from fix/title-preset-card-style into develop 2026-09-01 14:58:56 +08:00
Owner

目标

标题预设样式面板的T图标卡片改为深色背景、大T字、紧凑布局。

改动

generate.css

  • .xx-title-preset-card: 52x52固定尺寸,#3a3a3a深色背景,8px圆角,去掉aspect-ratio和flex-direction:column
  • hover: #4a4a4a背景 + #666边框
  • active: #409eff边框 + #4a4a4a背景
  • .xx-title-preset-preview-text: font-size 32px + font-weight 700

constants.ts

  • TITLE_PRESETS 所有 8 个 preset 的 previewStyle.fontSize 统一改为 "32px"

不改

网格列数、间距、点击选中逻辑、预设内容、hover/active边框颜色逻辑全部不变。

## 目标 标题预设样式面板的T图标卡片改为深色背景、大T字、紧凑布局。 ## 改动 ### generate.css - `.xx-title-preset-card`: 52x52固定尺寸,#3a3a3a深色背景,8px圆角,去掉aspect-ratio和flex-direction:column - hover: #4a4a4a背景 + #666边框 - active: #409eff边框 + #4a4a4a背景 - `.xx-title-preset-preview-text`: font-size 32px + font-weight 700 ### constants.ts - TITLE_PRESETS 所有 8 个 preset 的 previewStyle.fontSize 统一改为 "32px" ## 不改 网格列数、间距、点击选中逻辑、预设内容、hover/active边框颜色逻辑全部不变。
xiaoxia added 1 commit 2026-09-01 14:41:56 +08:00
style(title): 标题预设卡片改为深色背景大T字紧凑布局
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 3m39s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
AI Code Review / AI Code Review (pull_request) Successful in 4m51s
CI/CD Pipeline / PR Build API Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 5m55s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 1m33s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 2m53s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m58s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 5m5s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 5m11s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 3m49s
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
0bf1cfa7f4
- .xx-title-preset-card: 52x52固定尺寸,#3a3a3a深色背景,8px圆角
- hover: #4a4a4a + #666边框; active: #409eff边框
- .xx-title-preset-preview-text: font-size 32px + font-weight 700
- TITLE_PRESETS 所有 preset 的 previewStyle.fontSize 统一为 32px
- 不改网格列数/间距/点击逻辑/预设内容

🚀 预览环境已部署

项目 详情
PR号 #1606
预览链接 https://pr-1606.preview.xiaoxiajianji.com
API环境 staging

💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。

🔄 每次提交新代码后预览环境会自动更新。

🗑️ PR 关闭或合并后,预览环境会自动清理。

🚀 **预览环境已部署** | 项目 | 详情 | |------|------| | PR号 | #1606 | | 预览链接 | [https://pr-1606.preview.xiaoxiajianji.com](https://pr-1606.preview.xiaoxiajianji.com) | | API环境 | staging | > 💡 预览环境使用 staging API 数据,请勿在预览环境中操作重要数据。 > > 🔄 每次提交新代码后预览环境会自动更新。 > > 🗑️ PR 关闭或合并后,预览环境会自动清理。
xiaoxia added 1 commit 2026-09-01 14:51:07 +08:00
ci: re-trigger build
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 4m42s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 5m20s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 6m1s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 6m5s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 6m33s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 6m47s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 7m0s
CI/CD Pipeline / AI Code Review (pull_request) Override
AI Code Review / AI Code Review (pull_request) Override
ACR Cleanup / ACR Image Cleanup (pull_request_target) Waiting to run
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 3m18s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 12m9s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 4m57s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Failing after 1s
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
3c8b794efb
Collaborator

【阻塞级判定】

  • 是否存在阻塞级问题:是
  • 阻塞级问题数量:1 个

📊 审查概览

  • 整体评价:需修改
  • 建议级问题数量:1 个

🔴 阻塞级问题(必须修复)

  1. [apps/web/src/pages/generate/generate.css] 容器尺寸与字体大小严重不匹配导致文本溢出
    • 问题类型:逻辑bug
    • 问题描述:CSS 中将 .xx-title-preset-card 的宽高固定为 52px,同时将内部文本 .xx-title-preset-preview-text 的字体大小设为 32px 且字重为 700(粗体)。结合 constants.ts 中的预设标签(如 "电影海报"、"综艺秀" 等多字符文本),当前 52px 的容器宽度远不足以容纳 32px 的粗体文本,必然导致文字溢出卡片边界,造成 UI 显示错乱。
    • 修改建议:建议增大 .xx-title-preset-card 的容器尺寸(例如宽高改为 80pxauto),或者适当减小预览字体大小,确保文本能完整显示在容器内。

💡 改进建议(不阻塞合并)

  1. [apps/web/src/pages/generate/generate.css] 硬编码颜色值破坏主题一致性
    • 具体内容:代码中将背景色、边框色和激活状态颜色从 CSS 变量(如 var(--bg-secondary), var(--primary-color))修改为硬编码的十六进制颜色(如 #3a3a3a, #409eff)。如果应用支持明暗主题切换,此修改将导致卡片颜色无法随主题变化,建议恢复使用 CSS 变量以保持主题一致性。

良好实践

  • constants.ts 中统一了所有预设的 fontSize32px,保证了不同风格预览在视觉上的一致性。

🤖 由 AI 代码审查机器人自动生成 | 2026-09-01 06:56:28 | 模型:

### 【阻塞级判定】 - 是否存在阻塞级问题:是 - 阻塞级问题数量:1 个 ### 📊 审查概览 - 整体评价:需修改 - 建议级问题数量:1 个 ### 🔴 阻塞级问题(必须修复) 1. **[apps/web/src/pages/generate/generate.css] 容器尺寸与字体大小严重不匹配导致文本溢出** - 问题类型:逻辑bug - 问题描述:CSS 中将 `.xx-title-preset-card` 的宽高固定为 `52px`,同时将内部文本 `.xx-title-preset-preview-text` 的字体大小设为 `32px` 且字重为 `700`(粗体)。结合 `constants.ts` 中的预设标签(如 "电影海报"、"综艺秀" 等多字符文本),当前 52px 的容器宽度远不足以容纳 32px 的粗体文本,必然导致文字溢出卡片边界,造成 UI 显示错乱。 - 修改建议:建议增大 `.xx-title-preset-card` 的容器尺寸(例如宽高改为 `80px` 或 `auto`),或者适当减小预览字体大小,确保文本能完整显示在容器内。 ### 💡 改进建议(不阻塞合并) 1. **[apps/web/src/pages/generate/generate.css] 硬编码颜色值破坏主题一致性** - 具体内容:代码中将背景色、边框色和激活状态颜色从 CSS 变量(如 `var(--bg-secondary)`, `var(--primary-color)`)修改为硬编码的十六进制颜色(如 `#3a3a3a`, `#409eff`)。如果应用支持明暗主题切换,此修改将导致卡片颜色无法随主题变化,建议恢复使用 CSS 变量以保持主题一致性。 ### ✅ 良好实践 - 在 `constants.ts` 中统一了所有预设的 `fontSize` 为 `32px`,保证了不同风格预览在视觉上的一致性。 --- <sub>🤖 由 AI 代码审查机器人自动生成 | 2026-09-01 06:56:28 | 模型: </sub> <!-- AI_CODE_REVIEW_AUTO_COMMENT -->
xiaoxia merged commit 262b730aca into develop 2026-09-01 14:58:56 +08:00
xiaoxia deleted branch fix/title-preset-card-style 2026-09-01 14:58:56 +08:00

🗑️ 预览环境已清理

PR #1606 已关闭或合并,对应的预览环境已被清理。

如有需要,可以重新打开 PR 来重新生成预览环境。

🗑️ **预览环境已清理** PR #1606 已关闭或合并,对应的预览环境已被清理。 > 如有需要,可以重新打开 PR 来重新生成预览环境。
Sign in to join this conversation.