Skip to content

Commit 2971e16

Browse files
committed
v4.5.1
Signed-off-by: Andrew Stein <steinlink@gmail.com>
1 parent 62e5023 commit 2971e16

50 files changed

Lines changed: 142 additions & 71 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# [v4.5.1](https://github.com/perspective-dev/perspective/releases/tag/v4.5.1)
2+
3+
_26 May 2026_ ([Full changelog](https://github.com/finos/perspective/compare/v4.5.0...v4.5.1))
4+
5+
Features
6+
7+
- Add `gmv` aggregate [#3180](https://github.com/finos/perspective/pull/3180)
8+
9+
Fixes
10+
11+
- Fix chart bugs, add deploy scripts [#3181](https://github.com/finos/perspective/pull/3181)
12+
113
# [v4.5.0](https://github.com/perspective-dev/perspective/releases/tag/v4.5.0)
214

315
_21 May 2026_ ([Full changelog](https://github.com/finos/perspective/compare/v4.4.1...v4.5.0))
@@ -11,6 +23,7 @@ Features
1123

1224
- Add `coalesce` [#3172](https://github.com/finos/perspective/pull/3172)
1325
- Multi-chart rendering for `@perspective-dev/charts` [#3168](https://github.com/finos/perspective/pull/3168)
26+
- Add WebGL chart plugin with scatter, line, and treemap [#3160](https://github.com/finos/perspective/pull/3160)
1427
- Add `View::with_typed_arrays` API [#3165](https://github.com/finos/perspective/pull/3165)
1528

1629
Fixes
@@ -23,7 +36,6 @@ Fixes
2336
Misc
2437

2538
- Update security docs [#3173](https://github.com/finos/perspective/pull/3173)
26-
- Add WebGL chart plugin with scatter, line, and treemap [#3160](https://github.com/finos/perspective/pull/3160)
2739

2840
# [v4.4.1](https://github.com/perspective-dev/perspective/releases/tag/v4.4.1)
2941

@@ -73,9 +85,9 @@ _10 March 2026_ ([Full changelog](https://github.com/finos/perspective/compare/v
7385

7486
Features
7587

88+
- Support for `group_rollup_mode` Virtual Server and `total` variant. [#3135](https://github.com/finos/perspective/pull/3135)
7689
- `polars` Virtual Server [#3125](https://github.com/finos/perspective/pull/3125)
7790
- Fix `split_by` support for rollups in generic SQL [#3127](https://github.com/finos/perspective/pull/3127)
78-
- Support for `group_rollup_mode` Virtual Server and `total` variant. [#3135](https://github.com/finos/perspective/pull/3135)
7991

8092
Fixes
8193

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PR.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Fix `columns_config` / `plugin_config` round-trip + docs deploy script
2+
3+
Two commits on `deploy-docs`:
4+
5+
1. **`595cdbc4e` Add docs deploy script** — new `docs/deploy.mjs` + `docs/package.json` `deploy` npm script.
6+
2. **`f807677d4` Fix `columns_config` and `plugin_config` bugs** — omnibus fix across the Rust renderer task graph and the WebGL viewer-charts plugin, plus regression tests.
7+
8+
> ⚠️ `viewer.rs` ships two `tracing::error!("WIP!");` lines around the settings-panel resize callbacks ([viewer.rs:548-564](rust/perspective-viewer/src/rust/components/viewer.rs#L548-L564)). Looks like debugging leftover — should be removed before merge.
9+
10+
## Summary
11+
12+
### `columns_config` round-trip fixes (Rust)
13+
14+
- `Renderer::all_columns_configs_materialized` is now **async** ([renderer.rs:243](rust/perspective-viewer/src/rust/renderer.rs#L243)). It does a two-pass warm: pass 1 scans the schema for any `include: true` Number key missing from its entry with no cached stats, pass 2 `join_all`s `resolve_abs_max` for that set, then materializes against the warm cache. Without this, gradient defaults fell back to `0` on cold cache.
15+
- Strip-on-write now drops keys not in `schema.active_keys()` before stripping default values ([renderer.rs:406-407](rust/perspective-viewer/src/rust/renderer.rs#L406-L407), [renderer.rs:614-615](rust/perspective-viewer/src/rust/renderer.rs#L614-L615)) — prevents stale keys from a previous mode (e.g. `fg_gradient` after switching off `number_fg_mode = "bar"`) from leaking back into the persisted config.
16+
- `restore_and_render` reordered: validate + `create_view` now happens **before** applying `columns_config` / `plugin_config` updates ([restore_and_render.rs:89-101](rust/perspective-viewer/src/rust/tasks/restore_and_render.rs#L89-L101)). Previously the strip ran against a stale `view_schema`, silently dropping any `columns_config` entry keyed by a newly-introduced expression column.
17+
- `update_and_render`, `send_column_config`, `send_plugin_config` all updated to `.await` the async materialize ([update_and_render.rs:81-86](rust/perspective-viewer/src/rust/tasks/update_and_render.rs#L81-L86), [send_column_config.rs:41-43](rust/perspective-viewer/src/rust/tasks/send_column_config.rs#L41-L43), [send_plugin_config.rs:39-41](rust/perspective-viewer/src/rust/tasks/send_plugin_config.rs#L39-L41)).
18+
19+
### `plugin_config` blank-canvas bug (TypeScript)
20+
21+
Bug chain (all three needed to repro):
22+
1. `RendererTransport.saveZoom` was `async` but never returned its pending-reply promise → every caller got `Promise<undefined>`.
23+
2. `plugin.save()` called it without `await` and stored the bare `Promise` as `state.zoom`. `JSON.stringify` collapses any Promise to `{}`.
24+
3. A later `plugin.restore(token)` with `token.zoom === {}` reached `ZoomController.restore({})`, which assigned `undefined` to every internal field → NaN projection matrix → blank canvas.
25+
26+
Fix: the override `save()` on `HTMLPerspectiveViewerWebGLPluginElement` is **removed** ([plugin.ts:511-532](packages/viewer-charts/src/ts/plugin/plugin.ts) deletion). New regression test in [plugin-config-toggle.spec.ts](packages/viewer-charts/test/ts/plugin-config-toggle.spec.ts) toggles `series_zoom_mode` and asserts the plot never goes blank.
27+
28+
### Datetime-axis dynamic-zoom refit
29+
30+
New snapshot tests in [zoom.spec.ts](packages/viewer-charts/test/ts/snapshot/zoom.spec.ts#L82-L137) covering Y Line / Y Bar wheel-zoom on a datetime `group_by` for both `dynamic` and `fixed` `series_zoom_mode` — guards the catIdx remapping path that previously made `dynamic` look identical to `fixed` on datetime axes.
31+
32+
### Misc viewer-charts cleanup
33+
34+
- `fieldSpec` refactored from a 170-line switch to a static `FIELD_SCHEMAS` record + per-call default lookup ([plugin.ts](packages/viewer-charts/src/ts/plugin/plugin.ts)).
35+
- `ZoomController.setBaseDomain` now handles X and Y independently and adds opt-in `pinAxis` / `unpinAxis` flags ([zoom-controller.ts:170-243](packages/viewer-charts/src/ts/interaction/zoom-controller.ts#L170-L243)) — default "follow" semantics, pinning reserved for future paused-frame review.
36+
- `ZoomRouter` class deleted; `applyWheel` / `applyPan` are the public entrypoints now ([zoom-router.ts](packages/viewer-charts/src/ts/interaction/zoom-router.ts)).
37+
- New `expandDomainInPlace` helper extracted ([expand-domain.ts](packages/viewer-charts/src/ts/charts/common/expand-domain.ts)).
38+
- `MessageHostSink` envelope shape unified with the worker-side `WorkerMsg` types so there's no intermediate translation ([host-sink-message.ts](packages/viewer-charts/src/ts/interaction/host-sink-message.ts)).
39+
- `chart-base.ts` axis formatter gated behind a `REGRESSION_BEHAVIOR = true` flag with a TODO documenting the tradeoff vs. datagrid-consistent formatting.
40+
41+
### Datagrid tests
42+
43+
- `Pulse styling works` + `... when settings panel is open` marked `test.skip` ([column_style.spec.js:142,175](packages/viewer-datagrid/test/js/column_style.spec.js#L142)).
44+
- New `label-bar` snapshot tests for both static and expression columns ([column_style.spec.js:229-285](packages/viewer-datagrid/test/js/column_style.spec.js#L229)).
45+
46+
### Tooling
47+
48+
- `tools/scripts/publish.mjs`: replace `zx` `$.sync` / `await $` with `execSync` + inherited stdio for `twine`, `npm publish`, and `cargo publish` calls — gets live output through.
49+
- `tools/test/src/js/utils.ts`: drop the width/height/min-/max- regex normalization in `compareContentsToSnapshot` (kept only `style=""`).
50+
- `viewer-charts` version bump `4.3.0``4.5.0`.
51+
52+
## Test plan
53+
54+
- [ ] `pnpm run test` (root) — full suite, especially the new `plugin-config-toggle` and datetime-zoom specs
55+
- [ ] Confirm Datagrid `columns_config` round-trip with `fg_gradient` cold-cache scenario produces a real default (not `0`)
56+
- [ ] Confirm `columns_config` entry keyed by an expression column survives `restore_and_render`
57+
- [ ] Toggle `series_zoom_mode` on a Y Line with datetime group_by — canvas stays painted
58+
- [ ] Remove the `WIP!` `tracing::error!` lines in `viewer.rs` before merge
59+
- [ ] `docs/deploy.mjs` produces a clean `dist-gh-pages` worktree on a fresh checkout

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@perspective-dev/docs",
3-
"version": "4.5.0",
3+
"version": "4.5.1",
44
"private": true,
55
"type": "module",
66
"scripts": {

examples/blocks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "blocks",
33
"private": true,
4-
"version": "4.5.0",
4+
"version": "4.5.1",
55
"description": "A collection of simple client-side Perspective examples for `http://bl.ocks.org`.",
66
"scripts": {
77
"start": "mkdir -p dist && node --experimental-modules server.mjs",

examples/blocks/src/dataset/layout.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"viewers": {
3535
"PERSPECTIVE_GENERATED_ID_0": {
36-
"version": "4.5.0",
36+
"version": "4.5.1",
3737
"plugin": "Datagrid",
3838
"plugin_config": {
3939
"columns": {},
@@ -64,7 +64,7 @@
6464
"settings": false
6565
},
6666
"PERSPECTIVE_GENERATED_ID_1": {
67-
"version": "4.5.0",
67+
"version": "4.5.1",
6868
"plugin": "Y Area",
6969
"plugin_config": {},
7070
"columns_config": {},
@@ -82,7 +82,7 @@
8282
"aggregates": {}
8383
},
8484
"PERSPECTIVE_GENERATED_ID_2": {
85-
"version": "4.5.0",
85+
"version": "4.5.1",
8686
"plugin": "Y Line",
8787
"plugin_config": {},
8888
"columns_config": {},

examples/blocks/src/market/layouts.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"aggregates": { "bucket(\"timestamp\", 'm')": "dominant" }
9898
},
9999
{
100-
"version": "4.5.0",
100+
"version": "4.5.1",
101101
"columns_config": {
102102
"Diff from market open": {
103103
"number_fg_mode": "bar",
@@ -140,7 +140,7 @@
140140
"aggregates": {}
141141
},
142142
{
143-
"version": "4.5.0",
143+
"version": "4.5.1",
144144
"columns_config": {
145145
"if(\"side\"=='buy'){-1}else{1}": {
146146
"aggregate_depth": 1,

examples/esbuild-clickhouse-virtual/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "esbuild-clickhouse-virtual",
33
"private": true,
4-
"version": "4.5.0",
4+
"version": "4.5.1",
55
"type": "module",
66
"description": "Example of a custom VirtualServer for ClickHouse running in a Web Worker",
77
"scripts": {

examples/esbuild-duckdb-virtual/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "esbuild-duckdb-virtual",
33
"private": true,
4-
"version": "4.5.0",
4+
"version": "4.5.1",
55
"type": "module",
66
"description": "Example of a custom VirtualServer running in a Web Worker",
77
"scripts": {

examples/esbuild-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "esbuild-example",
33
"private": true,
4-
"version": "4.5.0",
4+
"version": "4.5.1",
55
"description": "An esbuild example app built using `@perspective-dev/viewer`.",
66
"scripts": {
77
"build": "node build.js",

0 commit comments

Comments
 (0)