diff --git a/.changeset/batched-style-injection.md b/.changeset/batched-style-injection.md deleted file mode 100644 index cc3a42de7..000000000 --- a/.changeset/batched-style-injection.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@cube-dev/ui-kit': minor ---- - -Collapse the kit's stylesheet writes into one style invalidation per commit. - -Every `insertRule()` on a live stylesheet invalidates style for that sheet's scope. Kit components inject during React's render phase, so when anything else reads layout in the same pass — a tooltip positioning itself, `TextArea` autosizing, a virtualized table measuring rows — the two interleave and the browser is forced to recalculate style between every injection. - -`` now enables tasty's `batchInjection` and opens a batch window for its own commits. A commit that mounts a portal does not re-render ``, so windows are opened per portal boundary too: `` (tooltips) and `` (popovers, modals and trays — the `Dialog` and `Menu` surfaces). Those are the commits where injection and measurement interleave worst, because react-aria positions the overlay from a layout effect in the same commit that mounts it. - -Writes are queued and applied together, and the flush happens in `useInsertionEffect` — before any `useLayoutEffect` — so nothing can measure an element whose rules have not landed yet. Any commit without a window in it writes straight through exactly as before. - -No API change: no new props, no new setup. SSR is unaffected — styles are collected as text there and the provider is inert without a `document`. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c608aa0c..3656eef6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # @cube-dev/ui-kit +## 0.168.0 + +### Minor Changes + +- [#1344](https://github.com/cube-js/cube-ui-kit/pull/1344) [`7f786591`](https://github.com/cube-js/cube-ui-kit/commit/7f7865910ae4f9858d5052cd1452cb457530ce92) Thanks [@tenphi](https://github.com/tenphi)! - Collapse the kit's stylesheet writes into one style invalidation per commit. + + Every `insertRule()` on a live stylesheet invalidates style for that sheet's scope. Kit components inject during React's render phase, so when anything else reads layout in the same pass — a tooltip positioning itself, `TextArea` autosizing, a virtualized table measuring rows — the two interleave and the browser is forced to recalculate style between every injection. + + `` now enables tasty's `batchInjection` and opens a batch window for its own commits. A commit that mounts a portal does not re-render ``, so windows are opened per portal boundary too: `` (tooltips) and `` (popovers, modals and trays — the `Dialog` and `Menu` surfaces). Those are the commits where injection and measurement interleave worst, because react-aria positions the overlay from a layout effect in the same commit that mounts it. + + Writes are queued and applied together, and the flush happens in `useInsertionEffect` — before any `useLayoutEffect` — so nothing can measure an element whose rules have not landed yet. Any commit without a window in it writes straight through exactly as before. + + No API change: no new props, no new setup. SSR is unaffected — styles are collected as text there and the provider is inert without a `document`. + ## 0.167.0 ### Minor Changes diff --git a/package.json b/package.json index 400f16086..c371ec5de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cube-dev/ui-kit", - "version": "0.167.0", + "version": "0.168.0", "type": "module", "description": "UIKit for Cube Projects", "repository": {