feat: レイアウト方向切り替えボタン(LR / TB)の追加
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
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.
Written by the indexing model from the issue text.
Description
概要
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アクションを利用)
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qnaiv/codegraph
-
enhancement ui
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
enhancement ui
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
phase-4 whiteboard
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
AOSSIE-Org/DebateAI#582 · 2 comments ·