Repository navigation
feat(pivot): Rest export inputs, migration guide and pivotkit's zone tokens - #242
Merged
Merged
Conversation
…rams answer
pivotkit-server answers params where no source takes any with
NO_PARAMS_TEXT ("this server has no source that takes params"). The
hint matched only the older "no key \"params\"", so the new answer
got none. A test covers both texts.
Refs #132
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s and -FlatHeader pivotkit-server 0.3.0's render routes take locale, numbers and flatHeader. The REST engine refused all three; it now writes them into the body when they are given, so both engines write the same CSV and JSON. Without them nothing is sent, so older servers still render; their answer to the new keys names the version they need. -TimeZone stays with -Engine Node: the server has no such input. Refs #135 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntrols The bridge maps pivotkit's zone tokens (--pk-zone-rows, -columns, -values, -filters, -tint, -tint-base), --pk-control-icon, --pk-sort-arrow, --pk-field-hover and --pk-chart-reference, each with a --psu-pivot-* property per light and dark mode. Without an app's value they keep pivotkit's colours (repeated as --psu-default-zone-*) or its derivation. The field type icons follow pivotkit's new neutral default, the muted text; --psu-pivot-type-* still sets them. The themes page lists every new property; a unit test checks the mapping and the zone colours' contrast on PSU's surfaces, a live spec reads the tokens per PSU mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the new options in the first The version hints for -Data, -Parameter and -Locale/-Numbers/-FlatHeader share one helper instead of a copied answer, call and catch per case. The check that a call without -Locale, -Numbers and -FlatHeader sends none of them moves into the first REST test, which makes that call already. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pivot overview maps every parameter of New-UDPivot to New-UDPivotReport: the start view moves into -View, each aggregator and renderer name has its pivotkit counterpart or is named as having none. One report on the same rows, before and after; the module README links the section. Refs #121 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…not a version A current pivotkit-server answers -Parameter with "this server has no source that takes params" when none of its sources declares parameters. That server is new enough, so the hint now says to leave -Parameter out or use a source that declares them (Get-UDPivotSource lists them). The older "no key \"params\"" keeps the 0.2.0 hint. The test asserts each text's hint and that the new one names no version; that assertion is the one code line the baseline takes in. Refs #132 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pivotkit minimum - The property table moves from the themes page (200 lines, its limit) to docs/pivot/theme-properties.md, listed under Pivot > Reference. Its intro says that the rows from --psu-pivot-zone-rows to --psu-pivot-field-hover take effect with pivotkit 0.11.0 or later; the chart reference already works with 0.10. - The themes page and the CHANGELOG show how to get the coloured type icons back: set the four --psu-pivot-type-* properties per mode. - The --psu-pivot-radius-sm row says that 4px is PSU's own corner and what it covers: buttons, chips, the field list and its hover, a field's name in the table, and pivotkit's smaller corners derived from it. - The CHANGELOG's #135 entry says "with the same -Locale and server settings". - The docs test and the browser spec read the rows from the new page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The section moves from the pivot overview to
docs/pivot/coming-from-ud-pivot.md, listed under Pivot > Start. The
overview's "You want | Where" row and the module README link the page.
- The page states the requirements: PowerShell 7.4 or later (the old module
also ran on Windows PowerShell 5.1) and PSU 2026.2 or 2026.3, as
Compatibility lists them.
- The aggregators and renderers get one row per group instead of one long
cell each; -Data says "also a DataTable", and the stacked charts read
chart = @{ type = 'bar'; stacked = $true }.
- reports.md and the CHANGELOG say that both engines write the same file with
the same -Locale and server settings.
- New-UDPivotRenderBody's help description is wrapped.
Refs #121
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge's pages The baseline had 5202 lines; this change adds 111 (measured page by page against the base commit): the new pages coming-from-ud-pivot.md (89) and theme-properties.md (79), the "Coming from" row and two report lines on the overview and reports.md (+3), and the README link (+1), less the 61 lines the property table took out of themes.md. 5202 + 111 = 5313. The 2 lines main already had over its baseline stay outside it; the measured total is 5315. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ype colours Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four changes to the pivot module, part of the work for pivotkit 0.11.0. The pinned pivotkit versions stay as they are.
Invoke-UDPivotReport -Engine Resttakes-Locale,-Numbersand-FlatHeaderand sends them to pivotkit-server aslocale,numbersandflatHeader. With the same-Localeand server settings, both engines now write the same CSV and JSON. A server older than 0.3.0 gets an error that names the version. Fixes pivot: pass numbers, locale and flatHeader to the REST engine (pivotkit 0.8.0) #135-Parameteragainst a current pivotkit-server without sources that take params ("this server has no source that takes params") now gets its own hint: leave-Parameterout, or use a source that declares them. The older answerno key "params"still names pivotkit-server 0.2.0. Fixes pivot: recognise pivotkit-server's clearer data/params errors (pivotkit#516) #132New-UDPivotparameter, aggregator and renderer toNew-UDPivotReport, names the ones without a counterpart, states the PowerShell and PSU versions, and shows one report before and after on the same rows. The pivot overview and the module README link it. Fixes Pivot docs: Coming from UniversalDashboard.Pivot #121--pk-zone-rows,-columns,-values,-filters,-tint,-tint-base) and--pk-control-icon,--pk-sort-arrow,--pk-field-hoverand--pk-chart-reference. Each has a--psu-pivot-*property per light and dark mode. Without an app's value, the report keeps pivotkit's colours or derives them the way pivotkit does. The field type icons follow pivotkit's new neutral default (the muted text); the themes page and the CHANGELOG show how to get the coloured icons back with--psu-pivot-type-*. Refs react: make the table header readable - field names, value name and the top-left corner pivotkit#920What takes effect when:
--pk-chart-reference. On the current pivotkit, the neutral icons also turn the empty report's field pills and a value chip's border grey.Whole-change check
Docs:
docs/pivot/themes.md(app authors who theme the report). I read the whole page. It was at its 200-line limit, so the property table moved to a reference page of its own, and themes.md links it. The paragraph on type colours now says that colour marks the zones, which contrast a corporate zone colour needs, and how to get coloured type icons back, with the light and dark values. "A property set only in:rootapplies to both modes" now lives only in "Light and dark".docs/pivot/theme-properties.md(new, Reference). Every--psu-pivot-*property with its fallback and its light and dark default. The four type rows are one row; the zone and control rows follow it, with one sentence on the pivotkit version they need. The--psu-pivot-radius-smrow says that4pxis PSU's own corner and what it covers: buttons, chips, the field list and its hover, a field's name in the table, and pivotkit's smaller corners derived from it.docs/pivot/reports.md(authors of endpoints and schedules). The engine table no longer says Numbers and the header are "the server's" for REST. The paragraph on-Numbers,-FlatHeaderand-Localenow sits after "Both take -View" and covers both engines, with their minimum versions. Before, it was in the Node section.docs/pivot/reports-server.md: the minimum server version for the three parameters.docs/pivot/coming-from-ud-pivot.md(new, Start; someone moving an app fromUniversalDashboard.Pivot). Requirements, the before/after pair, then one table each for the parameters, the aggregators and the renderers, one row per group. It links Views, Filters, Data and Compatibility for the details instead of repeating them. I built the tables from the code of both modules.docs/pivot/index.md: one row in the "You want | Where" table links the new page.Code:
New-UDPivotRenderBody: still one job, the request body. It writes three more keys, only when they are given.Invoke-UDPivotRestReportpasses them through.Assert-UDPivotReportEngineno longer refuses them for REST.New-UDPivotServerError: one more known answer each for pivot: recognise pivotkit-server's clearer data/params errors (pivotkit#516) #132 and pivot: pass numbers, locale and flatHeader to the REST engine (pivotkit 0.8.0) #135. "takes params" gets its own hint;no key "params"keeps the 0.2.0 hint.psu.css: the new tokens follow the existing layers (--psu-pivot-*over--psu-default-*). Literals stay in the--psu-default-*blocks only.Growth guard:
tests/powershell/PivotReport.Tests.ps1grew from 1391 to 1408 code lines. I read the whole file. The version-hint test had a copied answer, call and catch for each case; one helper now serves the version hints, and the "nothing sent without them" check moved into the first REST test, which makes that call already. The rest is the new test for the body of-Locale,-Numbersand-FlatHeader, next to the other REST body tests that use this file's stand-in server, and one assertion for the "takes params" hint. The file was far over the 300-line limit before. The fix for that is a shared helper for the stand-in server and a split by command, a change of its own.Checklist
docs/and the module'sCHANGELOG.mddescribe the new stateTest plan
Neutral review
A separate AI session reviewed the branch before it was pushed, in two rounds.
-Data, Stacked and the two engines, the radius row, and the help line.🤖 Generated with Claude Code