chore: 动画盘点判据接入套件 + 让其合规 + 对齐参照物重新登记(清工程收尾)

用户:「清理一下tmp和工程吧」。

- 新判据 test/animation-audit.test.mjs 接入 test/run-all.mjs:原先**写了却不会跑**
  (套件自带的那条闸门当场报「这些判据文件没接进套件」)。
- 该文件改用 test/lib/read.mjs 的具名入口(code/prose/bytes),不再裸用 readFileSync ——
  criteria-hygiene 抓到:读原文判代码会被解释性注释骗,今天已踩过两次。
- docs/ALIGN-REFS.json:CalendarView 的对齐登记按规矩**重新核对后再登记**
  (差异只有动画类 rise-in → pane-rise,骨架/布局/圆角来源未变;鸿蒙侧本无日历动效
  ⇒ 不产生新的对齐义务),不是抄一处新哈希。
This commit is contained in:
2026-09-15 09:16:05 +08:00
parent bb8201f0c3
commit f14f2d6fa7
3 changed files with 13 additions and 12 deletions

View File

@ -22,25 +22,25 @@
* 3. 不得再出现"整档控件一起动"的 view-switch 规则(③)。 * 3. 不得再出现"整档控件一起动"的 view-switch 规则(③)。
* 4. 挂载即播那档(.rise-in)必须被 prefers-reduced-motion 显式关掉。 * 4. 挂载即播那档(.rise-in)必须被 prefers-reduced-motion 显式关掉。
*/ */
import { readdirSync, readFileSync } from 'node:fs'; import { readdirSync } from 'node:fs';
import { join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { check, finish } from './lib/checks.mjs'; import { check, finish } from './lib/checks.mjs';
import { code } from './lib/read.mjs';
const HERE = fileURLToPath(new URL('.', import.meta.url)); // 判"规则/代码里有没有这个东西"一律走剥注释版(code):解释性注释里会原样引用被禁的写法,
const css = readFileSync(join(HERE, '..', 'src', 'index.css'), 'utf8').replace(/\/\*[\s\S]*?\*\//g, ''); // 读原文会把它当成"还在用"(criteria-hygiene 就是这么抓到本文件第一版裸用 readFileSync 的)。
const css = code('src/index.css');
/** 组件源码全文:判"这个类有没有人穿"必须看代码,不是看我们的记忆 */ /** 组件源码全文:判"这个类有没有人穿"必须看代码,不是看我们的记忆 */
function componentsSrc() { function componentsSrc() {
const out = []; const out = [];
const walk = dir => { const walk = dir => {
for (const e of readdirSync(dir, { withFileTypes: true })) { for (const e of readdirSync(dir, { withFileTypes: true })) {
const p = join(dir, e.name); const p = `${dir}/${e.name}`;
if (e.isDirectory()) walk(p); if (e.isDirectory()) walk(p);
else if (/\.tsx?$/.test(e.name) && !/\.test\./.test(e.name)) out.push(readFileSync(p, 'utf8')); else if (/\.tsx?$/.test(e.name) && !/\.test\./.test(e.name)) out.push(code(p));
} }
}; };
walk(join(HERE, '..', 'src')); walk('src');
return out.join('\n'); return out.join('\n');
} }
const src = componentsSrc(); const src = componentsSrc();

View File

@ -61,6 +61,7 @@ const SUITE = [
['test/markdown-xss.test.mjs', [], 9], ['test/markdown-xss.test.mjs', [], 9],
['test/narrow-layout.test.mjs', [], 64], ['test/narrow-layout.test.mjs', [], 64],
['test/nav-merge.test.mjs', [], 8], ['test/nav-merge.test.mjs', [], 8],
['test/animation-audit.test.mjs', [], 4], // 动画全量盘点:死动画/过宽作用域/弹层接线/reduced-motion
['test/theme.test.mjs', [], 30], ['test/theme.test.mjs', [], 30],
['test/background.test.mjs', [], 42], ['test/background.test.mjs', [], 42],
['test/cross-client-theme.test.mjs', [], 15], ['test/cross-client-theme.test.mjs', [], 15],

View File

@ -10,10 +10,10 @@
{ {
"id": "calendar-view", "id": "calendar-view",
"path": "client/electron/src/components/CalendarView.tsx", "path": "client/electron/src/components/CalendarView.tsx",
"blob": "641c67615a36fcd904ed0c6d7d96b16211369ff9", "blob": "31a62fffd75c076ca86dc065ec7d6eec47fce985",
"atCommit": "e3b7f8f", "atCommit": "bb8201f",
"atCommitSubject": "perf(webui): 动画卡顿三处治理 + 覆盖列表/日历", "atCommitSubject": "feat(webui): 回复/转发动画真的会播了 + 写邮件改成「按钮长成整页」",
"note": "P6 日历骨架的对齐目标。**2026-09-15 重新核对过一次**:本次差异只有根节点多了一个 `rise-in`(局部入场动画类)—— 而**鸿蒙侧日历本来就没有动效实现**(grep client/harmony 的 calendar 相关 .ets,animate/transition/animation 全无),所以这次不产生新的对齐义务:骨架结构、布局类、圆角来源都没变。若将来鸿蒙侧要加入场动效,这里必须重新核对一次(届时差异就不只是 className 了)。此前一笔:上面那笔日历圆角修复。" "note": "P6 日历骨架的对齐目标。**2026-09-15 第二次重新核对**:本次差异只有根节点的动画类 rise-in → pane-rise(拆「挂载即播」与「窗口触发」两档时改的名,见 436de6e)——骨架结构、布局类、圆角来源全都未变;鸿蒙侧日历本来就没有动效实现(grep 无 animate/transition),所以仍不产生新的对齐义务。此前两笔:日历圆角修复、根节点加 rise-in。"
} }
], ],
"radius": [ "radius": [