Skip to content
Merged
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
64 changes: 64 additions & 0 deletions .changeset/fluffy-ties-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
"@radui/ui": minor
---

This release adds tests around the codebase, improves API support across multiple components, introduces new features like Steps + Minimap and roving focus in CheckboxGroups, while cleaning up builds, docs, and accessibility.


### ✨ Features
- Added **roving focus support for CheckboxGroup**.
- Improved **RadioGroup behavior and accessibility**.
- Enhanced **Select component behavior**.
- Introduced **Steps + Minimap basic implementation**.
- Refactored multiple components to support **`forwardRef`**:
- Avatar, Badge, BlockQuote, Card, Code, Collapsible, ContextMenu, DataList, RadioGroup, Splitter, Table, Tabs, ToggleGroup, VisuallyHidden.

### 🧪 Tests & Accessibility
- Expanded **a11y test coverage**: axe-core, Accordion, Slider, RadioGroup, AlertDialog, Dialog, Primitive `asChild`, and SSR hydration scenarios.
- Added **portal test utilities** for Dialog/AlertDialog.
- Stabilized and silenced noisy test warnings.
- Enforced **global test coverage thresholds**.
- Parallelized Jest test runs with **sharding** for faster feedback.

### 🛠 Fixes & Refactors
- Fixed `SelectPrimitiveItemProps` export typing.
- Refined **NavigationMenu typing**.
- Increased **Rollup build memory limit** and excluded Storybook files from builds.
- Silenced “Primitive `asChild`” warnings in tests.

### 📚 Docs & Chores
- Added **CodeRabbit sponsor hero** to docs.
- Added **Changeset workflow** for release management.
- Improved **WCAG tree navigation support**.
- Minor styling fixes and dark mode improvements.
- Updated Toggle API: `onChange` → `onPressedChange`.

## BREAKING CHANGES

### Toggle Component API Rename

The Toggle component's `onChange` prop has been renamed to `onPressedChange` to better reflect its semantic meaning and align with accessibility standards.

**Migration Required:**

```tsx
// Before
<Toggle onChange={(pressed) => { /* handle toggle */ }} />

// After
<Toggle onPressedChange={(pressed) => { /* handle toggle */ }} />
```

**TypeScript Updates:**

- Update any TypeScript interfaces or type definitions that reference `onChange` to use `onPressedChange`
- The prop signature remains the same: `(pressed: boolean) => void`
- Update any custom Toggle wrapper components or higher-order components that pass through the `onChange` prop

**Impact:**

- This change affects all consumers using the Toggle component
- Update your codebase to use the new `onPressedChange` prop name
- No functional changes to the component behavior - only the prop name has changed


15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ main ]
paths:
- 'src/**' # Only run when files in this directory change
- 'src/**'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Confirm path filters cover all workspaces and build inputs.

If this repo uses workspaces/monorepo folders (e.g., packages/**), tests/builds may be skipped unintentionally. Verify the filters align with your package.json workspaces and any config files Rollup/Jest read.

Run to check and compare against the filters:

Also applies to: 17-18, 22-22, 32-33


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== top-level dirs =="
ls -1

echo "== workspaces from package.json (if any) =="
if command -v jq >/dev/null 2>&1 && [ -f package.json ]; then
  jq -r '.workspaces // .packages // empty' package.json
fi

echo "== config files that affect build/test =="
fd -a -I -t f -g '.eslint*' -g '.prettier*' -g 'babel.config.*' -g 'jest.*' -g 'vitest.*' -g 'tsconfig.*' -g 'rollup*.config.*' -g 'postcss.config.js' -g 'vite.config.*' || true

Length of output: 1021


Update CI path filters to include repo-level configs and non-src inputs.

package.json has no workspaces; with the workflow limited to 'src/' changes to root config/support files won't trigger CI.
Observed root files/dirs: package.json, package-lock.json, jest.config.ts, tsconfig.json, playwright.config.ts, postcss.config.cjs, rollup.config.cjs, rollup-css.config.js, rollup-tokens.config.js, tailwind.config.js, build-components.cjs, scripts/, test-utils/, e2e/, styles/.
Action: edit .github/workflows/test.yml (the line with "- 'src/
'") to also match those files/dirs — e.g. add globs: 'package.json', 'package-lock.json', 'tsconfig.json', 'jest.config.ts', 'playwright.config.ts', 'rollup*.config.*', 'postcss.config.cjs', 'tailwind.config.js', 'scripts/', 'test-utils/', 'e2e/', 'styles/'.

🤖 Prompt for AI Agents
.github/workflows/test.yml around line 7: the workflow's paths filter only
includes 'src/**' so changes to repo-level config and other non-src files won't
trigger CI; update the paths list to include the recommended globs (e.g.
'package.json', 'package-lock.json', 'tsconfig.json', 'jest.config.ts',
'playwright.config.ts', 'postcss.config.cjs', 'tailwind.config.js',
'rollup*.config.*', plus directories like 'scripts/**', 'test-utils/**',
'e2e/**', 'styles/**') by replacing or extending the existing "- 'src/**'" entry
with all these entries so changes to those files will trigger the workflow.

- 'styles/**'
- 'package.json'
- 'package-lock.json'
Expand All @@ -14,11 +14,12 @@ on:
- 'rollup-tokens.config.cjs'
- 'tsconfig.json'
- 'postcss.config.js'
- 'tsconfig.json'
- '.changeset/**'
- '.github/workflows/**'
pull_request:
branches: [ main, security-fixes ]
paths:
- 'src/**' # Only run when files in this directory change
- 'src/**'
- 'styles/**'
- 'package.json'
- 'package-lock.json'
Expand All @@ -28,7 +29,8 @@ on:
- 'rollup-tokens.config.cjs'
- 'tsconfig.json'
- 'postcss.config.js'
- 'tsconfig.json'
- '.changeset/**'
- '.github/workflows/**'

permissions:
contents: read
Expand Down Expand Up @@ -63,6 +65,7 @@ jobs:
env:
JEST_SHARD: ${{ matrix.shard }}/${{ matrix.total }}
run: npm run test:shard

build:
name: Build
runs-on: ubuntu-latest
Expand All @@ -81,8 +84,8 @@ jobs:

- name: Build package
run: npm run build:rollup
# Upload dist only on pushes to main (skip for PRs)

# Upload dist only on pushes to main (skip for PRs)
- name: Upload dist artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
Expand Down
Loading