Filter internal selectors from the autogenerated CssAttributes table#5033
Filter internal selectors from the autogenerated CssAttributes table#5033mvanhorn wants to merge 1 commit into
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR updates the docs website (apps/www) CSS attributes table generator to hide internal/private data-* selectors (not intended for consumers) and adds a regression test to ensure those internal selectors remain excluded. It also wires the new test into the monorepo Vitest workspace so it runs in CI when apps/www changes.
Changes:
- Filter additional internal selectors (notably Floating UI hooks) from the autogenerated
CssAttributesdata-attributes table. - Add a Vitest test suite covering public attributes, global attributes, and internal Floating UI selectors.
- Include the
apps/wwwVitest project in the root Vitest workspace and ensure the test workflow runs onapps/www/**changes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
vitest.config.mjs |
Adds apps/www/vite.config.ts as a Vitest workspace project so apps/www tests run under pnpm test. |
apps/www/vite.config.ts |
Switches to vitest/config and adds a test config block for the apps/www project. |
apps/www/app/_components/css-attributes/css-attributes.tsx |
Introduces an exclusion set (globals + Floating UI hooks) and applies it in getAttributes. |
apps/www/app/_components/css-attributes/css-attributes.test.ts |
Adds regression tests verifying internal selectors are filtered and public ones remain. |
.github/workflows/test.yml |
Ensures the Test workflow triggers on apps/www/** changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { fileURLToPath } from 'node:url'; | ||
| import { reactRouter } from '@react-router/dev/vite'; | ||
| import { defineConfig } from 'vite'; | ||
| import { defineConfig } from 'vitest/config'; | ||
| import { envOnlyMacros } from 'vite-env-only'; | ||
| import tsconfigPaths from 'vite-tsconfig-paths'; |
Summary
The autogenerated CssAttributes documentation table no longer lists internal/private selectors. The generator now filters out selectors that are implementation details so the published attributes table only shows the public, author-facing CSS attributes. A regression test covers the filtering and is wired into the apps/www Vitest project so it runs in CI.
This is an
apps/www(documentation website) change with no published-package impact, so no changeset is required.Closes #4764
Checks