{{define "content"}}
Page {{.Data.Page}} of {{.Data.Pages}}.{{if .Data.MayWrite}}
Every cell here is editable.{{end}}Table view
{{/* Was "rows {{.Data.Page}} of {{.Data.Pages}} pages", which spliced a
row count and a page count into one phrase that counted neither.
The trailing "with no JavaScript at all" went with it: this view is
the product rather than the fallback, and a subtitle that leads with
what the page lacks argues the opposite. */}}
This view is sorted or filtered. It changes what everybody sees on this tab, and it changes nothing about the sheet itself — the rows are where they always were.
{{end}} {{template "contrast-notice" .Data.Warned}}| Row | {{range .Data.Cols}}{{.}} | {{end}}
|---|---|
| {{.Number}} | {{range .Cells}} {{/* The same attribute vocabulary paint.js writes on the grid's td, written here by the server because this view has no script. Same names, same custom properties, one set of rules in sheets.css — a second vocabulary would be a second answer to "what does bold look like". */}}{{if .Editing}} {{/* One cell at a time carries a form. Rendering an input in all 650 cells of a page would make the scriptless view the heaviest page in the app, and most of those inputs would never be touched. */}} {{if $mayFormat}} {{/* Formatting, for the cell already being edited. PRODUCT.md's second principle: the scriptless path is the product, not the fallback, and the grid has had these controls since 2026-09-02 while this view had none. Spec §14 recorded it as debt with the trigger "the next slice that touches the table view". It posts to the SAME route the grid's toolbar posts to — one allowlist, one bounds check, one cell cap. Only the decoder differs (handlers_format.go's isFormPost). Every toggle is a SELECT and not a checkbox, and that is load-bearing rather than fussy. formatPatch's fields are pointers so "leave bold alone" and "turn bold off" are different requests, and an unchecked checkbox is absent from a submission — indistinguishable from a field that was never there. A checkbox could make a cell bold and could never make it not bold. */}} {{end}} {{else if $mayWrite}} {{/* The link is the affordance: it turns this cell into the form above. The cell shows its computed value, and the title carries the input, so a formula is readable without opening it. */}} {{.Display}} {{else}} {{/* A viewer or a commenter. No anchor, because the destination would answer their submit with a 404 — offering the affordance and then refusing it is worse than not offering it. The comes back here for the same reason it stays on the link view: with no anchor there is nothing holding an empty cell open. */}} {{if .Display}}{{.Display}}{{else}} {{end}} {{end}} | {{end}}