DOC-105 实现 ReadingPosition 模型 #10

Closed
opened 2026-05-30 19:49:01 +08:00 by wangdl · 1 comment
Owner

实现统一 ReadingPosition。支持:Markdown(block_id,scroll)、Text(line,scroll)、PDF(page,progress)、Image(zoom,offset)、EPUB(chapter,progress)

验收标准:ReadingPosition 支持 serde、能序列化/反序列化为 JSON、有单元测试覆盖所有类型

实现统一 ReadingPosition。支持:Markdown(block_id,scroll)、Text(line,scroll)、PDF(page,progress)、Image(zoom,offset)、EPUB(chapter,progress) 验收标准:ReadingPosition 支持 serde、能序列化/反序列化为 JSON、有单元测试覆盖所有类型
wangdl added this to the M1:Document Core v0.1 milestone 2026-05-30 19:49:01 +08:00
wangdl added the
priority:p0
type:implementation
area:progress
labels 2026-05-30 19:49:01 +08:00
Author
Owner

完成项

ReadingPosition 模型已定义 + serde 往返测试
6 种位置类型全部覆盖

类型 字段
Markdown block_id, scroll_progress
Text line_number, scroll_progress
Pdf page_number, page_progress, overall_progress
Image zoom_scale, offset_x, offset_y
Epub chapter_id, chapter_progress, overall_progress
Unknown -

测试

  • 6 个 serde 往返测试全部通过(35 总计)
## 完成项 ✅ ReadingPosition 模型已定义 + serde 往返测试 ✅ 6 种位置类型全部覆盖 | 类型 | 字段 | |------|------| | Markdown | block_id, scroll_progress | | Text | line_number, scroll_progress | | Pdf | page_number, page_progress, overall_progress | | Image | zoom_scale, offset_x, offset_y | | Epub | chapter_id, chapter_progress, overall_progress | | Unknown | - | ## 测试 - 6 个 serde 往返测试全部通过(35 总计)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/zhixi-document-runtime#10
No description provided.