Table Editor
PROJECT LOG
# 2026_0729
Replaces two other tools with this tool which supersedes them:
  Stow (Large table editor) + Table Editor (Formula editor)
Makes table name a content editable caption (for easy renaming)
Fixes backspace to clear values of normal cells in a selection
Improves cell right click behaviour:
  If cell lands in a multi-cell selection, show selection menu
  For an inactive cell, show cell specific menu
  For an editing cell, show default menu
Updates paste intercept
Improves CSV TSV editor

# 2026_0728
Improves Share Save As Dialog
Improves 'Click to edit cell'
  inserts caret at click position
  (shows: 75.23%, user clicks: 7|5.23%, caret: 0.7|523%)
Improves click and drag over cells
  Drag within 1 cell = starts selecting text
  Drag beyond 1 cell = swaps to selecting cells
  Drag to original cell = restore select text mode + selection
Improves cell navigation via keyboard arrow and tab keys
  hops between cells and rows and places caret near previous
Refactors codebase
Allows custom-naming non-table document parts

# 2026_0727
Squashes "Redo" bug which corrupted table
Improves Column and Shared Sum Context Menu
  Radio for action type, then relevant sub options reveal
Improves undo redo machine to be purer
Tests tool with a 50k cell file
Improve Column Type value treatment
  Coerces value to a column's set type where it can losslessly
  Processes values against column types on load, edit, and save
Improves HTML table support to extract, edit, restore and save:
  any table caption element text (uses as table name in tool)
  data within the opening table tag e.g. style, class, id.
Documents referencing one shared sum answer in another.
Rearranges app areas / sections
Updates app settings (font choice lists all browser defaults)
Changes concept
  Only shared sums and total sums hold formulas
  A column either holds data (normal columns) or formulas
  Normal cells
    present data when inactive (e.g. commas, N decimal places)
    show and edit raw value inline with a single click
    commits value and ends edit mode on enter key or click away
  Formula cells
    present answers
    enter edit mode in a dialog popover on click
    editor inserts a newline on enter key (for readable JS)
  removes concept of `=` prefix making a normal cell a formula
  Stops requirement for `=` in formula type columns
  (Removes keywords above below for SUM(above/below))

# 2026_0726
Combines save as and share / export to one dialog
  Improves messages
Improves how a document stores a column's type
  When live the tool has many settings (commas, decimal places)
  On save it stores the settings as a representative string
  (e.g. "$10.00" means Number, Prefix $, 2 decimal places)
Removes the hover cell border to insert column or row
  Remaining methods:
    right click row or column for menu
    alt + arrow in direction to add row or column from a cell

# 2026_0725
Fixes bugs
Rewrites and separates to self contained file
  undo redo stack function 
  paginator function
Removes transpose feature (which suits simpler tables more)
Adds table converter parser to work with files containing tables
  (Markdown with table inside, HTML with table inside)
Incorporating save JSON with 1 record/row per line

# 2026_0724
adds dialog to explain column 'types' (any, string, bool, num)
extends table columns to fit table on clipboard
  (a change to work again, with new 'shared sums' columns)
updates and unifies keyboard shortcut listeners logic
  (paste table, copy cell as value or cells as table etc)
integrates: show if column contains > row contains > pagination
  (vs only one working at a time)
fixes multi cell selection methods: drag, cmd click, shift click
  shows stats of all selected cells
  (had to re-write to account for `shared sum` columns)
writes row index into column 0 (instead of CSS showing row N)
  (so formulas make sense when search shows a subset of rows)
updates formulas to reflect JavaScript more than Excel
  r.column_name or column_name[row_index] instead of A1 B2
  (for clarity when reading formula on its own)
  (saves updating all references if column moves)
highlights referenced cells during formula edit
  (reinstates behaviour lost in re-write)
Documents cell formula possibilities in popover
Adds share option 'filtered rows' only
Adds context menu to cells
  copy stored value (formula)
  copy formula result
  flatten formula result
  clear cell
