Skip to content

Commit 6aa5c75

Browse files
authored
Merge branch 'main' into chore/vitest-4.1.12
2 parents 11203b8 + 6d2d404 commit 6aa5c75

16 files changed

Lines changed: 495 additions & 75 deletions

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
---
77

8+
## [Unreleased]
9+
10+
### Added
11+
12+
- **Dev warning for re-created `localeText` functions.** A `localeText` whose function entries (`paginationOf`, `rowSelectLabel`, …) are written inline is a new object on every render, and every rendered row reads the locale, so each parent render re-rendered all of them. The grid now warns once in development, naming the entries, after three renders in a row re-create the same function. Behaviour is unchanged: the functions are not frozen, so one that reads new state (a language switch) still updates the rows.
13+
814
## [3.10.1] — 2026-10-13
915

1016
### Fixed

‎README.md‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ This means that **Cursor**, **GitHub Copilot**, **Windsurf**, and other AI agent
184184
| `cellSelection` | `boolean` | Spreadsheet-style cell range selection; Ctrl/Cmd+C then copies the range (v3.3). |
185185
| `cellSelectionModel` / `onCellSelectionModelChange` | `GridCellSelectionModel` / `(model, { reason }) => void` | Controlled cell range. |
186186
| `showCellSelectionStats` | `boolean` | Status bar with count, sum and average of the range. |
187+
| `undoRedo` | `boolean \| GridUndoRedoOptions` | Undo / redo of edits, paste, range clear and fill (Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z, Ctrl+Y); `{ limit }` sets the history size (v3.4). |
188+
| `aiAssistant` | `GridAiAssistantOptions` | Ask AI panel in the toolbar; your `onPrompt` calls your model. Also `onAiAssistantApply` / `onAiAssistantError` (v3.5). See [AI toolkit](docs/features/ai-toolkit.md). |
187189

188190
### Sorting & Filtering
189191

@@ -450,7 +452,7 @@ exportToExcelAdvanced(rows, columns, {
450452
});
451453
exportToJson(rows, columns, { fileName: 'data.json' });
452454
await exportToPdf(rows, columns, { fileName: 'data', title: 'Report Title' });
453-
printGrid(rows, columns, 'Report Title');
455+
await printGrid(rows, columns, 'Report Title');
454456
```
455457

456458
> **Optional peer dependencies:** `exportToExcelAdvanced` requires ExcelJS (`npm install exceljs`); `exportToPdf` requires `npm install jspdf jspdf-autotable`.
@@ -492,20 +494,20 @@ Built-in themes: `darkTheme`, `roseTheme`, `emeraldTheme`, `amberTheme`, `compac
492494

493495
| Artifact | Size | Gzipped | Notes |
494496
| :--- | :--- | :--- | :--- |
495-
| **What an app ships for `DataGrid`** (your bundler minifies) | 271 KB | **87 KB** | Measured v3.9.0: esbuild, minified, React external, `DataGrid` only |
496-
| **Core ES Module** (`opengridx.es.js`, as published) | 493 KB | 130 KB | Unminified with readable names; use this — tree-shakeable |
497-
| **Core UMD** (`opengridx.umd.js`) | 357 KB | 112 KB | CommonJS / CDN compat |
497+
| **What an app ships for `DataGrid`** (your bundler minifies) | 271 KB | **87 KB** | Measured v3.10.1 (86.6 KB gzipped; CI fails above 92 KB): esbuild, minified, React external, `DataGrid` only |
498+
| **Core ES Module** (`opengridx.es.js`, as published) | 497 KB | 132 KB | Unminified with readable names; use this — tree-shakeable |
499+
| **Core UMD** (`opengridx.umd.js`) | 360 KB | 113 KB | CommonJS / CDN compat |
498500
| **Styles** (`opengridx.css`) | 81 KB | **12 KB** | `import '@opencorestack/opengridx/styles'` |
499501
| **AI toolkit** (`/ai`, optional import) | 20 KB | **7 KB** | Adds nothing unless imported |
500502
| **ExcelJS** (optional peer dep) | — | — | `npm install exceljs` |
501503
| **jsPDF** (optional peer dep) | — | — | `npm install jspdf jspdf-autotable` |
502-
| **npm package download** | — | **~2.5 MB** | Compressed tarball (includes `lib/` source, docs and source maps; 7.8 MB unpacked) |
504+
| **npm package download** | — | **~2.6 MB** | Compressed tarball (includes `lib/` source, docs and source maps; about 8 MB unpacked) |
503505

