feat: photo metadata panel in preview view

Extract the single-photo body of RightSidebar into a reusable PhotoInfoPanel
(rating / color / flag / filename / title / notes / tags / EXIF) and mount
it inside PreviewView as a toggleable right-side overlay so the user can
rate, tag, and read EXIF without leaving the loupe.

- New PhotoInfoPanel: self-contained, owns its own queries and mutations,
  takes a single photoId. darkTheme prop reserved for future use.
- RightSidebar: thinned down — delegates the single-select case to
  PhotoInfoPanel, keeps its own slim bulk-action panel for multi-select.
- PreviewView: I toggles the panel; new top-right Info button mirrors it.
- useKeyboardShortcuts: gate the global I (right-sidebar toggle) to grid
  mode so it doesn't double-fire alongside the preview-scoped handler.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-08 13:01:25 +02:00
parent 1c428dda8b
commit 3a03a56db2
4 changed files with 922 additions and 753 deletions

View File

@@ -217,9 +217,11 @@ export function useKeyboardShortcuts(props: KeyboardShortcutsProps) {
})
}
// Toggle sidebars
// Toggle sidebars. The right sidebar `i` shortcut is grid-only — in
// preview mode the PreviewView mounts its own `i` handler for the
// overlay info panel, and we don't want both to fire.
useHotkeys('tab', onToggleLeftSidebar, HK_OPTS)
useHotkeys('i', onToggleRightSidebar, HK_OPTS)
useHotkeys('i', onToggleRightSidebar, { ...HK_OPTS, enabled: !isPreview })
// Search focus (/ or Cmd/Ctrl+F).
const focusSearch = () => {