diff --git a/PRODUCT.md b/PRODUCT.md new file mode 100644 index 0000000..3f4b6f6 --- /dev/null +++ b/PRODUCT.md @@ -0,0 +1,31 @@ +# What the modules are (and are not) + +The modules add charts, a datagrid and a pivot report builder to PowerShell Universal (PSU) apps. +Each is a PowerShell module you install on its own. You pass the data as it comes, from SQL, REST +or any PowerShell command, and the component draws it in the browser. This page says who the +modules are for, what they are not, and what a change delivers. The [README](README.md) lists the +modules. + +## Who they are for + +I check every change against these three roles. + +| Role | Wants | Success means | +| --- | --- | --- | +| Reader | to understand the data in an app: a chart, a grid or a pivot report | it reads at once, in light and dark mode, on a wide screen, and on a phone | +| App author or PSU admin | to put data into an app and run it on their PSU server | one command with the data as it comes, no JavaScript | +| Developer | to build on the modules: themes, template stores, reports from scripts, a change to a module | stable commands and formats, clear errors, docs that describe how it works now | + +## What they are not + +| Not | Instead | +| --- | --- | +| A chart, grid, or pivot engine of their own | Apache ECharts, Perspective and pivotkit draw. The modules connect them to PSU | +| Access control for data | remove the rows and columns a reader must not see before `-Data` | +| A UI framework next to PSU's | the components use the React that PSU provides and follow PSU's light and dark theme | +| A product of Devolutions | an independent, MIT-licensed project | + +## What a change delivers + +A change makes the product better for at least one of the three roles and keeps the +promises on the [versioning page](docs/versioning.md). [CONTRIBUTING.md](CONTRIBUTING.md) has the steps and checks. diff --git a/README.md b/README.md index 8a9d6fc..e9002b0 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Supported and tested versions: [Requirements](https://powershell-universal-compo > [!NOTE] > The modules are 0.x. A minor release can break things, so read the module's `CHANGELOG.md` before -> you update. +> you update. [Versioning](https://powershell-universal-components.eize.dev/versioning/) lists what the modules treat as public interface. ## Modules @@ -100,7 +100,7 @@ Your own data from SQL, REST and PowerShell: [Getting started](https://powershel ## Development Build, tests, docs site and releases: [Development](https://powershell-universal-components.eize.dev/development/). -Contributors and coding agents: [AGENTS.md](AGENTS.md), [CONTRIBUTING.md](CONTRIBUTING.md). +Contributors and coding agents: [PRODUCT.md](PRODUCT.md), [AGENTS.md](AGENTS.md), [CONTRIBUTING.md](CONTRIBUTING.md). ## License diff --git a/docs/index.md b/docs/index.md index d18b479..471b181 100644 --- a/docs/index.md +++ b/docs/index.md @@ -95,7 +95,7 @@ In the PowerShell Gallery: [PowerShellUniversal.Component.Pivot](https://www.pow ## Questions and stability The modules are 0.x. A minor release can break things. Read the module's `CHANGELOG.md` before -you update. +you update. [Versioning](versioning.md) lists what the modules treat as public interface. Ask questions and share ideas in [GitHub Discussions](https://github.com/eizedev/powershell-universal-components/discussions). Bugs go into [issues](https://github.com/eizedev/powershell-universal-components/issues). Each release of a component module is announced in Discussions too. diff --git a/docs/versioning.md b/docs/versioning.md new file mode 100644 index 0000000..673bab5 --- /dev/null +++ b/docs/versioning.md @@ -0,0 +1,60 @@ +--- +title: Versioning +description: How the modules number their releases, when an update can break your app, and what counts as their public interface. +--- + +# Versioning + +This page says when an update of a module may break your app. Each module has its own version and +its own `CHANGELOG.md`, and has releases of its own. + +## The promise + +### Before 1.0.0 + +The modules are 0.x and under active development. + +- A minor release, from 0.y to 0.(y+1), can break things. The modules break as little as possible. +- The module's `CHANGELOG.md` says what changed. Read it before you update. + +To choose when you update, install a fixed version: + +```powershell +Install-PSResource -Name PowerShellUniversal.Component.Pivot -Version +``` + +### From 1.0.0 + +A module that reaches 1.0.0 follows [Semantic Versioning](https://semver.org/): + +| Release | May contain | +| --- | --- | +| Patch (1.2.3 to 1.2.4) | fixes | +| Minor (1.2 to 1.3) | additions | +| Major (1 to 2) | changes that break the public interface | + +Each module reaches 1.0.0 on its own. + +## What is public interface + +These are the parts a break can hit: + +- The commands a module exports, their parameters and the values they take, and what they return. +- The error ids of a command, such as `PivotServerUnreachable`. +- The `--psu-*` CSS custom properties an app's stylesheet sets + ([themes](echarts/themes.md), [pivot themes](pivot/themes.md)). +- The data and view formats: the rows a component takes, a pivot view and the view file, with its + `$schema`. +- The keys of `-Labels`. +- Events: when a script block such as `-OnClick` runs and the `$EventData` it gets, and the answer to + `Get-UDElement`. +- Environment variables, such as `PSU_COMPONENT_PIVOT_SCHEMA_URL`. +- The addresses of the showcase apps' pages where the docs name them. +- The lowest supported versions of PowerShell Universal and PowerShell ([requirements](index.md#requirements)). + +These are not public interface and can change in any release: + +- The look: colours, sizes, and spacing. +- The wording of messages. Match on the error id, not on the text. +- The code in a module's `Private/` folder and the bundled JavaScript libraries. +- What `-Options` passes to Apache ECharts or `-Config` to Perspective: those libraries define it. diff --git a/modules/PowerShellUniversal.Component.ECharts/CHANGELOG.md b/modules/PowerShellUniversal.Component.ECharts/CHANGELOG.md index 492576e..dbcbc07 100644 --- a/modules/PowerShellUniversal.Component.ECharts/CHANGELOG.md +++ b/modules/PowerShellUniversal.Component.ECharts/CHANGELOG.md @@ -62,11 +62,13 @@ All notable changes to PowerShellUniversal.Component.ECharts. Format: ### Changed -- Tooltips of bar, line, area and step charts show the element under the pointer: a bar, a stacked - segment (with the stack total) or a line point alone; between them all series at that position, - between stacked bars the total only. Before, every series at the position was listed, also when the - pointer was on one segment. `-TooltipMode Axis` lists every series at the position as before. - Stacked tooltips have a total row in every mode (with `-SecondaryY` one per axis); switching line, +- **Breaking:** tooltips of bar, line, area and step charts show the element under the pointer: a bar, + a stacked segment (with the stack total) or a line point alone; between them all series at that + position, between stacked bars the total only. Before, every series at the position was listed, also + when the pointer was on one segment. + - Who is affected: readers who compare the series of a position in the tooltip. + - What to do: `-TooltipMode Axis` lists every series at the position as before. +- Stacked tooltips have a total row in every mode (with `-SecondaryY` one per axis); switching line, bar or stack in the toolbox is followed, Restore goes back. The tooltip text of these charts is the module's own now: one line per series (`Name: value`), series without a value at that position left out (ECharts showed "-"). diff --git a/modules/PowerShellUniversal.Component.Pivot/CHANGELOG.md b/modules/PowerShellUniversal.Component.Pivot/CHANGELOG.md index dfb8db6..28ad482 100644 --- a/modules/PowerShellUniversal.Component.Pivot/CHANGELOG.md +++ b/modules/PowerShellUniversal.Component.Pivot/CHANGELOG.md @@ -37,17 +37,21 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: - pivotkit-core 0.10.0, pivotkit-react 0.10.0, pivotkit-report 0.6.0 and pivotkit-xlsx 0.7.0, all pinned. What readers see: - - A loaded CSV or Excel file with numbers such as `1,234` or `1.500` reads them in the notation - of the report's locale and says so in a note. Check such a column after the update. - On a phone, the settings button shows its icon only, and table headers wrap between words. - A menu that a low window cuts off fades out at its end. - `-Labels` no longer uses the key `settingsShort`. Remove it if you set it. The - [pivotkit changelogs](https://pivotkit.eize.dev/getting-started/upgrading/#from-0-9) list all changes. -- A shared view of a template store takes no origin from the request's headers for a `-SchemaUrl` - path. It takes the origin of an https `PSU_COMPONENT_PIVOT_SCHEMA_URL`, else it names pivotkit's - schema address. This affects you when you publish shared views with a path and no https default: - to keep your own address in them, set `PSU_COMPONENT_PIVOT_SCHEMA_URL` to it. A view a reader saves - for themselves keeps the origin of the request. + The [pivotkit changelogs](https://pivotkit.eize.dev/getting-started/upgrading/#from-0-9) list all changes. +- **Breaking:** a loaded CSV or Excel file with numbers such as `1,234` or `1.500` reads them in the + notation of the report's locale and says so in a note. + - Who is affected: readers of a report with `-AllowImport` who load such files. + - What to do: check such a column after the update. +- **Breaking:** `-Labels` no longer uses the key `settingsShort`; its text is not shown. + - Who is affected: an app that sets `settingsShort` in `-Labels`. + - What to do: remove the key. +- **Breaking:** a shared view of a template store takes no origin from the request's headers for a + `-SchemaUrl` path. It takes the origin of an https `PSU_COMPONENT_PIVOT_SCHEMA_URL`, else it names + pivotkit's schema address. A view a reader saves for themselves keeps the origin of the request. + - Who is affected: an app that publishes shared views with a `-SchemaUrl` path and no https default. + - What to do: to keep your own address in them, set `PSU_COMPONENT_PIVOT_SCHEMA_URL` to it. - `ConvertTo-PSUComponentData`, the data conversion all modules share, keeps its C# converter in `RowConverter.cs` and its helpers one function per file. The rows it returns are unchanged. - The module's code is one function per file in `Public/` and `Private/`; the `.psm1` only loads them. @@ -136,10 +140,14 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: - On a touch screen every button and menu row is at least 44 by 44 pixels. - The German texts and the tips are part of the module's one bundle, as before: PSU loads no new file. -- `-OnCellClick` for a chart point runs at **Show the rows** in the point's menu or at a double click, - no longer at the first click. The docs of the event say so. -- `ConvertFrom-UDPivotView` takes `display` in lower case only, as pivotkit writes it: `'Table'` is - refused. +- **Breaking:** `-OnCellClick` for a chart point runs at **Show the rows** in the point's menu or at a + double click, no longer at the first click. The docs of the event say so. + - Who is affected: an app whose `-OnCellClick` reacts to clicks on chart points. + - What to do: tell readers to use **Show the rows** or a double click. +- **Breaking:** `ConvertFrom-UDPivotView` takes `display` in lower case only, as pivotkit writes it: + `'Table'` is refused. Before, any case passed. + - Who is affected: a script or view that writes `display` in another case. + - What to do: write `'table'`, `'chart'` or `'both'`. - The bundle is about 1.8 MB, 550 KB with gzip. - Views with the new keys need this version on every PSU server that reads them. Module 0.8 skips a view with `display = 'both'` in a view folder or store with a warning, refuses it in `-View` and @@ -156,15 +164,20 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: through the module, often eight records or more. With `-ErrorVariable +name`, the entries you had before stay. This holds for every command of the module ([#153](https://github.com/eizedev/powershell-universal-components/issues/153)). -- With `-ErrorAction SilentlyContinue` or `Ignore`, a command of the module went on after its own - error: `Invoke-UDPivotReport` without a command line still tried to run it, and +- **Breaking:** with `-ErrorAction SilentlyContinue` or `Ignore`, a command of the module went on after + its own error: `Invoke-UDPivotReport` without a command line still tried to run it, and `ConvertFrom-UDPivotView` returned a result for a view it had refused. Such an error now stops the - command with every `-ErrorAction`. Catch it with `try` and `catch` + command with every `-ErrorAction` ([#153](https://github.com/eizedev/powershell-universal-components/issues/153)). -- `New-UDPivotReport -Tips` refuses an id pivotkit does not know, and names the ones it knows. A wrong - id or a notice id such as `filterEmpty` went to pivotkit, which ignored it. An id in other case, such as - `Values`, now reaches pivotkit in its spelling + - Who is affected: a script that calls a command of the module with `SilentlyContinue` or `Ignore` + and goes on after its error. + - What to do: catch the error with `try` and `catch`. +- **Breaking:** `New-UDPivotReport -Tips` refuses an id pivotkit does not know, and names the ones it + knows. A wrong id or a notice id such as `filterEmpty` went to pivotkit, which ignored it. An id in + other case, such as `Values`, now reaches pivotkit in its spelling ([#154](https://github.com/eizedev/powershell-universal-components/issues/154)). + - Who is affected: an app that passes an unknown id to `-Tips`. The report stops with an error. + - What to do: remove the id or use one the error names. - The views page lists the chart settings in a table of their own ([#154](https://github.com/eizedev/powershell-universal-components/issues/154)). @@ -247,15 +260,21 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: ### Changed -- `New-UDPivotReport`, `ConvertTo-UDPivotViewFile` and the template stores check `-SchemaUrl` the - same way: `''`, an https address or a path; no spaces, at most 2,000 characters, no user name or - password. The scheme may be in any case. `ConvertTo-UDPivotViewFile` and the stores took any text - before: an `http://` address or another value now stops them with an error. The error text is new - in all of them ([#110](https://github.com/eizedev/powershell-universal-components/issues/110)). -- An address of your own names the schema of the current format (view file format 2). A file of - format 1 keeps pivotkit's `view-file-1.json` address, so it never names the schema of another - format ([#110](https://github.com/eizedev/powershell-universal-components/issues/110)). -- An address of your own for a file of format 1 is no longer possible. +- **Breaking:** `New-UDPivotReport`, `ConvertTo-UDPivotViewFile` and the template stores check + `-SchemaUrl` the same way: `''`, an https address or a path; no spaces, at most 2,000 characters, no + user name or password. The scheme may be in any case. `ConvertTo-UDPivotViewFile` and the stores + took any text before. The error text is new in all of them + ([#110](https://github.com/eizedev/powershell-universal-components/issues/110)). + - Who is affected: an app that gives `ConvertTo-UDPivotViewFile` or a template store an `http://` + address or another value that is no https address or path. It now stops with an error. + - What to do: use an https address or a path on the PSU server. +- **Breaking:** an address of your own names the schema of the current format (view file format 2). + A file of format 1 keeps pivotkit's `view-file-1.json` address, so it never names the schema of + another format ([#110](https://github.com/eizedev/powershell-universal-components/issues/110)). + - Who is affected: an app that writes view files of format 1 (views of version 1 or without a + version) and relies on its own `-SchemaUrl` in them. Those files name pivotkit's address now. + - What to do: nothing for pivotkit and the module, which read the file either way. A tool that + needs your address reads files of format 2. ## [0.7.0] - 2026-11-18 @@ -290,13 +309,17 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: - The footer names the data's date range, and a grouping such as "Month of year" says which years it combines. - The row count says "2,190 of 4,386 rows" when a filter leaves rows out. -- Behaviour change: without `-ExportData` the drill-down panel has no Export menu any more. Readers - still see the rows behind a value and can select and copy their text. `-DrillDownExport` brings the - menu back without Source data; `-ExportData` brings it with Source data. -- `-Labels`: pivotkit 0.8.0 no longer shows the keys `layout`, `showLayout`, `options` and - `chartDisplay`, and says once in the browser's console which key holds that text now. Use - `zonesTitle`, `tableSettings` and `chartSettings`. An app that sets `rowsCount` sets `rowsFiltered` - too ([upgrading](https://pivotkit.eize.dev/getting-started/upgrading/#view-tabs-0-8)). +- **Breaking:** without `-ExportData` the drill-down panel has no Export menu any more. Readers still + see the rows behind a value and can select and copy their text. + - Who is affected: readers who export the rows behind a value. + - What to do: `-DrillDownExport` brings the menu back without Source data; `-ExportData` brings it + with Source data. +- **Breaking:** `-Labels`: pivotkit 0.8.0 no longer shows the keys `layout`, `showLayout`, `options` + and `chartDisplay`, and says once in the browser's console which key holds that text now + ([upgrading](https://pivotkit.eize.dev/getting-started/upgrading/#view-tabs-0-8)). + - Who is affected: an app that sets one of these keys in `-Labels`. + - What to do: use `zonesTitle`, `tableSettings` and `chartSettings`. An app that sets `rowsCount` + sets `rowsFiltered` too. - The help of `-Tips`, `-FieldInfo`, `-ZoneInfo` and `-SettingInfo` and the Pivot pages name More, Help instead of Options, and the zones' heading instead of the Layout button. - `Invoke-UDPivotReport` is tested with pivotkit-cli 0.4.0 and pivotkit-server 0.3.0. The file route @@ -379,10 +402,12 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: ### Fixed -- `-TemplatePath` lists only the view files made for the report's data (`-SourceId`, else `-Id`) and - those that name no data, as the template stores do; it listed every file for every report. A - folder that held the views of one report under another id shows them only in that report now - ([#90](https://github.com/eizedev/powershell-universal-components/issues/90)). +- **Breaking:** `-TemplatePath` lists only the view files made for the report's data (`-SourceId`, else + `-Id`) and those that name no data, as the template stores do; it listed every file for every + report ([#90](https://github.com/eizedev/powershell-universal-components/issues/90)). + - Who is affected: a folder that holds views of one report under another id. They show only in + that report now. + - What to do: give each report the `-SourceId` its views name, or one folder per report. - A shared `-Templates` entry with the name of a store's shared view showed twice in the Views menu; the store's view now takes its place, as for `-TemplatePath` files ([#91](https://github.com/eizedev/powershell-universal-components/issues/91)). @@ -422,10 +447,13 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: [#113](https://github.com/eizedev/powershell-universal-components/issues/113)). A view saved in the browser for a sheet of a loaded workbook opens on that sheet again. Dates before 1 AD carry their era ("Q1 2 BC"). Export has an HTML report, the chart as SVG and Print or save as PDF; Excel, the HTML - report and print are light also from a dark app. Column subtotals are off unless a view turns them on - (`totals = @{ colSubtotals = $true }`); views the report saves name all four totals. The chart's + report and print are light also from a dark app. The chart's text is 14 px, the font weights are four (`--psu-pivot-weight-*`). `-Tips` knows the tip `colSubtotals`. The filter menus write view version 2 (below). +- **Breaking:** column subtotals are off unless a view turns them on; views the report saves name all + four totals. + - Who is affected: views without `totals` that relied on column subtotals. + - What to do: add `totals = @{ colSubtotals = $true }` to the view. - A colour scale without colours of its own runs from light to strong blue, the heatmap's colours, on screen and in the Excel export, not from red over yellow to green: it says "more", not "good" or "bad". `--psu-pivot-scale-low` and `--psu-pivot-scale-high` fall back to `--psu-pivot-heat-low` and @@ -516,12 +544,14 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: and the questions before a delete or a publish are levels of the menu. A press inside a menu no longer drags the chip that opened it. New filter types in a view, `compare` and `relative` (with `anchor`); views saved by earlier versions load unchanged, and the template stores keep the new - filters as they are. Labels a `-Labels` override may use changed again (new `summary*`, `quick*`, - `anchor*`, `yearsCombined*`, `rule*`, `back`, `searchMenu` and more; gone: `moreFilters`, + filters as they are. The docs describe the menus and the view's filter types. +- **Breaking:** labels a `-Labels` override may use changed again. New: `summary*`, `quick*`, + `anchor*`, `yearsCombined*`, `rule*`, `back`, `searchMenu` and more. Gone: `moreFilters`, `itemsPicked`, `itemsShown*`, `pickedPlus`, `ruleOut`, `quickCustom`, `conditionOnNames`, `removeConditions`, `removeFilter`, `chooseValues`, `valueFilter`, `change`, `removeSetting`, - `topStart`, `binsStart`, `filterIs`, `groupBy`, `resetSections`, `resetSectionsDone`; a text for a - key that is gone is ignored). The docs describe the menus and the view's filter types. + `topStart`, `binsStart`, `filterIs`, `groupBy`, `resetSections`, `resetSectionsDone`. + - Who is affected: an app that sets one of the keys that are gone. Their text is ignored. + - What to do: remove those keys, and set the texts of the new keys you want to change. - The report's default height (without `-Height`) is one screen: the window's height minus 160 pixels for PSU's app bar and a page title, between 600 and 1400 pixels (was minus 200, between 480 and 1400). The whole report is on screen when the page loads, and the table shows more rows below @@ -537,14 +567,19 @@ All notable changes to PowerShellUniversal.Component.Pivot. Format: - pivotkit 0.2.0 ([pivotkit-react release](https://github.com/eizedev/pivotkit/releases/tag/pivotkit-react%400.2.0)): Save, Save as and New, empty report in the Views menu with the loaded view's name and an unsaved-changes dot in the toolbar; sorting by a click on a table header; a view's unused parts as a - warning in plain words; field menus with one line per setting. Labels a `-Labels` override may use - changed: `issues`, `viewMissingFields`, `viewOtherIssue(s)` and `valuesFilterHint` are gone (see - pivotkit-react's CHANGELOG for the new keys). -- View names in the template stores match as in pivotkit's Views menu: the same characters in the same - case (after trimming). `Sales` and `sales` are two views; before, saving `sales` replaced `Sales` - without pivotkit asking. Files of new views carry a hash of the name as it is. A view saved by 0.1.0 - is replaced in its file; in a custom store whose `-Get` returns only the Json it moves to the new - key on its next save, and the old key is deleted. + warning in plain words; field menus with one line per setting. +- **Breaking:** labels a `-Labels` override may use changed: `issues`, `viewMissingFields`, + `viewOtherIssue(s)` and `valuesFilterHint` are gone. + - Who is affected: an app that sets one of these keys. + - What to do: set the text under the new key (see pivotkit-react's CHANGELOG for the new keys). +- **Breaking:** view names in the template stores match as in pivotkit's Views menu: the same + characters in the same case (after trimming). `Sales` and `sales` are two views; before, saving + `sales` replaced `Sales` without pivotkit asking. Files of new views carry a hash of the name as it + is. A view saved by 0.1.0 is replaced in its file; in a custom store whose `-Get` returns only the + Json it moves to the new key on its next save, and the old key is deleted. + - Who is affected: readers who save a view under a name that differs from an existing one only + in case. They get a second view. + - What to do: delete the view that is not wanted. - `New-UDPivotTemplateStore`: `-Get` may return objects with `Json` and `FileName`; a save over such a view gets its `FileName`, so `-Save` replaces it where it is stored. The SQL Server example returns it. `-Delete` must succeed for a key that is not stored: after a save the module also removes the other diff --git a/zensical.toml b/zensical.toml index c93cad3..095fe74 100644 --- a/zensical.toml +++ b/zensical.toml @@ -17,6 +17,7 @@ site/ nav = [ { "Overview" = "index.md" }, { "Getting started" = "getting-started.md" }, + { "Versioning" = "versioning.md" }, { "ECharts" = [ { "Overview" = "echarts/index.md" }, { "Showcase app (demo)" = "demo.md" }, @@ -102,7 +103,7 @@ PowerShell objects. Not affiliated with Devolutions. llms-full.txt holds every p """ [project.plugins.llmstxt.sections] -"Start" = ["index.md", "getting-started.md"] +"Start" = ["index.md", "getting-started.md", "versioning.md"] "ECharts module" = ["echarts/*.md", "demo.md"] "Perspective module" = ["perspective/*.md"] "Pivot module" = ["pivot/*.md"]