Skip to content

Commit 32a5166

Browse files
committed
Merge branch 'staging/pfv6' into feat/v6-avatar
2 parents 7c1346f + 8fedd86 commit 32a5166

3 files changed

Lines changed: 86 additions & 6 deletions

File tree

.claude/skills/create-element/SKILL.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,43 @@ Write all tests from scratch:
274274

275275
See `.claude/skills/review-api/SKILL.md` Phase 4 for full test checklist.
276276

277-
### Phase 8: Audit
277+
### Phase 8: Write README
278+
279+
Create `elements/pf-v6-{name}/README.md` documenting divergences from
280+
the React component API. Structure:
281+
282+
1. **Title and summary** -- element tag, one-line description
283+
2. **Usage** -- 2-3 HTML snippets showing common patterns
284+
3. **Divergences from React `{Name}`** -- three tables:
285+
286+
#### "Not implemented" table (2 columns: React prop | Notes)
287+
React props with no web component equivalent and no workaround.
288+
Only truly absent features belong here.
289+
290+
#### "Changed API" table (3 columns: React prop | Web component | Difference)
291+
React props that have a web component equivalent but with different API shape.
292+
Include props where:
293+
- Name changed (e.g. `enableFlip` -> `no-flip`)
294+
- Type changed (e.g. boolean -> enum, prop -> CSS custom property)
295+
- Mechanism changed (e.g. callback -> DOM event, declarative -> imperative)
296+
- Not configurable but has a fixed internal value (note "Not supported" or
297+
"Hardcoded to X")
298+
299+
**Omit** props that map 1:1 as camelCase properties with dash-case attributes
300+
and identical semantics (e.g. React `entryDelay` -> attribute `entry-delay`).
301+
These are standard web component conventions, not divergences.
302+
303+
#### "Added" table (2 columns: Web component API | Notes)
304+
Web-component-only APIs not present in React (events, methods, slots, CSS
305+
custom properties).
306+
307+
**Accuracy rule:** verify each claim against the actual CSS and TS source.
308+
Don't claim CSS properties on the host affect shadow DOM internals. Check
309+
whether values are actually configurable or hardcoded.
310+
311+
See `elements/pf-v6-tooltip/README.md` for a reference example.
312+
313+
### Phase 9: Audit
278314

279315
Prompt the user to activate /review-api, /review-demos, and /review-a11y
280316

.claude/skills/review-api/SKILL.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Read `.claude/ADVICE.md` for reference rules.
106106
- [ ] `static styles = [styles]` array form?
107107
- [ ] Controllers for cross-cutting concerns?
108108
- [ ] `isServer` guards on browser-only APIs?
109+
- [ ] Quoting attribute values in Lit templates `src="{$this.src}"`?
109110

110111
#### Lint
111112
```bash
@@ -124,13 +125,16 @@ npx stylelint elements/pf-v6-{name}/**/*.css
124125
- [ ] No arrow functions in test blocks?
125126
- [ ] Behavioral expectations from React tests covered?
126127

127-
### Phase 5: JSDoc
128+
### Phase 5: JSDoc and cem documentation comments
128129

129130
- [ ] `@summary` present on element class?
130131
- [ ] All public properties/methods have `/** */` JSDoc (not `//` comments)?
131-
- [ ] `@cssprop` with CSS data types: `@cssprop {color} --pf-v6-c-button--Color`?
132-
- [ ] `@csspart` for all exposed parts?
133-
- [ ] `@slot` for all slots (prescriptive descriptions)?
132+
- [ ] CSS custom properties documented with `/** */` comments in the CSS file,
133+
co-located with the declaration or `var()` reference?
134+
- [ ] CSS parts documented with `<!-- summary: ... -->` HTML comments before the
135+
`part="..."` element in the template?
136+
- [ ] Slots documented with `<!-- summary: ... -->` HTML comments before the `<slot>`
137+
element in the template?
134138
- [ ] `@fires` for all dispatched events?
135139
- [ ] No unnecessary `@default` tags (analyzer picks up initializers)?
136140

.claude/skills/update-element/SKILL.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,47 @@ Update existing tests -- don't rewrite from scratch:
255255

256256
See `.claude/skills/review-api/SKILL.md` Phase 4 for full test checklist.
257257

258-
### Phase 8: Audit
258+
### Phase 8: Write README
259+
260+
Create `elements/pf-v6-{name}/README.md` documenting divergences from
261+
the React component API. Structure:
262+
263+
1. **Title and summary** -- element tag, one-line description
264+
2. **Usage** -- 2-3 HTML snippets showing common patterns
265+
3. **Divergences from React `{Name}`** -- three tables:
266+
267+
#### "Not implemented" table (2 columns: React prop | Notes)
268+
React props with no web component equivalent and no workaround.
269+
Only truly absent features belong here.
270+
271+
#### "Changed API" table (3 columns: React prop | Web component | Difference)
272+
React props that have a web component equivalent but with different API shape.
273+
Include props where:
274+
- Name changed (e.g. `enableFlip` -> `no-flip`)
275+
- Type changed (e.g. boolean -> enum, prop -> CSS custom property)
276+
- Mechanism changed (e.g. callback -> DOM event, declarative -> imperative)
277+
- Not configurable but has a fixed internal value (note "Not supported" or
278+
"Hardcoded to X")
279+
280+
**Omit** props that map 1:1 as camelCase properties with dash-case attributes
281+
and identical semantics (e.g. React `entryDelay` -> attribute `entry-delay`).
282+
These are standard web component conventions, not divergences.
283+
284+
#### "Added" table (2 columns: Web component API | Notes)
285+
Web-component-only APIs not present in React (events, methods, slots, CSS
286+
custom properties).
287+
288+
**Accuracy rule:** verify each claim against the actual CSS and TS source.
289+
Don't claim CSS properties on the host affect shadow DOM internals. Check
290+
whether values are actually configurable or hardcoded.
291+
292+
See `elements/pf-v6-tooltip/README.md` for a reference example.
293+
294+
### Phase 9: Delete v5 element
295+
296+
Delete the directory and it's contents from ./elements/`pf-v5-{name}`. replace all references to `pf-v5-{name}`, except historical changelogs, and update their usage to conform to new APIs. This includes demos for v6 elements which use v5 dependencies.
297+
298+
### Phase 10: Audit
259299

260300
Prompt the user to activate /review-api, /review-demos, and /review-a11y
261301

0 commit comments

Comments
 (0)