| 1 | # Rust table authoring |
| 2 | |
| 3 | `created/candidate` is the page writer's output for |
| 4 | `a_new_table_is_created_on_a_fresh_page` in |
| 5 | `crates/onestore/tests/page_tables.rs`: on a section created in Rust, a |
| 6 | paragraph between two text paragraphs becomes a two-by-two table with locked |
| 7 | 144 pt and 216 pt columns, visible borders and a text paragraph in every |
| 8 | cell. `created/cold` is a fresh OneNote 2010 read showing both columns with |
| 9 | their widths and locks, both rows and every cell text. |
| 10 | |
| 11 | `edited/candidate` is the writer's output for |
| 12 | `a_row_and_a_column_are_added_to_a_native_table_and_removed_again` on |
| 13 | `corpus/outline-edit/tree/before`: the one-row, two-column native table on |
| 14 | "Delete cell subtree" gains an unlocked 120 pt third column and a second row |
| 15 | of three cells. `edited/cold` is its cold read: the native columns keep their |
| 16 | widths and locks, OneNote sizes the unlocked column to its content, and the |
| 17 | new row and cells read back with their text. |
| 18 | |
| 19 | `nested/candidate` is the writer's output for |
| 20 | `a_table_nests_inside_a_cell_and_is_removed_again` on the same tree fixture: |
| 21 | the second cell of the native table gains a paragraph holding a one-column, |
| 22 | two-row table with locked 72 pt column and visible borders. `nested/cold` is |
| 23 | its cold read with both tables. |
| 24 | |
| 25 | Native rows and cells are plain containers; the writer creates them with the |
| 26 | modification time, the indent array copied from a sibling cell (OneNote's |
| 27 | default without one), and the flags every native cell carries, rebuilds each table's row and cell order to the |
| 28 | model's, and writes the column count, widths, locks and border flag. New |
| 29 | tables start as an empty paragraph whose content the structure pass replaces. |
| 30 | An edit that ends with an empty cell is refused; its ops refill the cell themselves. |
| 31 | `tools/test_table_edit.py` checks all three captures without a VM. Regenerate |
| 32 | with `ONESTORE_TABLE_EXPORT`, `ONESTORE_TABLE_EDIT_EXPORT` and |
| 33 | `ONESTORE_NESTED_TABLE_EXPORT` set to new absolute directories while running |
| 34 | the tests, then cold-open them with `tools/native_runner.py OUTPUT COLD |
| 35 | --expected-pages 1|12 --collect-notebook`. |