From 3af5dd0a9c9e2e6e10d43a5b9b9079ab1d7dfbd2 Mon Sep 17 00:00:00 2001 From: Menghuan1918 Date: Sat, 14 Nov 2026 01:22:05 +0800 Subject: [PATCH] refactor(clues): pack, detail and Feishu windows use the shared components Pack footers, conflict/binding/add errors and empty states; detail failure and footer actions (ActionButton); Feishu task/doc fields and save rows. Field and ActionFooter pass data-* through for e2e locators. Drops the window sheets' now-unreferenced rules. --- .../clues/sources/feishu/docs-preview.tsx | 58 ++++----- .../clues/sources/feishu/feishu.module.css | 38 +----- .../clues/sources/feishu/task-editor.tsx | 48 +++----- src/client/clues/windows/detail.module.css | 47 ------- src/client/clues/windows/detail.tsx | 61 ++++------ src/client/clues/windows/pack.module.css | 44 ------- src/client/clues/windows/pack.tsx | 115 +++++++----------- src/client/ui/patterns.module.css | 3 +- src/client/ui/patterns.tsx | 12 +- tests/clues-pack-windows.spec.tsx | 10 +- 10 files changed, 122 insertions(+), 314 deletions(-) diff --git a/src/client/clues/sources/feishu/docs-preview.tsx b/src/client/clues/sources/feishu/docs-preview.tsx index 613f598e..cd61a2d0 100644 --- a/src/client/clues/sources/feishu/docs-preview.tsx +++ b/src/client/clues/sources/feishu/docs-preview.tsx @@ -29,7 +29,7 @@ import { import { TextDocumentContent } from '../../../windows/format-content.tsx' import { MdToc } from '../../../md-toc.tsx' import { t } from '../../../locales.ts' -import { ActionButton, TextArea, TextInput } from '../../../ui/index.ts' +import { ActionButton, ActionFooter, Field, TextArea, TextInput } from '../../../ui/index.ts' import css from './feishu.module.css' import type { FeishuClientLabels } from './labels.ts' import { appDateTime } from './time.ts' @@ -388,8 +388,7 @@ function EditBlock(props: { const { block, labels, onChange, disabled, describedBy } = props const label = `${labels.blocks}: ${block.tag}` return ( -
- {block.tag} +