Improves copy record (action available via right click row #)
  now include shared sum column values
Reworks to a CSS-Free layout (beginning)

# 2026_0723
adds custom dialogs for prompt, confirm, and alert
removes ability for cell to hold array or object
  cells may hold string number boolean null
  (formulas store as strings and show result per column type)
implements 'shared sums' columns to apply one sum to each rows:
  if(data cols = [price, qty])
  a table can have a shared sum column 'total' = price * qty
  where all cells in a column share and edit one formula

# 2026_0722
adds JSON based document format for 1 or more tables per file
merges in from an earlier project
  JSON based table format (vs simple array of arrays)
  Maximum rows per 'page' and pagination
  per column search
  table column types via form vs short-code
refactors 

# 2026_0410
Rewrites logic as required after decoupling frontend and backend
Rewrites logic to perform row col actions without rebuilding DOM

# 2026_0408
allows selecting range of row or col handles with shift click
adds: delete N rows / N columns to context menu when >1 selected
guesses header count on load file or paste in from top left cell
  if(table has > 2 rows & row 2 is type row){2 header rows)
  else if(table rows>1&all row 1 values are strings)1 header row
  else if{table row[0] value types not all strings)0 headers rows
saves JSON in 1 line per table row presentation
treats click events normally within currently editable cell
  e.g. double clicking text behaves as expected (selects text)
  (vs. triggering actions not relevant to cell in edit mode)
adds 'saved state status':
  unchanged on load
  unsaved on change
  "saving..." on request save
  "saved" on successful save
fixes paste error when inserting into table
displays active file name or untitled in a bar of its own
adds tbody rows records filter (doesn't hide thead tfoot rows)
  if query matches 0 records, shows all & notifies
  if query matches 1+ record, hides mismatches else hides none
  runs on enter key or button click
  shows matching rows until user clears or changes the search
    (or user deletes the row containing the match)
  doesn't re-run search when after edits matching rows:
    (so if the edit causes a mis-match the row stays visible)
refactors to decouple backend from DOM:
  adds DataStore and bidirectional lookup to DOM elements
    keeps front and back in sync
  avoids rebuild whole table whenever possible
    makes smaller changes when possible
    adds createCell(), createRow(), initDataStore()
adds direct DOM update functions for row col move add delete
uses CSS counters for row numbers and column letters (vs. JS)
  removes hardcoded textContent from row/col handles
improves table filter:
  shows results count (e.g. "3/10")
  shows all if all or none match search query
  shows a "Show all" button only when showing a subset
alerts if user deletes all rows matching search
auto-clears messages after n seconds
tweaks functions to work while use has an active search:
  add/move/delete row or column doesn't re-run search
  shows newly added rows even though they don't match
  continues showing row after edits the matching cell
  deleted rows updates the visible count

2026_0406
refactors lightly: all css in one place (begins nesting)
moves items into popovers and menus
styles some cell differently based on their types
adds dynamic click interaction:
  click 1 activates X
  click 2 shows its menu
  click 3 hides its menu
  (e.g. show table tab -> show table menu)
links tool to log

2026_0405
adds table footer option
makes tfoot sticky and scrolls tbody when table height > screen
makes selected cells draggable
  drag to move values to target cells
  drag + alt to copy values to dropped location
adds cell value types: true, false, object {a:1,b:2}, array [1]
adds change font size buttons
adds median and mode formula functions
lets formula fns take the keywords 'above' or 'below'
  e.g. =sum(above) works on every record / body cell above
makes popover for new table options:
  custom size: N cols by N rows
  demo table: showing tool features
adds info popover for basic info about the app
refactors 'packaging' pipeline in a functional style
  e.g. live data->prepare per settings->to wanted type->action
  actions (copy, export, save)
refactors jaa_to[output_type] functions
fixes sums that use keyword `above` or `below`
  only reference body cells (record values) not head / foot data
sorting sorts tbody rows not header or footer rows
converts `null` cell value type to null keyword in JSON
adds logic allowing row 2, after header row, to act as types row
  to set expected data types for values in that column
  each cell can have one of the following values in parentheses
  TYPE     ABBREVIATION   SYMBOL
  number   num            0
  boolean  bool           ?
  string   str            "  ""  ''  '
  object                  {}
  array                   ,  []
  any                     *
  e.g. (number) or (num) or (0)
sets formatting of column cells based on type cell value:
  0 = any number
  0. or 0.0 = 1 decimal place (dp)
  0.00 2dp
  currency
  $ prefix with dollar
  £ prefix with pound
  other
  % suffix with percent
adds class to negative number cells, for styling
coerces submitted value to wanted type if any when possible. EG:
  Number col type turns `7` into 7
  String col type keeps `7` as 7
changes value type of col cells when user changes col type
  providing it loses no data present in the current value
  e.g. changing string cell to number would change `7` to 7
displays cells in boolean columns as checkboxes
  if true: checked, if false: unchecked
  if cell value is null or blank: show indeterminate
  if anything else: show current value, mark as unexpected_type
  user can change value via checkbox click
  user can edit cell normally by clicking area around checkbox
adds new features to demo table
refactors backend of 'click cell border to add a column or row'
  1 x and 1 y element, which move to mouse position (vs many)

2026_0404
adds formulas (sums, cell references, range references)
  starts formula cells with `=`
  uses JavaScript for formula values
  prepares some default functions for user to call: SUM MAX MIN
adds custom reduce for formulas to call
  (works like JS reduce method to loop through body record rows)
displays answer of formula in formula cell when not editing
adds formula editor area so formula cell doesn't resize on edit
changes tool to have two modes 'select' and 'edit'
improves selected cell copy and paste
adds share sheet with options:
  range: selected cell(s), table
  types: tsv, csv, json
  flatten formulas: copy the answers OR the sum
  action: copy, export (download)
adds button to flatten all formulas in main table
  (convert from formula to answer of formula)
adds popover to explain use of formula fns: SUM, reduce etc.
allows selecting multiple columns or rows, then moving multiple
trims cell values on apply '  hello  ' -> 'hello'
updates references in formulas when cell positions change
  (on table add/delete/move col/row shifting position)
limits clickable elements when in formula editor:
  cells for reference selection
  elements within formula editor
cancels formula editor with escape key (or button)
commits edited formula with cmd enter key (or button)
changes 'add row or column' trigger to double click divider line
  (vs. single click. to prevent accidental trigger)
clears undo redo stack when file changes (new/close/save as)
shows drag info when user drags rows / columns
swaps formula editor to a textarea for multi-line JS functions
updates demo table to show current features
highlights referenced cells of a selected formula cell
commits changes (ends edit mode) on cmd_enter
transpose table updates cell references in formulas
adds box select: select a cell then shift click another
  selects all boxes between

2026_0401 initial version
implements initial table editor
keeps a JSON array of arrays in sync with edits to table data
  and vice versa
adds keyboard nav
  changes cell selection with arrow keys
  makes elements focusable for tab key navigation
adds right click menus to row numbers and column letters
cycles selection through cell content -> row -> table with CMD+A
adds: move, add, delete, duplicate column or rows options
intercepts paste
  parses (basic) csv tsv json on clipboard
  pastes cells / grid of cells into table
offers to copy selected cell(s) as tsv, csv, or json
adds copy row as a record option ({col_header:row_value,...})
adds transpose table option (to flip cols and rows data)
adds trim option (to delete empty end rows and cols)
loads JSON files to editable table
shows name of loaded files 
downloads table as JSON
adds undo redo history stack
allows custom number of header rows: 0+
adds sort records / rows by a column's values A-Z or Z-Z
selects multiple cells with click and drag
  `cmd c` copies multi selection as a table
  `delete key` clears values of cells selected
moves rows or columns when user drags their letter number handle
inserts row or column on clicking cell borders
selects entire table by clicking table's top left corner
highlights rows containing active cells
© 2026 Greg Abbott