Skip to content

Commit 1da5bbe

Browse files
committed
docs: add test file feature flag requirement to setup-component skill
1 parent 6b1395b commit 1da5bbe

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.claude/skills/setup-component/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,4 @@ Run `yarn install` to link the new package in the workspace.
9898
- **Feature flag**: The main element class MUST include `static get experimental() { return true; }`. This makes the component require `window.Vaadin.featureFlags.{camelName}Component = true` before it can be used. See `packages/badge/src/vaadin-badge.js` for the pattern. The feature flag name is auto-generated from the tag name by `defineCustomElement()` in `@vaadin/component-base/src/define.js`.
9999
- **README warning**: The README.md must include a warning: `> ⚠️ This component is experimental and the API may change. In order to use it, enable the feature flag by setting \`window.Vaadin.featureFlags.{camelName}Component = true\`.`
100100
- **Dev page**: The dev page must enable the feature flag between `common.js` and the component import, matching `dev/badge.html` exactly: first `<script type="module" src="./common.js"></script>`, then `<script>window.Vaadin ??= {}; window.Vaadin.featureFlags ??= {}; window.Vaadin.featureFlags.{camelName}Component = true;</script>`, then the component import.
101+
- **Test files**: ALL test files (unit, DOM snapshot, visual base/lumo/aura) must enable the feature flag after imports, matching `packages/badge/test/badge.test.ts`: `window.Vaadin ??= {}; window.Vaadin.featureFlags ??= {}; window.Vaadin.featureFlags.{camelName}Component = true;`

0 commit comments

Comments
 (0)