Compare template editor: compact field table, nav matches pane height.

- Value map collapses to a "+ / N 条" toggle that expands a detail row,
  instead of a scope select + textarea on every field row.
- Unused mode/tolerance/normalize cells show "—" instead of disabled inputs;
  the not_worse rank input moves into the tolerance column.
- Key/compare rows get a left accent; sheet options sit in one row with
  hints moved to tooltips.
- Sheet nav stretches to the pane height and scrolls its own list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
oliver 2026-10-14 19:38:54 +08:00
parent 51cfb41237
commit e8f77440ca
5 changed files with 96 additions and 42 deletions

View file

@ -161,6 +161,7 @@ try {
await stateRow.locator('input[type="checkbox"]').nth(2).check();
await editor().getByLabel("state 方式", { exact: true }).selectOption("not_worse");
await editor().getByLabel("state 好→坏顺序", { exact: true }).fill("up,down");
await editor().getByRole("button", { name: "state 编辑值映射", exact: true }).click();
await editor().getByLabel("state 值映射", { exact: true }).fill("estab,established\n*down,down");
await editor().getByLabel("state 值映射", { exact: true }).blur();
await editor().getByLabel("state 值映射范围", { exact: true }).selectOption("before");
@ -185,6 +186,8 @@ try {
// ... and come back unchanged when the template is opened again.
await openEditor();
await editor().getByRole("tab", { name: /^字段规则/ }).click();
assert.equal(await editor().getByRole("button", { name: "state 编辑值映射", exact: true }).textContent(), "3 条");
await editor().getByRole("button", { name: "state 编辑值映射", exact: true }).click();
assert.equal(await editor().getByLabel("state 值映射", { exact: true }).inputValue(), "estab,established\n*down,down");
assert.equal(await editor().getByLabel("未映射端口", { exact: true }).inputValue(), "ignore_port");
await page.keyboard.press("Escape");