Component identity in a Doc

A page Doc can hold several tables of the same component: three cards tables, two images. Some things about a component are kept outside the Doc, in the page's settings Sheet: its width at each screen size, whether it is hidden on phones. To know which table those belong to, SeedPage gives each table an identity of its own.

The named range

The identity is a named range around the table, a feature of Google Docs that marks a stretch of the document with a name. SeedPage names it cms: followed by a short id, such as cms:3f9a2c71d0e4. Docs keeps named ranges out of sight: nothing shows in the text, and typing inside the table does not change it.

The text between two tables gets one too, so the editor can change that run of text by itself.

When it is given

  • A component added in SeedPage's editor gets its identity at once.
  • A table written in Google Docs gets one the next time the page is opened in SeedPage's editor: the editor names every table that has none, then shows the page.
  • Until then the table is shown and published as any other; only its width cannot be set, because there is nothing to keep it on.

What it keeps

  • The layout: the row of the page settings' layout tab with the table's id holds its width at each screen size and where it is hidden.
  • Edits from SeedPage: the editor and the AI find the table to change by its id, not by its place, so the Doc can change around it meanwhile.

Copying and retyping in Docs

  • Moving a table with cut and paste, or copying it, does not carry its named range: Docs does not paste named ranges. The pasted table is new to SeedPage, and gets a new identity at the next opening in the editor. Its width goes back to the full row; set it again in Layout.
  • Retyping a table, or deleting it and making another, is the same: a new table, a new identity.
  • Changing the words, the images or the variants inside a table keeps its identity.

The settings of a table that is gone stay in the layout tab, unused. They do no harm.

Folder and Git sites

On a site kept as files there are no Docs: each component in a page file has its id written next to its name, and the same rules apply.