Skip to content

Fix library view TODOs and bugs#6

Open
vibelyova wants to merge 1 commit into
ly0va:library-viewfrom
vibelyova:library-view-todos
Open

Fix library view TODOs and bugs#6
vibelyova wants to merge 1 commit into
ly0va:library-viewfrom
vibelyova:library-view-todos

Conversation

@vibelyova
Copy link
Copy Markdown

Summary

Resolves all TODO/FIXME items in src/library.ts and fixes related bugs.

src/library.ts

  • Dynamic dropdowns: Source and type filter dropdowns are now populated from actual library data instead of hardcoded options
  • Copy button on mini cards: Each library card has a copy-to-clipboard button (appears on hover, bottom-left corner)
  • Arrow key navigation in preview modal: Left/Right arrow keys navigate between items when the preview popup is open
  • Ctrl/Cmd+F focuses search: Keyboard shortcut to jump to the search input
  • Text selection fix: Clicking to select text no longer accidentally opens the preview modal
  • Grid refresh bug: Fixed detached DOM element causing the grid to not re-render when the view is refreshed
  • Filter/sort state preserved: Dropdown selections, search text, and tier buttons persist across view refreshes
  • Battle points cleared: Status bar battle points are cleared when the library view is active

src/main.ts

  • Library view now refreshes automatically after a library scan (data reload)
  • Library card colors update when the default color setting changes (renderAll)
  • Added refreshLibraryViews() helper for full view rebuilds (dropdowns + cards)

styles.css

  • Added .bv-mini-copy styles for the hover-reveal copy button on library cards

Test plan

  • Open the library view and verify source/type dropdowns reflect actual data
  • Hover a mini card and click the copy button — verify YAML is copied
  • Open a preview modal and press Left/Right arrow keys to navigate
  • Press Ctrl/Cmd+F in the library view — search input should focus
  • Select text on a mini card — modal should not open
  • Change default color in settings — library card colors should update
  • Refresh library (command or ribbon) — library view should update
  • Verify status bar clears battle points when library view is active

🤖 Generated with Claude Code

@vibelyova vibelyova force-pushed the library-view-todos branch from 2eca70f to 4f7a402 Compare March 6, 2026 01:10
… refresh

- Dynamic source/type dropdowns populated from library data instead of hardcoded
- Copy button on mini cards (visible on hover, bottom-left)
- Left/right arrow key navigation in preview modal
- Ctrl/Cmd+F focuses the search input
- Library view refreshes on library scan and default color change
- Fix grid not re-rendering when view is refreshed (detached DOM element)
- Preserve filter/sort state across view refreshes
- Prevent accidental modal open when selecting text
- Clear status bar battle points when library view opens

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vibelyova vibelyova force-pushed the library-view-todos branch from 4f7a402 to eb140ad Compare March 6, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant