feat(library): 收藏卡片展示简介

This commit is contained in:
Zhou Weidong committed 2026-10-22 12:45:27 +08:00
1 parent 9093700a04
commit 57f3029018
4 files changed
+117 -3

No files matched your search

+32
View File
@@ -698,3 +698,35 @@ $ flutter test --no-pub
解读:有 dramaTitle 时不触发详情请求、点击时才加载详情、空标题兜底、
第 2 页追加去重和 hasMore 行为均通过;全量分析零告警,630 项通过、1 项旧服务
能力探测跳过。`pubspec.lock` 既有改动未提交。
## 2026-10-22 收藏卡片简介
- 分支:`feature/favorite-card-synopsis`
- 基线:`develop` / `origin/develop` = `9093700`
- 计划:`docs/plans/2026-10-22-favorite-card-synopsis.md`
### 实现
- `_FavoriteCard` 在标题/标签下方条件渲染 `drama.synopsis.trim()`。
- 简介最多 2 行、`TextOverflow.ellipsis`,使用 `AppColors.muted`、12 号字和
`1.15` 行高,由 `Flexible` 占据剩余空间,保持封面与卡片原高度。
- 简介为空或纯空白时不创建文本节点,继续使用原 Spacer,不占高度。
- 未改接口、后端和收藏分页逻辑。
### 门禁
```text
$ flutter test --no-pub test/library/favorites_page_test.dart
00:01 +7: All tests passed!
$ dart analyze lib test
Analyzing lib, test...
No issues found!
$ flutter test --no-pub
00:51 +631 ~1: All tests passed!
```
解读:有简介时文本最多 2 行并省略,空简介不渲染且卡片高度与正常卡片一致;
全量静态分析零告警,631 项通过、1 项运行中旧后端能力探测跳过。
`pubspec.lock` 既有改动未提交。