feat: レイアウト方向切り替えボタン(LR / TB)の追加
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- frontend
调研方向
Start with the ViewState definition in src/shared/types.ts, the existing applyDagreLayout(nodes, edges, direction) entry point, and the setLayoutState action mentioned in the dependency. Trace how the toolbar updates view state and how layoutState triggers Dagre, then run npm run check. Done means the LR/TB buttons switch direction, manual mode relayouts without confirmation, and the result persists through SAVE_LAYOUT.
由索引模型根据 Issue 内容生成。
描述
概要
layoutAlgorithm: 'dagre-lr' | 'dagre-tb' は ViewState の型に定義済みだが、切り替えるUIが存在しない。ツールバーにトグルボタンを追加し、グラフの向きをワンクリックで切り替えられるようにする。
- LR(左→右): 継承ヒエラルキー・クラス依存グラフに適する(デフォルト)
- TB(上→下): SOQL/DML データフロー、SObject 間リレーションシップの確認に適する
現状
// src/shared/types.ts(実装済み)
export interface ViewState {
layoutAlgorithm: 'dagre-lr' | 'dagre-tb' | 'manual'; // ← UI なし
// ...
}
applyDagreLayout(nodes, edges, direction: 'LR' | 'TB') も実装済み。
タスク
- ツールバー(右上)に方向切り替えボタンを追加
[→ LR]/[↓ TB]のセグメントボタン形式
- ボタン押下で
viewState.layoutAlgorithmを更新 -
layoutAlgorithmが変わったときlayoutStateをクリアして Dagre を再実行layoutStateをリセットすることでneedsLayout = trueが再発火する- 再レイアウト後の位置を
SAVE_LAYOUTで永続化
-
'manual'状態(ユーザーが手動でノードを動かした後)では方向ボタンを押すとリセット確認なしで再レイアウト
UI イメージ
[ テスト非表示 ] [ MPkg非表示 ] [ → LR | ↓ TB ]
完了条件
- LR/TB ボタンでグラフの向きが切り替わる
- 切り替え後のレイアウトが
SAVE_LAYOUTで保持される -
npm run checkが全てグリーン
依存
- fix: ノードドラッグ時レイアウト崩れバグ(
setLayoutStateアクションを利用)
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
qnaiv/codegraph 的其他 Issue
-
enhancement ui
难度 3/5 1-2 天 新手友好度 68/100
-
enhancement ui
难度 3/5 1-2 天 新手友好度 68/100
-
phase-4 whiteboard
难度 4/5 3-5 天 新手友好度 58/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·