feat(report): 格子超过一条作品时,悬停显示逐条明细
Deploy VitePress site to Pages / build (push) Canceled after 0s
Deploy VitePress site to Pages / Deploy (push) Canceled after 0s

并集看不出「哪个标签属于哪条视频」。现在格子里带 `details`(标题 + 各自的标签,
按发布时间正序),前端在超过 1 条时列出来:

    1. 镇湖人绣东西…   大字报
    2. 镇湖人绣东西…   养号

细节:
* 明细只在 count > 1 时展示;单条时并集本身就是那条的标签,再列一遍是噪音;
* 最多列 12 条,超出显示「…还有 N 条」—— 一天发几十条不至于把浮层撑爆;
* 标题用 textContent 写入,不当 HTML 解释;
* 标签仍按词表顺序排列。

测试:明细顺序与「各自带自己的标签」都有断言。
This commit is contained in:
butubb
2026-10-22 14:22:15 +08:00
parent 36407cafc5
commit 9f8186c2aa
3 changed files with 55 additions and 0 deletions
+2
View File
@@ -185,6 +185,8 @@ async def test_two_notes_with_different_tags_merge_into_one_cell(db):
cell = data["cells"][_day(now)]["hash-a"]
assert cell["count"] == 2
assert cell["tags"] == ["大字报", "养号"]
# 逐条明细按发布时间正序:先发的在前,各自带自己的标签
assert [item["tags"] for item in cell["details"]] == [["大字报"], ["养号"]]
@pytest.mark.asyncio