fix: 优化导出档案系统消息宽度

- 系统消息气泡按内容自然展开,减少短消息不必要换行
- 保留容器最大宽度约束,避免窄屏横向溢出
- 增加撤回消息桌面端单行显示回归测试
This commit is contained in:
Nanin
2026-08-06 00:23:22 +08:00
parent e3615c0153
commit 307d247660
2 changed files with 14 additions and 1 deletions
+3 -1
View File
@@ -427,9 +427,11 @@ body {
}
.message.system .avatar { display: none; }
.message.system .message-stack {
max-width: 92%;
width: max-content;
max-width: 100%;
}
.message.system .bubble {
width: max-content;
max-width: 100%;
padding: 5px 10px;
border: 0;
+11
View File
@@ -805,6 +805,17 @@ test('EXPORT-ARCHIVE-03 renders shares and locations, and groups payments under
await expect(recallNotices).toHaveCount(2)
await expect(recallNotices.locator('.avatar')).toHaveCount(0)
await expect(recallNotices.locator('.sender').first()).toBeHidden()
const recallLineMetrics = await recallNotices
.first()
.locator('.content')
.evaluate((element) => {
const styles = window.getComputedStyle(element)
return {
height: element.getBoundingClientRect().height,
lineHeight: Number.parseFloat(styles.lineHeight)
}
})
expect(recallLineMetrics.height).toBeLessThanOrEqual(recallLineMetrics.lineHeight + 1)
const locationNotice = systemNotices.filter({ hasText: '位置共享已经结束' })
await expect(locationNotice).toHaveCount(1)
await expect(locationNotice.locator('.avatar')).toHaveCount(0)