diff --git a/frontend/src/DesktopWorkspace.jsx b/frontend/src/DesktopWorkspace.jsx index 48cd313..b05e967 100644 --- a/frontend/src/DesktopWorkspace.jsx +++ b/frontend/src/DesktopWorkspace.jsx @@ -9,7 +9,7 @@ import React, { import { resolveDocumentAssetUrl, createAssetView } from './asset_manager'; import { useAssetNavigator } from './hooks/useAssetNavigator'; import { ArrowLeftIcon, ArrowRightIcon } from './ui/icons'; -import { createDocumentsTableHeaderActions } from './documents/DocumentsTable'; +import { createDocumentsTableHeaderActions } from './documents/DocumentsPanel'; import createWorkspaceSurfaceConfig from './documents/workspaceHeader'; import { clamp, formatTransform } from './desktop/math'; import { preventAll } from './desktop/events'; diff --git a/frontend/src/app/AppLayout.jsx b/frontend/src/app/AppLayout.jsx index 9d5634d..fae4135 100644 --- a/frontend/src/app/AppLayout.jsx +++ b/frontend/src/app/AppLayout.jsx @@ -389,8 +389,6 @@ const AppLayout = () => { [selectedEntries], ); - const selectionCount = selectedDocumentIds.length; - const selectedFolderIds = useMemo( () => selectedEntries @@ -3135,9 +3133,6 @@ const AppLayout = () => { if (row.type === 'folder') { selectFolder(row.id); } else if (row.type === 'document') { - if (selectionCount === 0) { - detailPanelControlRef.current.open(); - } openDocumentPreview(row.id); } return; @@ -3170,14 +3165,10 @@ const AppLayout = () => { setFocusedRowKey(targetRow.key); - const hadSelection = selectionCount > 0; handleRowSelection(targetRow.key, { shiftKey, preventDefault: () => {}, }); - if (targetRow.type === 'document' && !hadSelection) { - detailPanelControlRef.current.open(); - } }, [ navigableRows, @@ -3187,7 +3178,6 @@ const AppLayout = () => { handleRowSelection, selectFolder, openDocumentPreview, - selectionCount, setFocusedRowKey, ], ); diff --git a/frontend/src/app/useWorkspaceSurface.js b/frontend/src/app/useWorkspaceSurface.js index 8ba2108..a254994 100644 --- a/frontend/src/app/useWorkspaceSurface.js +++ b/frontend/src/app/useWorkspaceSurface.js @@ -1,6 +1,6 @@ import React, { useCallback, useMemo } from 'react'; import { ChevronsRightIcon } from '../ui/icons'; -import { createDocumentsSurface } from '../documents/DocumentsTable'; +import { createDocumentsSurface } from '../documents/DocumentsPanel'; import { createPreviewSurface } from '../preview/PreviewWorkspace'; import { createDesktopSurface } from '../DesktopWorkspace'; diff --git a/frontend/src/documents/DocumentsTable.jsx b/frontend/src/documents/DocumentsPanel.jsx similarity index 99% rename from frontend/src/documents/DocumentsTable.jsx rename to frontend/src/documents/DocumentsPanel.jsx index 5d2357a..7ef772b 100644 --- a/frontend/src/documents/DocumentsTable.jsx +++ b/frontend/src/documents/DocumentsPanel.jsx @@ -201,7 +201,7 @@ const DocumentThumbnailImage = ({ ); }; -const DocumentsTable = ({ +const DocumentsPanel = ({ currentFolderName, breadcrumbs, onRefresh, @@ -441,7 +441,10 @@ const DocumentsTable = ({ } if (entry.type === EntryType.document) { - if (typeof onOpenDetailPanel === 'function') { + const hasModifier = Boolean( + event && (event.shiftKey || event.metaKey || event.ctrlKey || event.altKey), + ); + if (!hasModifier && typeof onOpenDetailPanel === 'function') { onOpenDetailPanel(); } return; @@ -1228,7 +1231,7 @@ const DocumentsTable = ({ ); }; -export default DocumentsTable; +export default DocumentsPanel; export { DocumentThumbnailImage }; export const createDocumentsTableHeaderActions = ({ @@ -1328,7 +1331,7 @@ export const createDocumentsSurface = ({ onNavigateParent, actions, breadcrumbs, - content: , + content: , detail, });