feat(menubar): 实现趋势面板外侧详情与三语外观设置
接入有界趋势、平滑滚动、菜单式外侧详情、底部操作与三语文案,装配独立外观设置和 Dock 生命周期。 合并跟随系统外观刷新、自选颜色入口与色块绘制修复,保留用户确认的配色联动、重启保存及滚动验收。 多场景视觉与长期资源验证边界仍记录于 docs。
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import Foundation
|
||||
|
||||
@main struct TrendScrollChecks {
|
||||
static func main() {
|
||||
precondition(!TrendScroll.isAppend(from: [], to: [0.2]))
|
||||
precondition(TrendScroll.isAppend(from: [0.2, nil], to: [0.2, nil, 0.4]))
|
||||
precondition(!TrendScroll.isAppend(from: [0.2], to: [0.4, 0.5]))
|
||||
let full: [Double?] = (0..<MetricHistory.capacity).map { Double($0) / 100 }
|
||||
precondition(TrendScroll.isAppend(from: full, to: Array(full.dropFirst()) + [nil]))
|
||||
for count in [3, MetricHistory.capacity + 1] {
|
||||
let start = TrendScroll.position(index: count - 2, count: count, progress: 0, scrolling: true)
|
||||
let end = TrendScroll.position(index: count - 1, count: count, progress: 1, scrolling: true)
|
||||
precondition(abs(start - 1) < 0.000001 && abs(end - 1) < 0.000001)
|
||||
let middle = TrendScroll.position(index: count - 2, count: count, progress: 0.5, scrolling: true)
|
||||
precondition(middle < start && abs(start - middle - 0.5 / 59) < 0.000001)
|
||||
}
|
||||
precondition(TrendScroll.position(index: 0, count: 61, progress: 1, scrolling: true) < 0)
|
||||
print("PASS: append detection, missing samples, partial/full history scroll geometry")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user