mirror of
https://github.com/OFFIS-ESC/constellation-analyzer
synced 2026-01-27 07:43:41 +00:00
refactor: remove non-functional Ctrl+A select-all shortcut
Removes the Ctrl+A keyboard shortcut and associated select-all functionality that was not working properly. Changes: - Remove select-all shortcut definition from useGlobalShortcuts - Remove "Select All" menu item from View menu - Remove handleSelectAll stub function from App.tsx - Clean up onSelectAll prop from MenuBar component The select-all feature was dysfunctional (only logging to console) and not properly implemented, so it has been removed entirely. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3ab90e5dd3
commit
9d3dfff64a
3 changed files with 1 additions and 32 deletions
|
|
@ -75,12 +75,6 @@ function AppContent() {
|
|||
fitView({ padding: 0.2, duration: 300 });
|
||||
}, [fitView]);
|
||||
|
||||
const handleSelectAll = useCallback(() => {
|
||||
// This will be implemented in GraphEditor
|
||||
// For now, we'll just document it
|
||||
console.log("Select All - to be implemented");
|
||||
}, []);
|
||||
|
||||
// Setup global keyboard shortcuts
|
||||
useGlobalShortcuts({
|
||||
onUndo: undo,
|
||||
|
|
@ -89,7 +83,6 @@ function AppContent() {
|
|||
onOpenDocumentManager: () => setShowDocumentManager(true),
|
||||
onOpenHelp: () => setShowKeyboardHelp(true),
|
||||
onFitView: handleFitView,
|
||||
onSelectAll: handleSelectAll,
|
||||
onFocusSearch: () => leftPanelRef.current?.focusSearch(),
|
||||
});
|
||||
|
||||
|
|
@ -133,7 +126,6 @@ function AppContent() {
|
|||
<MenuBar
|
||||
onOpenHelp={() => setShowKeyboardHelp(true)}
|
||||
onFitView={handleFitView}
|
||||
onSelectAll={handleSelectAll}
|
||||
onExport={exportCallbackRef.current || undefined}
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,11 +24,10 @@ import type { ExportOptions } from '../../utils/graphExport';
|
|||
interface MenuBarProps {
|
||||
onOpenHelp?: () => void;
|
||||
onFitView?: () => void;
|
||||
onSelectAll?: () => void;
|
||||
onExport?: (format: 'png' | 'svg', options?: ExportOptions) => Promise<void>;
|
||||
}
|
||||
|
||||
const MenuBar: React.FC<MenuBarProps> = ({ onOpenHelp, onFitView, onSelectAll, onExport }) => {
|
||||
const MenuBar: React.FC<MenuBarProps> = ({ onOpenHelp, onFitView, onExport }) => {
|
||||
const [activeMenu, setActiveMenu] = useState<string | null>(null);
|
||||
const [showDocumentManager, setShowDocumentManager] = useState(false);
|
||||
const [showNodeConfig, setShowNodeConfig] = useState(false);
|
||||
|
|
@ -415,18 +414,6 @@ const MenuBar: React.FC<MenuBarProps> = ({ onOpenHelp, onFitView, onSelectAll, o
|
|||
<span className="text-xs text-gray-400">{getShortcutLabel('fit-view')}</span>
|
||||
)}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
onSelectAll?.();
|
||||
closeMenu();
|
||||
}}
|
||||
className="w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center justify-between"
|
||||
>
|
||||
<span>Select All</span>
|
||||
{getShortcutLabel('select-all') && (
|
||||
<span className="text-xs text-gray-400">{getShortcutLabel('select-all')}</span>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ interface UseGlobalShortcutsOptions {
|
|||
onRedo?: () => void;
|
||||
onOpenHelp?: () => void;
|
||||
onFitView?: () => void;
|
||||
onSelectAll?: () => void;
|
||||
onFocusSearch?: () => void;
|
||||
}
|
||||
|
||||
|
|
@ -143,15 +142,6 @@ export function useGlobalShortcuts(options: UseGlobalShortcutsOptions = {}) {
|
|||
},
|
||||
|
||||
// Selection
|
||||
{
|
||||
id: "select-all",
|
||||
description: "Select All",
|
||||
key: "a",
|
||||
ctrl: true,
|
||||
handler: () => options.onSelectAll?.(),
|
||||
category: "Selection",
|
||||
enabled: !!options.onSelectAll,
|
||||
},
|
||||
{
|
||||
id: "deselect-all",
|
||||
description: "Deselect All",
|
||||
|
|
|
|||
Loading…
Reference in a new issue