From 591db2d87f579358fa82125ef2785b6e650943bb Mon Sep 17 00:00:00 2001 From: Isaque Santos Date: Thu, 10 Sep 2026 10:09:52 -0300 Subject: [PATCH 1/2] chore(webkit): wire the design-system toolkit into the repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run `npx @aziontech/webkit init` and keep the parts that fit an Astro repo which already consumes webkit 4.4.0. Kept: - `.stylelintrc.json` — stylelint was installed with no config at all. Adds `**/*.astro` to the postcss-html override, so the 41 Astro files are covered too (verified: it catches a hex inside an Astro ` +``` diff --git a/.claude/rules/webkit-testid.md b/.claude/rules/webkit-testid.md new file mode 100644 index 0000000000..3845a73703 --- /dev/null +++ b/.claude/rules/webkit-testid.md @@ -0,0 +1,80 @@ +# Rule: `data-testid` — derived name on the root, overridable + +Every webkit component root carries a **`data-testid`** derived from the component's own +name — **`-`**, or **`input-`** for input components (`input-chip`, +`content-badge`, `feedback-toast`, `data-table`). Your tests target that attribute instead +of inventing selectors, and you override it per instance by passing `data-testid` on the +tag. Components you author in this project follow the same pattern. This is a convention +enforced by review — no lint rule checks it, so apply it deliberately. + +## Do + +- Target components in tests via their derived `data-testid`, never via DOM structure or + internal classes. +- Override the testid per instance when a page renders more than one of the same + component: `