Document Detail, Preview, and Lifecycle
The document detail view is a core screen - think of it as a "control panel" for one document.
Layout Structure
Center: Preview Pane
- PDF/Doc viewer for common formats
- Images with zoom and pan
- Text/code with syntax highlighting
- Open in new tab when needed
Left/Top: Document Header
- Document title
- Key status badges:
- State (Draft, In Review, Approved)
- Classification
- Retention
Right Sidebar: Metadata and Activity
- Core metadata fields
- Activity timeline
- Workflow controls
Preview & Interaction Features
Viewing Capabilities
- In-place viewing for common formats
- Zoom, page navigation, thumbnails
- Search within document (if OCR/text available)
Annotations
- Section-based comments
- Anchored annotations for documents that support it
- Highlight and markup tools
Metadata Panel
Core Fields
| Field | Description |
|---|---|
| Owner | Document owner |
| Created | Creation timestamp |
| Modified | Last modified timestamp |
| Version | Current version number |
| State | Lifecycle state |
| Retention | Retention schedule |
Custom Fields (by document type)
- Contract dates
- Customer/client
- Project association
- Regulatory mappings
Compliance Features
- Inline editing with validation
- Audit logging hints for compliance workflows
- Change tracking
Versioning and History
Version List
- Version timeline with:
- Who made changes
- When changes were made
- What changed (diff metadata)
- Restore previous versions
- Compare versions side-by-side
Activity Log
- Views
- Edits
- Approvals
- Permission changes
- External shares
Lifecycle Controls
State Machine Actions
| Action | Description |
|---|---|
| Submit for review | Move to review state |
| Approve | Approve with optional comment |
| Reject | Reject with reason |
| Publish | Make document live |
| Archive | Move to archive |
| Legal hold | Apply legal hold |
Policy Display
Surface policies prominently:
- "Retention: 7 years after close"
- "On legal hold"
- "Classification: Confidential"
Component Structure
// DocumentDetailView.tsx
interface DocumentDetailViewProps {
documentId: string;
}
// DocumentPreview.tsx
interface DocumentPreviewProps {
document: Document;
onAnnotate: (annotation: Annotation) => void;
}
// MetadataPanel.tsx
interface MetadataPanelProps {
metadata: DocumentMetadata;
onUpdate: (field: string, value: any) => void;
editable: boolean;
}
// VersionTimeline.tsx
interface VersionTimelineProps {
versions: Version[];
currentVersion: number;
onRestore: (version: number) => void;
onCompare: (v1: number, v2: number) => void;
}
// ActivityFeed.tsx
interface ActivityFeedProps {
activities: Activity[];
filters?: ActivityFilter;
}