Repository navigation
0.6.0
Screen-reader pairings tested: none yet — the VoiceOver pass is prepared and not yet run
(issue #5). Browsers: Chromium, the whole
e2e suite. WebKit (Playwright's, not Safari): the whole suite; its one failure, the plain-DOM
stand-in counting a second table, is fixed in this release (#93). Firefox: not run:
Playwright's Firefox does not start on the release machine.
What breaks (details in the entries below):
- the pivot's
headerpart moved from its<thead>to each column header cell (#29); - in the Rust crates, the opengrid types no longer implement
serde— read and write them
withopengrid_json(#41). The npm package's JavaScript API is unchanged apart from
additions.
Module sizes (brotli, just measure-modules): the elements 215.8 → 204.1 KiB, the engine
124.9 → 115.2 KiB — serde left both modules (#41), and the engine now answers pivots (#28).
Added
- Data without JavaScript (#84). A page
can write its data as a plain<table>inside an element. Without script, that's what
readers and crawlers see; once the element has rendered, its shadow root replaces it, so
nothing is read twice. When the module can't load, the plain-DOM stand-in now shows the
page's table (through a<slot>) instead of hiding it behind an empty skeleton. The
skeleton only shows when there is no table of its own. - The pivot in the browser (#28).
createLocalProviderandcreateWorkerProvideranswer<opengrid-pivot>: the engine runs
the pivot's grouping sets over the data the page loaded, with the server's limits
(Engine.pivot,Engine.pivot_columns, apivotmessage in the worker). The element calls
a provider's new optionalpivot(json)and falls back toexecute, so providers of a page's
own keep working;createPivotProviderhaspivottoo.examples/pivot-demo/browser.html
shows it without a server. - XLSX export on the server (#72).
POST /export/{source}?format=xlsxwrites an Excel workbook, andexportRows(rest, query, { format: "xlsx" })asks for it throughcreateRestProvider— with any other provider it is
aTypeError. Values are Excel types where Excel holds them exactly (numbers, dates,
date-times in UTC, booleans) and text where it cannot (integers past 2⁵³, decimals past 15
digits, sub-millisecond timestamps), so no value changes; Excel's row and cell limits are
errors, never a shortened file. New server-side dependency:rust_xlsxwriter, behind the
featurexlsxofopengrid-export, so the browser modules do not carry it. <opengrid-table>and<opengrid-pivot>can be styled, and the table takes formats
(#29). Both render into a shadow root, so
no page rule reached their cells. They now carry parts named like the grid's —table,
caption,header,row,cell, the table'ssort-button, the pivot'srow-headerand
total-row— andexamples/pivot-demoandexamples/table-demostyle them through
::part. The table shows its values as the grid does:formatsapply to its cells, and
presentation(set_columns) gives a column itstitle,align,mono,emphasisand
muted; the grid'swidth,aggregateandfacetare refused for a table with an alert
rather than ignored. A number is right-aligned by its type, as in the grid.
What breaks: the pivot'sheaderpart was on its<thead>; it is now on each column
header cell, like the grid's.
Changed
-
One JSON codec for browser and server, and no
serdein the browser
(#41).opengrid-jsonreads and writes
every JSON form — query, schema, view, texts, errors, the JSON result — on both sides,
so the two cannot read the same bytes two ways.serdeandserde_jsonare gone from
both browser modules. Against 0.5.0, with everything else in this release (just measure-modules, brotli): the elements 215.8 → 204.1 KiB, the engine 124.9 → 115.2 KiB,
although the engine now answers pivots too. What is read and refused is whatserde_jsonread
and refused (checked against it as an oracle); what is written is what it wrote, keys
aside — an object now keeps the order it is written in instead of sorting its keys —
and one rare case: where a float has two shortest spellings, the one closer to the
value is written. Both read back to the same number.What breaks (Rust crates only; the npm package and its JavaScript API are
unchanged): the opengrid types no longer implementserde::Serialize/Deserialize.
Read and write them withopengrid_json(from_str,to_string,FromJson,ToJson);
Value::deserialize_typedisValue::from_json_typed, and a filter literal is an
opengrid_json::Json.
Fixed
<opengrid-table>says it is loading (#86).
Until its first answer it was a table with a caption and no rows, which a screen reader
couldn't tell from an empty one. The waiting table now carriesaria-busy="true", and
the table with its answer doesn't.
npm: npm install @casoon/opengrid@0.6.0 · Live demos: https://og-vanilla.casoon.dev