| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2fc8089 commit 30e94ab
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,8 +6,9 @@ description: >- | |||
| 6 | 6 | Triggers include /pf-align, "align component", "implement missing variations", | |
| 7 | 7 | "fix PFJ component", "apply pf-compare recommendations", "add missing PFJ | |
| 8 | 8 | variations", "sync with PatternFly", "bring component up to date", | |
| 9 | - "implement pf-compare action items", or any request to implement changes | ||
| 10 | - identified by a comparison report. | ||
| 9 | + "implement pf-compare action items", "implement comparison findings", | ||
| 10 | + "fix alignment issues", or any request to implement changes identified | ||
| 11 | + by a comparison report. | ||
| 11 | 12 | metadata: | |
| 12 | 13 | version: "0.1.0" | |
| 13 | 14 | --- | |
@@ -18,12 +19,7 @@ This skill implements action items from `/pf-compare` reports to align PatternFl | |||
| 18 | 19 | ||
| 19 | 20 | ## Tools | |
| 20 | 21 | ||
| 21 | - ### Chrome DevTools MCP (require approval on first use) | ||
| 22 | - | ||
| 23 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__new_page** — Open new browser tabs | ||
| 24 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__select_page** — Switch between tabs | ||
| 25 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__evaluate_script** — Run JS in the page context | ||
| 26 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__close_page** — Close browser tabs | ||
| 22 | + Uses Chrome DevTools MCP tools for browser interaction (new_page, select_page, evaluate_script, close_page). Requires approval on first use. | ||
| 27 | 23 | ||
| 28 | 24 | ## Arguments | |
| 29 | 25 | ||
@@ -33,7 +29,7 @@ This skill implements action items from `/pf-compare` reports to align PatternFl | |||
| 33 | 29 | ||
| 34 | 30 | **Parameters:** | |
| 35 | 31 | - `<component>` (required) — Component name matching report file (e.g., `button`, `card`, `alert`). **Reject `template`** — it is a blueprint component, not a real UI component. | |
| 36 | - - `--port <port>` (optional) — Showcase server port (default: 8888) | ||
| 32 | + - `--port <port>` (optional) — Showcase server port (default: 1234) | ||
| 37 | 33 | - `--item <number>` (optional) — Process only the specified action item number (default: process all) | |
| 38 | 34 | ||
| 39 | 35 | **Examples:** | |
@@ -48,7 +44,7 @@ This skill implements action items from `/pf-compare` reports to align PatternFl | |||
| 48 | 44 | ### Step 1: Pre-flight Checks | |
| 49 | 45 | ||
| 50 | 46 | **Parse arguments:** | |
| 51 | - - Extract component name, port (default 8888), item filter | ||
| 47 | + - Extract component name, port (default 1234), item filter | ||
| 52 | 48 | - Validate component name is not empty | |
| 53 | 49 | ||
| 54 | 50 | **Check report exists:** | |
@@ -77,7 +73,7 @@ Read docs/pf-compare/<COMPONENT>.md | |||
| 77 | 73 | ```yaml | |
| 78 | 74 | component: button | |
| 79 | 75 | pf_url: https://www.patternfly.org/components/button | |
| 80 | - pfj_url: http://localhost:8888/#button | ||
| 76 | + pfj_url: http://localhost:1234/#button | ||
| 81 | 77 | completeness: | |
| 82 | 78 | missing_in_pfj: [...] | |
| 83 | 79 | extra_in_pfj: [...] | |
@@ -188,7 +184,7 @@ Examples: | |||
| 188 | 184 | - "Call to action" → "call-to-action" | |
| 189 | 185 | - "Stateful toggle" → "stateful-toggle" | |
| 190 | 186 | ||
| 191 | - **Extract HTML:** Read the script from `references/extract-variation-html.js` and pass it to `evaluate_script` with `args: [<component>, <variation-slug>]`. | ||
| 187 | + **Extract HTML:** Read the script from `references/extract-variation-html.js`. The script is an arrow function `(componentSlug, variationSlug) => { ... }`. Pass the function body to `evaluate_script` using the `function` parameter and provide `args: [<component>, <variation-slug>]` — the Chrome DevTools MCP `evaluate_script` tool invokes the function with the args array as positional arguments. | ||
| 192 | 188 | ||
| 193 | 189 | **Handle extraction failure:** | |
| 194 | 190 | - If HTML is null → ERROR (HTML extraction failed) | |
@@ -201,14 +197,14 @@ Examples: | |||
| 201 | 197 | ||
| 202 | 198 | ### Step 6: Generate Code | |
| 203 | 199 | ||
| 200 | + **IMPORTANT: Read `references/code-generation.md` before generating any code.** Find the insertion pattern matching the item type (`add_variation`, `fix_css`, `fix_structure`, `fix_attribute`) and apply the corresponding template. Use the HTML-to-Java translation table from the same file. | ||
| 201 | + | ||
| 204 | 202 | **Pre-check implementation:** | |
| 205 | 203 | - For `add_variation`: Check if snippet ID exists in showcase file | |
| 206 | 204 | - For `fix_css`: Check if modifier method exists in component class | |
| 207 | 205 | - For `fix_attribute`: Check if ARIA method exists in component class | |
| 208 | 206 | - If already implemented → Skip with message | |
| 209 | 207 | ||
| 210 | - **IMPORTANT: Read `references/code-generation.md` before generating any code.** Find the insertion pattern matching the item type (`add_variation`, `fix_css`, `fix_structure`, `fix_attribute`) and apply the corresponding template. Use the HTML-to-Java translation table from the same file. | ||
| 211 | - | ||
| 212 | 208 | **For all types:** | |
| 213 | 209 | - Preserve existing imports | |
| 214 | 210 | - Add new imports if needed (e.g., `import static org.patternfly.style.Classes.*`) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,8 +6,8 @@ description: >- | |||
| 6 | 6 | "compare PF component", "check PFJ completeness", "compare button component", | |
| 7 | 7 | "what's missing in the Java card", "gap analysis for alert", | |
| 8 | 8 | "generate comparison report for tabs", "find missing PF variations", | |
| 9 | - or any request to identify variation coverage gaps or DOM/CSS differences | ||
| 10 | - between PatternFly and PatternFly Java. | ||
| 9 | + "coverage report", "DOM differences", or any request to identify variation | ||
| 10 | + coverage gaps or DOM/CSS differences between PatternFly and PatternFly Java. | ||
| 11 | 11 | metadata: | |
| 12 | 12 | version: "0.1.0" | |
| 13 | 13 | --- | |
@@ -18,15 +18,7 @@ Compares a PatternFly (React/HTML) component against its PatternFly Java impleme | |||
| 18 | 18 | ||
| 19 | 19 | ## Tools | |
| 20 | 20 | ||
| 21 | - ### Chrome DevTools MCP (require approval on first use) | ||
| 22 | - | ||
| 23 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__navigate_page** — Navigate browser tabs | ||
| 24 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__new_page** — Open new browser tabs | ||
| 25 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__select_page** — Switch between tabs | ||
| 26 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__evaluate_script** — Run JS in the page context | ||
| 27 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__close_page** — Close browser tabs | ||
| 28 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__list_pages** — List open browser tabs | ||
| 29 | - - **mcp__plugin_chrome-devtools-mcp_chrome-devtools__take_snapshot** — Capture page accessibility snapshots | ||
| 21 | + Uses Chrome DevTools MCP tools for browser interaction (navigate_page, new_page, select_page, evaluate_script, close_page, list_pages, take_snapshot). Requires approval on first use. | ||
| 30 | 22 | ||
| 31 | 23 | ## Arguments | |
| 32 | 24 | ||
@@ -199,7 +191,7 @@ For sample report output, see `examples/button.md` and `examples/card.md`. | |||
| 199 | 191 | ## Error Handling | |
| 200 | 192 | ||
| 201 | 193 | - **Component not found**: If curl returns non-200 for both PFJ URLs, report clearly and suggest checking the component slug or starting the dev server. | |
| 202 | - - **No variations extracted**: If PF or PFJ returns zero variations/snippets, warn the user that the page structure may have changed and the JS selectors may need updating. | ||
| 194 | + - **No variations extracted**: If PF or PFJ returns zero variations/snippets, warn the user that the page structure may have changed and the JS selectors may need updating. Empty PFJ results are most commonly caused by DOM structure changes in the showcase layout, not by missing components — check `references/extract-pfj-snippets.js` for the expected DOM traversal. | ||
| 203 | 195 | - **Chrome DevTools unavailable**: If MCP tools fail, report the error and suggest ensuring Chrome is running with DevTools MCP connected. | |
| 204 | 196 | - **Partial data**: If only some comparisons succeed, still produce the report with available data and note which comparisons failed. | |
| 205 | 197 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments