feat: implement comments and activity panel in workspace
- Added CommentsPanel component for managing comments on documents. - Integrated comment creation, deletion, and resolution functionalities. - Implemented activity tracking for document interactions. - Enhanced SketchPage with editing and saving capabilities. - Introduced template management API endpoints for creating, sharing, and deleting templates. - Added runtime validation report for frontend and backend. - Created GettingStartedPanel for user onboarding with template options. - Implemented Playwright E2E tests for accessibility and export functionality.
This commit is contained in:
parent
6e354ba041
commit
809235e962
41 changed files with 2840 additions and 285 deletions
44
backend/app/schemas/collaboration.py
Normal file
44
backend/app/schemas/collaboration.py
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class CommentCreate(BaseModel):
|
||||
body: str = Field(min_length=1, max_length=5000)
|
||||
parent_id: str | None = None
|
||||
|
||||
|
||||
class CommentResponse(BaseModel):
|
||||
id: str
|
||||
document_id: str
|
||||
body: str
|
||||
parent_id: str | None = None
|
||||
author_id: int
|
||||
author_name: str
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
resolved: bool = False
|
||||
|
||||
|
||||
class CommentResolveRequest(BaseModel):
|
||||
resolved: bool
|
||||
|
||||
|
||||
class NotificationResponse(BaseModel):
|
||||
id: str
|
||||
kind: str
|
||||
message: str
|
||||
document_id: str | None = None
|
||||
comment_id: str | None = None
|
||||
actor_name: str
|
||||
read: bool
|
||||
created_at: datetime
|
||||
|
||||
|
||||
class ActivityResponse(BaseModel):
|
||||
id: str
|
||||
document_id: str
|
||||
kind: str
|
||||
message: str
|
||||
actor_name: str
|
||||
created_at: datetime
|
||||
Loading…
Add table
Add a link
Reference in a new issue