mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-25 15:17:23 +00:00
Notify HeyPuter / notify (push) Canceled after 0s
Backend Tests / changes (push) Canceled after 0s
Backend Tests / typecheck (push) Canceled after 0s
Backend Tests / test shard 1/4 (push) Canceled after 0s
Backend Tests / test shard 2/4 (push) Canceled after 0s
Backend Tests / test shard 3/4 (push) Canceled after 0s
Backend Tests / test shard 4/4 (push) Canceled after 0s
Backend Tests / test (main) (push) Canceled after 0s
Backend Tests / coverage (push) Canceled after 0s
Benchmarks / changes (push) Canceled after 0s
Benchmarks / bench shard 1/3 (push) Canceled after 0s
Benchmarks / bench shard 2/3 (push) Canceled after 0s
Benchmarks / bench shard 3/3 (push) Canceled after 0s
Benchmarks / benchmarks (push) Canceled after 0s
* feat(thumbnails): JSON and CSV files get a thumbnail
The desktop draws the start of a .json file like other source code, in a
fixed-width font with keys, strings, numbers and comments colored. A JSON
file whose first line holds a comma, as minified JSON does, is laid out
first one member or element to a line. That layout stops after 64 lines
and indents no deeper than 16 levels, so a file of nothing but brackets
costs no more than any other.
A .csv file is drawn as a spreadsheet opens it, through the sheet drawer
the XLSX reader uses: gridlines, default-sized cells, numbers aligned
right and other text left. Quoted fields follow RFC 4180, and the
delimiter is whichever of comma, semicolon, tab or bar the first line
holds the most of. Cell text is drawn as text; nothing is evaluated.
Both read only the first 16 KiB and share the 2-second upload queue the
other text files use. The dashboard downloads only that much when it
makes a thumbnail for one that has none.
* fix(thumbnails): a quote inside a CSV header field no longer hides its delimiter
Delimiter detection opened a quote at any double quote, while the parser
opens one only at the start of a field. A header such as `Size 5";Length`
then counted no semicolons and the whole file was drawn in one column.
* fix(thumbnails): CSV dates, times, money and grouped numbers align right
A spreadsheet reads these as numbers and aligns them right, as the XLSX
thumbnail does for the same data, but the CSV thumbnail drew them as left-
aligned text.
* fix(thumbnails): a CSV's sep= line sets its delimiter and isn't drawn
Exporters write a first line such as sep=; so Excel splits the file the
same way in every locale. Excel uses it and hides it; the thumbnail drew
it as a row of its own.
* fix(thumbnails): JSON layout keeps block comments apart from their neighbors
A block comment that started a line, such as a copyright header, had the
next token appended to it (`/* ... */{`), and one inside a line touched the
value after it.
* fix(thumbnails): a CSV number too wide for its cell keeps its leading digits
A right-aligned value wider than its column was clipped on the left, so an
ISO date drew as 24-01-15 and 1,234,567.89 as 34,567.89. Numbers in a CSV
sheet that don't fit their cell are drawn from the side the sheet starts at
and still cut off at their cell, as numbers don't run on.
* fix(thumbnails): text that isn't UTF-8 is read in the Windows code page
Excel on Windows saves a CSV in Windows-1252 by default, and accented
letters drew as replacement characters (Caf�). Text that isn't valid UTF-8
is now decoded as Windows-1252. A UTF-8 character cut in two by the read
limit is left out instead of making the whole read fall back.
* docs(thumbnails): describe CSV dates, sep= lines and Windows-1252 text