feat: add canvas interaction mode toggle (pan/selection)#116
Merged
breaking-brake merged 3 commits intomainbreaking-brake/cc-wf-studio:mainfrom Nov 20, 2025
feat/canvas-pan-selection-modebreaking-brake/cc-wf-studio:feat/canvas-pan-selection-modeCopy head branch name to clipboard
Merged
feat: add canvas interaction mode toggle (pan/selection)#116breaking-brake merged 3 commits intomainbreaking-brake/cc-wf-studio:mainfrom feat/canvas-pan-selection-modebreaking-brake/cc-wf-studio:feat/canvas-pan-selection-modeCopy head branch name to clipboard
breaking-brake merged 3 commits intomainbreaking-brake/cc-wf-studio:mainfrom
feat/canvas-pan-selection-modebreaking-brake/cc-wf-studio:feat/canvas-pan-selection-modeCopy head branch name to clipboard
Conversation
Add toggle button to switch between hand tool (pan) and range selection modes on the canvas. Implement using Radix UI Toggle Group for accessibility and future shadcn/ui compatibility. ## Features - **Toggle button**: Radix UI Toggle Group with Lucide React icons - **Pan mode (default)**: Drag to pan canvas, Ctrl/Cmd+drag to select - **Selection mode**: Drag to select nodes, Ctrl/Cmd+drag to pan - **Keyboard support**: Arrow keys navigation via Radix UI - **Accessibility**: ARIA attributes auto-configured ## Technical Details - Added `lucide-react` for lightweight icons (Hand, MousePointerClick) - Added `@radix-ui/react-toggle-group` for accessible toggle UI - Added `interactionMode` state to workflow store - Configured ReactFlow `panOnDrag` and `selectionOnDrag` props - Implemented Ctrl/Cmd key handler for temporary mode switching - i18n support for 5 languages (en, ja, ko, zh-CN, zh-TW) ## UI/UX - Visual toggle with icons and labels - Active state highlighted with primary button color - Inactive state with secondary button color and reduced opacity - Tooltips for mode switching guidance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace toggle group buttons with a switch component for more intuitive mode switching. Add icon badge backgrounds for improved visibility across different theme colors. ## Changes - Replace `@radix-ui/react-toggle-group` with `@radix-ui/react-switch` - Remove text labels, use icons only (Hand & MousePointerClick) - Add circular badge background for active icon - Improve color contrast using badge theme variables ## UI Design - **Left**: Hand icon (pan mode) - **Center**: Switch component - **Right**: MousePointerClick icon (selection mode) - **Active state**: Badge background + high contrast color - **Inactive state**: Transparent background + disabled color ## Benefits - More compact layout - Better visual feedback - Improved accessibility with proper theme colors - Smooth transitions (150ms) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add canvas interaction mode toggle UI to switch between pan mode and selection mode. The toggle is placed in the top-left corner of the canvas as a compact, semi-transparent pill-shaped panel. Features: - Pan mode (default): Drag to pan, Ctrl/Cmd+drag for range selection - Selection mode: Drag for range selection, Ctrl/Cmd+drag to pan - Toolbar button toggle with icons (Hand/MousePointerClick) - Keyboard support: Ctrl/Cmd key for temporary mode switching - Accessibility: ARIA labels, keyboard navigation support - Tooltips for icon explanation - Clickable icons in addition to switch UI Design: - Pill-shaped panel (borderRadius: 20px) for soft visual appearance - Semi-transparent (opacity: 0.85) to avoid hiding canvas elements - Compact sizing (20% smaller icons/spacing) to minimize obstruction - Active icon highlighted with badge background Dependencies: - @radix-ui/react-switch: ^1.2.6 - @radix-ui/react-tooltip: ^1.2.8 - lucide-react: ^0.554.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Merged
github-actions Bot
added a commit
that referenced
this pull request
Nov 20, 2025
## [2.8.0](v2.7.4...v2.8.0) (2025-11-20) ### Features * add canvas interaction mode toggle (pan/selection) ([#116](#116)) ([6d5f4be](6d5f4be))
Contributor
|
🎉 This PR is included in version 2.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
breaking-brake
added a commit
that referenced
this pull request
Nov 23, 2025
* feat: add canvas pan/selection mode toggle with Radix UI Add toggle button to switch between hand tool (pan) and range selection modes on the canvas. Implement using Radix UI Toggle Group for accessibility and future shadcn/ui compatibility. ## Features - **Toggle button**: Radix UI Toggle Group with Lucide React icons - **Pan mode (default)**: Drag to pan canvas, Ctrl/Cmd+drag to select - **Selection mode**: Drag to select nodes, Ctrl/Cmd+drag to pan - **Keyboard support**: Arrow keys navigation via Radix UI - **Accessibility**: ARIA attributes auto-configured ## Technical Details - Added `lucide-react` for lightweight icons (Hand, MousePointerClick) - Added `@radix-ui/react-toggle-group` for accessible toggle UI - Added `interactionMode` state to workflow store - Configured ReactFlow `panOnDrag` and `selectionOnDrag` props - Implemented Ctrl/Cmd key handler for temporary mode switching - i18n support for 5 languages (en, ja, ko, zh-CN, zh-TW) ## UI/UX - Visual toggle with icons and labels - Active state highlighted with primary button color - Inactive state with secondary button color and reduced opacity - Tooltips for mode switching guidance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: replace toggle buttons with switch UI for better UX Replace toggle group buttons with a switch component for more intuitive mode switching. Add icon badge backgrounds for improved visibility across different theme colors. ## Changes - Replace `@radix-ui/react-toggle-group` with `@radix-ui/react-switch` - Remove text labels, use icons only (Hand & MousePointerClick) - Add circular badge background for active icon - Improve color contrast using badge theme variables ## UI Design - **Left**: Hand icon (pan mode) - **Center**: Switch component - **Right**: MousePointerClick icon (selection mode) - **Active state**: Badge background + high contrast color - **Inactive state**: Transparent background + disabled color ## Benefits - More compact layout - Better visual feedback - Improved accessibility with proper theme colors - Smooth transitions (150ms) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add canvas interaction mode toggle (pan/selection) Add canvas interaction mode toggle UI to switch between pan mode and selection mode. The toggle is placed in the top-left corner of the canvas as a compact, semi-transparent pill-shaped panel. Features: - Pan mode (default): Drag to pan, Ctrl/Cmd+drag for range selection - Selection mode: Drag for range selection, Ctrl/Cmd+drag to pan - Toolbar button toggle with icons (Hand/MousePointerClick) - Keyboard support: Ctrl/Cmd key for temporary mode switching - Accessibility: ARIA labels, keyboard navigation support - Tooltips for icon explanation - Clickable icons in addition to switch UI Design: - Pill-shaped panel (borderRadius: 20px) for soft visual appearance - Semi-transparent (opacity: 0.85) to avoid hiding canvas elements - Compact sizing (20% smaller icons/spacing) to minimize obstruction - Active icon highlighted with badge background Dependencies: - @radix-ui/react-switch: ^1.2.6 - @radix-ui/react-tooltip: ^1.2.8 - lucide-react: ^0.554.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
breaking-brake
pushed a commit
that referenced
this pull request
Nov 23, 2025
## [2.8.0](v2.7.4...v2.8.0) (2025-11-20) ### Features * add canvas interaction mode toggle (pan/selection) ([#116](#116)) ([6d5f4be](6d5f4be))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Currently, the ReactFlow canvas is always in "hand tool mode" (pan mode), making range selection unavailable without using modifier keys.
Current Behavior
Expected Behavior
Solution
Added a canvas interaction mode toggle UI that allows switching between pan mode and selection mode.
Features
UI Design Principles
borderRadius: 20px) for soft visual appearanceopacity: 0.85) to avoid hiding canvas elementsChanges
New Component
File:
src/webview/src/components/InteractionModeToggle.tsxFile:
src/webview/src/components/WorkflowEditor.tsxAdded ReactFlow
Panelcomponent:Store Updates
File:
src/webview/src/stores/workflow-store.tsInternationalization
File:
src/webview/src/i18n/translations/ja.tstoolbar.interactionMode.panButton: '手のひら'toolbar.interactionMode.rangeSelectionButton: '範囲選択'toolbar.interactionMode.switchToPan: '手のひらモードに切り替え'toolbar.interactionMode.switchToSelection: '範囲選択モードに切り替え'Added translations for 5 languages: en, ja, ko, zh-CN, zh-TW
Impact
UX Improvements
Breaking Changes
Side Effects
Testing
npm run format- 137 files, no issuesnpm run lint- 138 files, no issuesnpm run check- 138 files, no issuesnpm run build- Build successfulDependencies
Added packages:
@radix-ui/react-switch: ^1.2.6@radix-ui/react-tooltip: ^1.2.8lucide-react: ^0.554.0Rationale: Radix UI chosen for future shadcn/ui compatibility, Lucide React for tree-shakable icons
Notes
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com