Comments Section

Part of SVG Report Renderer. Displays record comments and images in a 3-column layout.

Layout

  • 3 equal-width columns
  • Round-robin distribution of items
  • Each column fills top-to-bottom

Item Structure

Each comment item shows:

  1. Date: When the record occurred
  2. Tag indicator: Colored dot with tag name
  3. Comment text: Max 4 lines, truncated with ”…”
  4. Thumbnails: Attached images (if any)

Image Embedding

  • Images loaded via ReportImageProvider protocol
  • Converted to base64 and embedded as <image> elements
  • Thumbnail size: 80x80px
  • Supports JPEG, PNG, GIF, WebP
  • Maximum 8 images per report (limits file size)

Data Source

Uses ReportCommentItem from ReportData:

struct ReportCommentItem {
    let recordId: UUID
    let date: Date
    let tagName: String?
    let tagColor: String?
    let comment: String
    let imageFilenames: [String]
}

Filtering

Only records with content are included:

  • Non-empty comment, OR
  • At least one attached image

Empty records are excluded from the comments section.

Related