504506
- **Tree-shaking Ready**: ES Module build — bundlers (Vite, Webpack) only include what you use.
505507
- **Zero UI Dependencies**: No MUI, Ant Design, or Radix. Pure React + vanilla CSS.
506508
- **Lazy Advanced Export**: ExcelJS and jsPDF are optional peer deps — not bundled, loaded only when you call `exportToExcelAdvanced` / `exportToPdf`.
507509
- **Efficient Rendering**: Row and column virtualization keeps the DOM small (needs a bounded grid height): about 19 rows at rest and under 90 while scrolling fast, at 10k or 1M rows.
508-
- **[Benchmarks](docs/performance.md#benchmarks)** (`npm run bench`, Apple M1, Chromium, production build): at 100k rows the grid mounts in 89 ms, sorts in 102–160 ms, filters in 28–33 ms and groups with a sum in 87 ms; at 1M rows mount takes 0.7 s and a sort 1.1–1.3 s. Scrolling missed no frames at any size in Chromium. Past the browser's height cap (645,277 rows at 52 px in Chromium and Safari, about 344,000 in Firefox) rows cannot be scrolled to; page or stream larger datasets.
510+
- **[Benchmarks](docs/performance.md#benchmarks)** (`npm run bench`, Apple M1, Chromium, production build): at 100k rows the grid mounts in 75 ms, sorts in 49–66 ms, filters in 16–20 ms and groups with a sum in 74 ms; at 1M rows mount takes 0.6 s and a sort about 0.47 s. Scrolling stayed under 1 % slow frames at every size in Chromium. At 1M rows a cell edit commits in about 35 ms, select-all takes 60–90 ms and grouping about 190 ms (v3.8–3.10). Past the browser's height cap (645,277 rows at 52 px in Chromium and Safari, about 344,000 in Firefox) rows cannot be scrolled to; page or stream larger datasets.
509511

510512
---
511513

@@ -565,11 +567,11 @@ Most React grids gatekeep essential features like **Row Grouping**, **Excel Expo
565567
| Tree Data | ❌ | ✅ | ✅ | ✅ |
566568
| Master-Detail | ❌ | ✅ | ✅ | ✅ |
567569
| Excel Export | ❌ | ✅ | ❌ | ✅ |
568-
| Advanced Filtering | ❌ | ✅ | ❌ | ✅ |
570+
| Advanced Filtering | ❌ | ✅ | ✅ | ✅ |
569571
| Aggregation | ❌ | ✅ | ❌ | ✅ |
570572
| Pivot Mode | ❌ | ✅ | ❌ | ✅ |
571-
| Inline Cell Editing | ❌ | ✅ | ✅ | ✅ |
572-
| State Persistence | ❌ | ✅ | ❌ | ✅ |
573+
| Inline Cell Editing | ✅ | ✅ | ✅ | ✅ |
574+
| State Persistence | ✅ | ✅ | ❌ | ✅ |
573575
| **Price** | Free | **$$$** | Free (limited) | **Free** |
574576

575577
---
@@ -583,7 +585,7 @@ See [CONTRIBUTING.md](https://github.com/OpenCoreStack/OpenGridX/blob/main/CONTR
583585
```bash
584586
npm test # unit tests (jsdom)
585587
npm run test:browser # real Chromium, Firefox and WebKit
586-
npm run test:smoke # pack the library, install it into React 18/19 apps, run Playwright
588+
npm run test:smoke # pack the library, install it into React 18/19, webpack and Next.js apps, run Playwright
587589
```
588590

589591
Which layer to use, and how the package smoke suite works: [docs/contributing/testing.md](https://github.com/OpenCoreStack/OpenGridX/blob/main/docs/contributing/testing.md).

‎docs/performance.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Measured in Chromium on an Apple M1, 1,000,000 rows, from the event to the end o
180180

181181
3.9.0 keeps rows memoised: selecting a row, starting or committing an edit, and vertical scrolling re-render only the rows they change (a click re-rendered every visible row, now one). React's own work per interaction is about 3–5 ms at 100k rows.
182182

183-
To keep this, change rows by passing new row objects (never mutate them), keep `columns` and `localeText` shallowly stable (inline objects of plain values are fine; define function entries outside the render). Handlers such as `onRowClick` may be inline: the grid passes rows its own stable handlers.
183+
To keep this, change rows by passing new row objects (never mutate them), keep `columns` and `localeText` shallowly stable (inline objects of plain values are fine; define function entries outside the render; in development the grid warns when it sees the same function re-created render after render). Handlers such as `onRowClick` may be inline: the grid passes rows its own stable handlers.
184184

185185
### Method
186186

‎docs/superpowers/plans/2026-10-13-audit-tracker.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Release plan:
1818
| B5 | Med | Date paste into ISO date-time string lands on previous day west of UTC | `lib/utils/parsing.ts:150-151` | 3.7.1 | ✅ | zoned current → local time of day on pasted day, written as UTC; tested in 3 TZs |
1919
| B6 | Med | List view reads undeclared `--ogx-grid-cell-text`; selection colours bypass theme | `ListView.css:82` | 3.7.1 | ✅ | list view uses `--ogx-grid-row-*` vars; old `--ogx-selection-*` still win |
2020
| B7 | Low–Med | Duplicate row ids silently drop rows (no dev warning) | row store | later | ✅ | Already handled since 3.0: dev warning naming the ids (`buildRowsState`, tested in `DataGrid.state.test.tsx`); the audit overstated it. Warns once per page |
21-
| B8 | Low | Quick filter stale on in-place row mutation | quick-filter cache | later | ⏸ | Inherent to the per-row text cache; documented in `docs/features/filtering.md` |
22-
| B9 | Low | Quick filter stale when a formatter closure changes | quick-filter cache | later | ⏸ | Inherent to the cache; documented (pass new column definitions) |
21+
| B8 | Low | Quick filter stale on in-place row mutation | quick-filter cache | — | 🚫 | Won't fix (2026-10-16): the cache is keyed by row object; detecting mutation means re-reading every cell per keystroke (the 1.6–2 s cold search each time). Documented in `docs/features/filtering.md` |
22+
| B9 | Low | Quick filter stale when a formatter closure changes | quick-filter cache | — | 🚫 | Won't fix (2026-10-16), same reason as B8; documented (pass new column definitions) |
2323
| B10 | Low | `bigint` loses precision in sort | `lib/utils/sorting/index.ts:45` | later | ✅ | Exact re-ranking (`rankNumbersExactly`, `compareExact`) when a column has an unsafe bigint; generic path tie-breaks by `big` |
2424
| B11 | Low | Number filters accept `0x10`, `Infinity` | `lib/utils/values.ts:96-101` | later | ✅ | `toNumber` rejects radix prefixes and non-finite text; new `values.test.ts` |
2525

@@ -81,3 +81,4 @@ Baselines (Chromium, M1, 1M rows): edit 508 ms · paste/undo/redo ~790 ms · fil
8181
- 2026-10-13 — Time-sliced pipeline closed (user agreed): proposal status updated, branch archived as `archive/timesliced-pipeline-2026-10-12`, both agent worktrees removed. Backlog under the feature hold is now empty except R-items done; ready to lift the hold (ask user).
8282
- 2026-10-13 — Release 3.10.0 via PR.
8383
- 2026-10-13 — 3.10.1 work: Next.js smoke fixture; perf #5 select-all ~60–90 ms / deselect <50 ms (live-check markers), #2 grouping 540 → 190 ms (lazy leaf maps, index partition), #3 quick filter first search 2.7 → ~1.6–2 s (per-day date memo, shown-text lower-case cache). check:compiler caught a getter-in-hook regression during #2 (fixed before push).
84+
- 2026-10-16 — B8/B9 closed as won't fix (by design). Inline-function `localeText`: freezing the functions would bring back B9-style stale row labels, so added a dev-only warning instead (`useGridLocaleTextWarning`, in `GridRoot`). Branch `fix/localetext-functions`.

‎e2e/fixtures/react18/package-lock.json‎

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

‎e2e/fixtures/react18/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@types/react-dom": "~18.3.1",
2222
"@vitejs/plugin-react": "^5.1.1",
2323
"typescript": "~5.9.3",
24-
"vite": "^7.2.4"
24+
"vite": "^7.3.7"
2525
},
2626
"overrides": {
2727
"uuid": "^11.1.1",

‎e2e/fixtures/react19/package-lock.json‎

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

‎e2e/fixtures/react19/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@types/react-dom": "^19.2.3",
2222
"@vitejs/plugin-react": "^5.1.1",
2323
"typescript": "~5.9.3",
24-
"vite": "^7.2.4"
24+
"vite": "^7.3.7"
2525
},
2626
"overrides": {
2727
"uuid": "^11.1.1",

0 commit comments

Comments
 (0)