Skip to content

0.8.0

Choose a tag to compare

@casoon casoon released this 30 Sep 17:45
· 50 commits to main since this release
f86cce9

Screen-reader pairings tested: none yet (issue #5).
Browsers: Chromium (the whole e2e suite, 1047 passed) and WebKit (Playwright's, not Safari:
516 passed, 10 skipped). Firefox: not run.

The pivot on the grid's level: titles and formats, a view and events, sorting, folding, choosing
the fields and filtering — each from the keyboard, each part of the view.

What breaks:

  • <opengrid-pivot>'s row-dimension headers — and its measure headers without a column
    dimension — hold a sort button now, and a group's subtotal header a fold button; the direction
    and fold marks are aria-hidden text beside the names. A page that read a header's
    textContent reads the mark too; read the button's first span, or what a reader hears.
  • Rust: PivotQuery and ValidatedPivotQuery have new fields (sort; orders, sort), so a
    struct literal needs them. The JSON form is unchanged for a pivot without sort.

Module sizes (brotli, just measure-modules): the elements 206.2 → 224.0 KiB, the engine
115.2 → 118.8 KiB; both bounds raised with their reasons in scripts/module-budget.txt.

Added

  • Titles and formats in <opengrid-pivot> (#104).
    set_columns gives a row dimension or a measure its title, and set_formats formats
    dimension values in the headers and measure cells, by field name or measure alias — as at the
    grid and the table. NULL and the empty string keep their words in a header. Any option but
    title is reported in the status line. get_pivot still exports raw names and values.
  • A view and events for <opengrid-pivot> (#106).
    get_view/set_view read and write { rows, columns, values } — the three attributes as one
    value, set in one query — and opengrid-view-change reports every change of them.
    opengrid-query now fires after every pivot answer too. OpengridPivot's view,
    defaultView and onViewChange are typed PivotView in React, Vue and Svelte;
    get_view<PivotView>(pivot) in TypeScript. ViewChangeDetail and Connection take a type
    parameter whose default is the grid's, so existing code compiles unchanged.
  • Sorting in <opengrid-pivot> (#108).
    Each level is ordered by its own values or by a measure over the whole row, ascending or
    descending; subtotals stay after their group (new rule P9, with conformance cases on the local
    engine, WebAssembly, PostgreSQL and the export). The pivot query takes sort: [{ field, by?, direction }] — sent only when there is one — and the element a sort attribute
    that is part of its view. Row-dimension headers, and measure headers without a column
    dimension, are sort buttons with aria-sort. On PostgreSQL a sorted pivot runs one query per
    level instead of one GROUPING SETS statement.
  • Folding groups in <opengrid-pivot> (#110).
    With two row dimensions or more, a group's subtotal row header is a button with
    aria-expanded that folds the group's rows away and opens them again, without a new query.
    The status line says it (groupCollapsed / groupExpanded); the folded groups are a
    collapsed attribute, part of the view. New parts group-toggle and group-mark.
  • Choosing the fields of <opengrid-pivot> (#112).
    With the toolbar attribute the reader chooses rows, the column and measures: per axis a
    group of chips — move earlier/later, remove — and an add menu ("+ Row", "+ Column",
    "+ Measure") offering what the page offers in the new fields and measures attributes. No
    dragging; the menu has the grid's keyboard. Each change is one view, one query. New parts
    field-group, add-field, field-menu, chip-move, and twelve text keys (pivotToolbar,
    addRow, fieldRemove, …).
  • Filtering <opengrid-pivot> (#114).
    A filter attribute takes the wire's filter JSON and is part of the view; the filter acts on
    the raw rows, before the pivot. With toolbar the reader gets a "Filters" group: a field for an
    expression in the grid's language (country = DE and qty ≥ 3) and a removable chip per clause,
    plus "Remove all". The types come from a pivot the provider already answers (the pivot has no
    schema of its own). Three new text keys: pivotFilters, pivotFilterLabel, pivotFilterHint.