Commit 30cee56
feat: ER diagram table-only view toggle and edge snap to table names (#3)
* feat: ER 图仅表名视图切换与关系线吸附
- 新增 ViewMode 常量与 parseDatabaseToER(database, { tableOnly })
- 仅表名时节点不渲染 list 端口,边 source/target 仅 cell 以吸附表名节点
- Viewer 增加「仅表名」Switch、viewMode 状态与 localStorage 记忆
- 新增 E2E 场景:切换仅表名 → 关系线保留 → 切回完整视图
- 规格与任务:specs/003-toggle-columns-table-names
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: enable lint in pre-commit, use English comments and UI labels
- Add lint script and lint-staged config in package.json
- Pre-commit uses --config package.json to avoid legacy linters config
- Remove .lintstagedrc (config moved to package.json)
- Fix ESLint no-unused-vars in src/nodes/er.ts
- Use English comments and tooltips in viewer and viewMode
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: ignore
* fix(e2e): 工具栏测试使用 .ant-btn 排除仅表名 Switch,修复 CI 失败
- 将 .zoom-toolbar button 改为 .zoom-toolbar .ant-btn,避免点到 Switch 的 button
- 修复 should zoom in / zoom out / reset view 三个用例
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(ci): 保证 E2E 生成 playwright-report 并容错上传
- playwright.config: CI 下在 reporter 中加入 list,保留 html 以生成 playwright-report
- test.yml: 去掉 --reporter=list,改用 config;上传报告步骤加 continue-on-error
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(e2e): 等待 svg text 出现后再断言表名,避免 CI 时序失败
should display table names 在 CI 上因图未渲染完即断言导致 0 个 text
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(e2e): 合并冲突,统一 should display table names 等待逻辑
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: no spec
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 3e54268 commit 30cee56
File tree
13 files changed
+7721
-2668
lines changed- .github/workflows
- .husky
- src
- components/viewer
- constants
- nodes
- services/er
- tests/e2e
13 files changed
+7721
-2668
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
20 | 38 | | |
21 | 39 | | |
22 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments