Skip to content

feat: Object sidebar — file upload, notes, tags, tasks & component refactor #1166

@rubenvdlinde

Description

@rubenvdlinde

Summary

Rework the CnObjectSidebar to fix broken functionality and add missing features across all tabs (Files, Notes, Tags, Tasks, Audit Trail), then refactor each tab into a self-contained component.

Changes

Bug Fixes

  • File upload: Fixed broken upload button (NcButton inside label swallowed clicks), replaced with drag-and-drop zone
  • File upload endpoint: Changed from /files (expects JSON name+content) to /filesMultipart (accepts FormData)
  • Notes creation: Fixed missing setVerb('comment') causing "Actor, Object and Verb" error
  • Tags: Reworked from broken object-property approach to Nextcloud system tags

New Features

  • File drop zone: Drag-and-drop + click-to-browse with visual feedback and error display
  • Notes editing: Edit/delete actions via dropdown menu, inline editing with save/cancel
  • Object-level tags: New API endpoints using Nextcloud system tags with autocomplete suggestions
  • Task creation: Add task form with summary, deadline date picker, and user assignee select
  • Task actions: Complete and delete tasks from the sidebar
  • Auto-create calendar: TaskService creates a VTODO calendar if none exists

Refactor

  • Extracted each tab into its own component: CnFilesTab, CnNotesTab, CnTagsTab, CnTasksTab, CnAuditTrailTab
  • CnObjectSidebar is now a thin shell (~100 lines)
  • All tab components are independently importable
  • Slot overrides remain backwards compatible

Repos Affected

  • openregister — Backend API endpoints (tags, notes, tasks, calendar)
  • nextcloud-vue — Frontend tab components

Test Plan

  • Upload files via drag-and-drop and click-to-browse
  • Add, edit, and delete notes
  • Add and remove tags (with autocomplete)
  • Create tasks with summary, deadline, and assignee
  • Complete and delete tasks
  • Verify audit trail tab loads

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions