{{define "content"}}

Comments

Notes about particular cells. Open threads first.

Back to sheet
{{/* A fixed sentence chosen by code, in its tone (shared chrome spec ยง4); role="alert" only for a submit that did not work. */}} {{with .Data.Notice}}{{template "callout" (dict "Body" . "Tone" $.Data.NoticeTone "Alert" (eq $.Data.NoticeTone "negative"))}}{{end}} {{if .Data.MayComment}}

Row and column are counted from zero, the way the grid addresses them: row 0, column 0 is A1.

{{end}} {{if .Data.Threads}} {{$sheet := .Data.Sheet}} {{$mayComment := .Data.MayComment}} {{range .Data.Threads}}
{{.Ref}} {{if .Resolved}}resolved{{end}}
{{/* Always open. Not rst-tblock: that is a toggle-block whose body stays display:none until a switch in its head is checked, and a comment has no switch, so its text never showed. */}} {{range .Entries}}

{{.Author}} {{.When.Format "2 Jan 2006, 15:04"}}

{{.Body}}

{{end}} {{if and $mayComment (not .Resolved)}}
{{/* Resolving settles the whole cell's thread, because a thread is the unit people think in and resolving one message of a conversation says nothing useful. */}}
{{end}}
{{end}} {{else}}

No comments yet

A comment is a note about one cell. It stays attached to that cell even when rows are inserted above it.

{{end}} {{end}}