fix(tasks): 扫光改为整条完整扫过 + 折叠/展开按钮分向
用户反馈两条:
1) 扫光只有「部分」:第一版是 45% 宽的窄带 + background-position 位移,
亮带始终只覆盖小条的一部分(峰值 22.5%→77.5%,两端扫不到),看起来像
中间游走的一块光斑。改为与小条等宽的渐变带 + transform
translateX(-100%) → translateX(100%):光带从左外侧进入、中途覆盖整条、
再向右外侧离开,行程用条宽本身表达(任意条宽成立),末 1/3 周期停在
右侧外侧留白。theme.spec 新增守护钉住该形状(宽度 100%、transform 行程、
不再有 background-position/size 位移)。
2) 折叠按钮与展开按钮长得一样:三处控件原本共用向下箭头(控制条的折叠开关
更是无论折叠还是展开都画同一个清单图标)。现按动作方向区分——
卡片小条的逐节点按钮 = chevron up(收进聚合),聚合卡片 = chevron down
(展开),控制条开关随状态在两者之间切换(并复用同一个折叠图标)。
组件守护见 tasks-page.spec 的「draws COLLAPSE and EXPAND with different
glyphs」。
真机证据(3080,真实运行中的后台任务):242px 小条上每 90ms 采样 ::after 的
matrix 平移量得到 [-23,32,85,131,163,-139,-94,-46,9,64,114,152,179,188]
(左侧 -139 → 右侧 +188,跨度超过一个条宽,单调推进);三处 svg 比对
expandVsCollapse / clusterMatchesExpand / clusterFlips / clusterCollapseMatchesCard
全部为 true。
验证:typecheck / lint ✅;pnpm test 1256 passed / 9 skipped(新增 2 例)。
(cherry picked from commit 0bb8228e6a7acb4302d9a8a9881d2df04a285152)
This commit is contained in:
1 parent
d38fefe55d
commit
7cce50c493
6 files changed
+123
-15
No files matched your search
@@ -317,30 +317,38 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Executing: the bar's background SWEEPS left → right (the same motion the
|
||||
main conversation's shimmer uses, applied to a strip instead of text). The
|
||||
band is 45% of the bar and travels the full width; the last third of the
|
||||
cycle rests, so a fast glance still catches it at rest. */
|
||||
/* Executing: a light band SWEEPS the bar left → right (the same motion the
|
||||
main conversation's shimmer uses, applied to a strip instead of text).
|
||||
The band is as WIDE as the bar and travels a full width either side of it:
|
||||
it enters at the left edge, covers the whole bar mid-flight, and leaves past
|
||||
the right edge — a narrower band with `background-position` (the first cut)
|
||||
only ever lit a 45% slice, which read as a blob wandering in the middle
|
||||
instead of a sweep. `transform` is used rather than background-position
|
||||
because the travel is then literal (`translateX(-100%) → translateX(100%)`
|
||||
of the bar's own width), so it stays correct at every bar width. The last
|
||||
third of the cycle holds the band off the right edge: a clean pause between
|
||||
sweeps, and a fast glance still catches the bar at rest. */
|
||||
.cardBar[data-running='true']::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-image: linear-gradient(
|
||||
90deg,
|
||||
transparent 0%,
|
||||
color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, transparent) 50%,
|
||||
color-mix(in srgb, var(--dsw-alias-state-business-primary) 18%, transparent) 50%,
|
||||
transparent 100%
|
||||
);
|
||||
background-size: 45% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0% center;
|
||||
transform: translateX(-100%);
|
||||
animation: dsh-tasks-bar-sweep 1.5s cubic-bezier(0.33, 0, 0.67, 1) infinite;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@keyframes dsh-tasks-bar-sweep {
|
||||
0% { background-position: 0% center; }
|
||||
66.6667%, 100% { background-position: 100% center; }
|
||||
0% { transform: translateX(-100%); }
|
||||
66.6667%, 100% { transform: translateX(100%); }
|
||||
}
|
||||
|
||||
/* Motion is decoration here: the state word and the activity text carry the
|
||||
|
||||
Reference in new issue
Block a user