Skip to content

Filter internal selectors from the autogenerated CssAttributes table#5033

Open
mvanhorn wants to merge 1 commit into
digdir:mainfrom
mvanhorn:fix/4764-cssattributes-filter-internal-selectors
Open

Filter internal selectors from the autogenerated CssAttributes table#5033
mvanhorn wants to merge 1 commit into
digdir:mainfrom
mvanhorn:fix/4764-cssattributes-filter-internal-selectors

Conversation

@mvanhorn

Copy link
Copy Markdown

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

@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: be7ff9c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 CssAttributes data-attributes table.
  • Add a Vitest test suite covering public attributes, global attributes, and internal Floating UI selectors.
  • Include the apps/www Vitest project in the root Vitest workspace and ensure the test workflow runs on apps/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.

Comment thread apps/www/vite.config.ts
Comment on lines 1 to 5
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';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CssAttributes: filter internal selectors?

2 participants