Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/good-houses-ring.md

This file was deleted.

16 changes: 0 additions & 16 deletions .changeset/react-hooks-lint.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/slick-knives-jump.md

This file was deleted.

20 changes: 20 additions & 0 deletions packages/hooks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# @vega-ui/hooks

## 2.6.0

### Minor Changes

- a89803a: Enable `react-hooks` lint rules repo-wide; fix all stale-closure findings; add `useEventCallback`

`eslint-plugin-react-hooks` was installed but none of its rules were enabled — the class of bugs behind the recent Slider and Calendar stale closures was invisible to CI. `rules-of-hooks` and `exhaustive-deps` now run as errors (with `rules-of-hooks` off for Storybook CSF `render` functions, which are false positives).

- new `@vega-ui/hooks` export: `useEventCallback` — a stable-identity wrapper that always calls the latest handler (the industry "latest ref" pattern à la MUI/Radix/Floating UI), throws in development if called during render
- `useScrollSnap`: `onSnapChanging`/`onSnapChange`/`getSnapPoint` go through `useEventCallback`, so inline consumer callbacks no longer resubscribe the `scrollend` listener and observers on every render; the remaining deps are honest
- `Calendar`: `onSelectDay` no longer freezes the first `onChange` — it reads the latest callback through `useEventCallback` while keeping a stable identity (regression-tested by swapping `onChange` between renders)
- `NumberField`: `decrement` no longer clamps against a stale `max`; the native non-passive `wheel` listener is attached only while `changeOnWheel` is enabled and no longer resubscribes when `min`/`max`/`step` or the value change
- `useSelection`: a consumer-provided `resolveRange` no longer cascades identity changes into `select`/`expand`/`toggle`
- `Collapsible`: `onChangeHidden` fires only when `hidden` actually changes — an inline callback no longer re-triggers the notification effect on every parent render
- all remaining findings were stable-value dependencies added for free, plus three documented intentional suppressions (`useMutationObserver` per-field options deps, `createContext` shallow-by-value memoization, `SnapScrollerContent` unmount-only unregistration)

### Patch Changes

- @vega-ui/utils@2.6.0

## 2.5.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vega-ui/hooks",
"version": "2.5.0",
"version": "2.6.0",
"description": "Vega UI Kit for Web",
"license": "MIT",
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions packages/icons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @vega-ui/icons

## 2.6.0

## 2.5.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vega-ui/icons",
"version": "2.5.0",
"version": "2.6.0",
"description": "Icons for Vega UI Kit for Web",
"license": "MIT",
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions packages/react-context/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @vega-ui/react-context

## 2.6.0

## 2.5.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-context/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vega-ui/react-context",
"version": "2.5.0",
"version": "2.6.0",
"description": "Context utils for @vega-ui/react",
"license": "MIT",
"keywords": [
Expand Down
6 changes: 6 additions & 0 deletions packages/theme/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @vega-ui/theme-core

## 2.6.0

### Patch Changes

- @vega-ui/tokens-core@2.6.0

## 2.5.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vega-ui/theme-core",
"version": "2.5.0",
"version": "2.6.0",
"description": "CSS themes for @vega-ui/react",
"license": "MIT",
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions packages/tokens/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @vega-ui/tokens-core

## 2.6.0

## 2.5.0

## 2.4.0
Expand Down
2 changes: 1 addition & 1 deletion packages/tokens/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vega-ui/tokens-core",
"version": "2.5.0",
"version": "2.6.0",
"description": "CSS tokens for @vega-ui/react",
"license": "MIT",
"keywords": [
Expand Down
24 changes: 24 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @vega-ui/react

## 2.6.0

### Patch Changes

- 5603707: Changed badge colors to WCAG
- a89803a: Enable `react-hooks` lint rules repo-wide; fix all stale-closure findings; add `useEventCallback`

`eslint-plugin-react-hooks` was installed but none of its rules were enabled — the class of bugs behind the recent Slider and Calendar stale closures was invisible to CI. `rules-of-hooks` and `exhaustive-deps` now run as errors (with `rules-of-hooks` off for Storybook CSF `render` functions, which are false positives).

- new `@vega-ui/hooks` export: `useEventCallback` — a stable-identity wrapper that always calls the latest handler (the industry "latest ref" pattern à la MUI/Radix/Floating UI), throws in development if called during render
- `useScrollSnap`: `onSnapChanging`/`onSnapChange`/`getSnapPoint` go through `useEventCallback`, so inline consumer callbacks no longer resubscribe the `scrollend` listener and observers on every render; the remaining deps are honest
- `Calendar`: `onSelectDay` no longer freezes the first `onChange` — it reads the latest callback through `useEventCallback` while keeping a stable identity (regression-tested by swapping `onChange` between renders)
- `NumberField`: `decrement` no longer clamps against a stale `max`; the native non-passive `wheel` listener is attached only while `changeOnWheel` is enabled and no longer resubscribes when `min`/`max`/`step` or the value change
- `useSelection`: a consumer-provided `resolveRange` no longer cascades identity changes into `select`/`expand`/`toggle`
- `Collapsible`: `onChangeHidden` fires only when `hidden` actually changes — an inline callback no longer re-triggers the notification effect on every parent render
- all remaining findings were stable-value dependencies added for free, plus three documented intentional suppressions (`useMutationObserver` per-field options deps, `createContext` shallow-by-value memoization, `SnapScrollerContent` unmount-only unregistration)

- b5afed6: Changed badge ghost colors
- Updated dependencies [a89803a]
- @vega-ui/hooks@2.6.0
- @vega-ui/icons@2.6.0
- @vega-ui/react-context@2.6.0
- @vega-ui/utils@2.6.0

## 2.5.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vega-ui/react",
"version": "2.5.0",
"version": "2.6.0",
"description": "Vega UI Kit for React",
"license": "MIT",
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions packages/utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @vega-ui/utils

## 2.6.0

## 2.5.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vega-ui/utils",
"version": "2.5.0",
"version": "2.6.0",
"description": "Utilities for @vega-ui/react",
"license": "MIT",
"keywords": [
Expand Down