Skip to content

feat(sidebarLeft): add pinboard widget for pinned notes & images - #93

Open
FierraCodes wants to merge 3 commits into
pctrade:mainfrom
FierraCodes:feat/pinboard
Open

feat(sidebarLeft): add pinboard widget for pinned notes & images#93
FierraCodes wants to merge 3 commits into
pctrade:mainfrom
FierraCodes:feat/pinboard

Conversation

@FierraCodes

Copy link
Copy Markdown
Contributor

Summary

Adds a new Pinboard tab to the left sidebar for storing, organizing, and browsing pinned notes and images.


Features

  • Sidebar Tab Integration: Adds a Pinboard tab with push_pin icon and sidebar configuration toggle (Config.options.sidebar.pinboard.enable).
  • Bottom Compose Card:
    • Multi-line text input with Ctrl+Enter to pin and Ctrl+V clipboard paste.
    • Image picker dialog (supports Zenity / KDialog).
    • Smart clipboard paste: auto-detects copied images or text and attaches them.
  • Responsive Image Scaling: Pinned images dynamically scale to the full sidebar width while preserving their native aspect ratios.
  • Draggable Reordering:
    • Dedicated 6-dot vertical drag handle (drag_indicator) on the left of each card.
    • Smooth card displacement animations with elevated highlight state.
    • Edge Auto-Scrolling: Continuously auto-scrolls the list when dragging cards near or beyond the top/bottom viewport edges.
  • Item-by-Item Browsing:
    • Top navigation bar showing current item index (Pin N of M) with previous/next scroll buttons.
    • Smooth snap-to-item scrolling with mouse wheel support.
  • Card Actions:
    • One-click copy text/image to clipboard with visual feedback.
    • Open images in default external viewer (xdg-open).
    • Delete X button on the top-right of each card.
  • Clear All: Bottom summary bar with pinned item counter and a one-click "Clear all" button.
    -Persistence: Backed by services/Pinboard.qml using FileView JSON storage (~/.local/state/quickshell/user/pinboard.json) and persistent image cache (pinboard_images/).

Changed / Added Files

  • services/Pinboard.qml (new): Singleton service managing JSON persistence, file operations, and item reordering.
  • modules/ii/sidebarLeft/PinboardWidget.qml (new): Main UI container with compose card, navigation header, auto-scrolling ListView, and clear bar.
  • modules/ii/sidebarLeft/pinboard/PinboardItem.qml (new): Individual pinned item card with dynamic image scaling and left drag handle.
  • modules/ii/sidebarLeft/SidebarLeftContent.qml: Integrated Pinboard tab and page into the sidebar's SwipeView.
  • modules/common/Directories.qml: Added pinboardPath and pinboardImages directories.
  • modules/common/Config.qml: Added sidebar.pinboard config options.

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