-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Plan: Ignite UI for React — Dedicated Skills
Background & Rationale
The WC skills were written for a framework-agnostic library. The React library (igniteui-react) is a layer of React wrappers over those web components, with different package names, component prefixes (Igr* vs Igc*), prop/event conventions, and React-specific usage patterns. Sharing the WC skills means developers get framework-agnostic or even wrong guidance. The React skills should be self-contained, committed into igniteui-react, and discoverable by Copilot/Cursor/Claude Code.
Directory Structure to Create
skills/
├── README.md
├── igniteui-react-choose-components/
│ └── SKILL.md
├── igniteui-react-use-components/
│ └── SKILL.md
├── igniteui-react-customize-theme/
│ └── SKILL.md
└── igniteui-react-optimize-bundle-size/
└── SKILL.md
Skills to Author
1. igniteui-react-choose-components
Maps from WC: igniteui-wc-choose-components — adapted, not shared.
The agent should produce a skill that:
- Lists all available React components with their
Igr*names (e.g.IgrButton,IgrGrid,IgrCalendar) and maps them to the UI pattern they serve - Points to the React-specific documentation at
https://infragistics.com/reactsite/components/and the React Storybook/samples athttps://github.com/IgniteUI/igniteui-react-examples - Covers which sub-package each component lives in (
igniteui-reactfor core UI components,igniteui-react-gridsfor grids,igniteui-react-chartsfor charts, etc.) - Explains how to search docs when unsure, using React component naming conventions
Key difference from WC skill: no references to igc-* tags or custom element registration. No defineComponents() calls.
2. igniteui-react-use-components (New — no direct WC counterpart)
This is the most React-specific skill and has no real equivalent in the WC set (the WC "integrate-with-framework" skill touched on React as one of four frameworks). This new skill should cover:
- Installation & setup: Installing
igniteui-react(or sub-packages), addingIgrStylesor the theming stylesheet toindex.tsx/App.tsx, and any peer dependency notes - JSX usage patterns: Component props vs HTML attributes (
value={...}notvalue="..."), boolean props, children vs slots - Event handling: React's synthetic event system vs the WC custom events — how
onXxxprops work on the React wrappers and how to handle them with TypeScript types - Refs: Using
useRefto access the underlying web component imperative API when needed - Controlled vs uncontrolled components: How to wire up form components (
IgrInput,IgrCheckbox,IgrSelect) withuseStateor React Hook Form - TypeScript: Using the provided
Igr*prop type interfaces
3. igniteui-react-customize-theme
Maps from WC: igniteui-wc-customize-component-theme — adapted.
- CSS custom properties work identically to WC, but the skill should explain how to apply them in a React context (in
index.css, a CSS module, or via inline style on a wrapperdiv) - CSS
::part()selectors — same underlying shadow DOM, but may need context on how to structure this in a React app configureTheme()— calling the theming function in React's lifecycle (e.g. in auseEffectat app root, or inmain.tsxbeforeReactDOM.createRoot)- Component-level theme isolation — using CSS custom properties scoped to a container class
- Remove all WC-specific content like
LitElementorigc-theme-*attribute examples
4. igniteui-react-optimize-bundle-size
Maps from WC: igniteui-wc-optimize-bundle-size — substantially rewritten.
- Granular package imports:
igniteui-react(core UI),igniteui-react-grids,igniteui-react-charts,igniteui-react-maps,igniteui-react-gauges— install only what you need - Named imports only: Import specific components rather than barrel/wildcard imports to enable tree-shaking
- Lazy loading with
React.lazy+Suspense: Code-split heavy components like grids and charts behind route-level lazy imports - Avoid
defineAllComponents()(the React layer doesn't use this, but the underlying WC might be invoked — clarify that the React wrappers handle registration automatically per-component) - Bundle analysis:
webpack-bundle-analyzeror Vite'srollup-plugin-visualizerto identify which sub-packages are included and measure impact
skills/README.md
The agent should write a README modelled on the WC one, with a table of all four skills and their use-when descriptions, plus setup instructions for:
- GitHub Copilot (via
.github/copilot-instructions.md) - Cursor (
.cursorrules) - Claude Code/Desktop (
CLAUDE.mdproject instructions) - VS Code / JetBrains manual attachment
Execution Instructions for the Agent
- Fetch and read the four existing WC SKILL.md files from
https://github.com/IgniteUI/igniteui-webcomponents/tree/master/skillsto use as structural templates - Fetch the React docs at
https://infragistics.com/reactsite/components/and scan theigniteui-reactnpm package README to extract accurate component names, sub-package structure, and install instructions - Author each SKILL.md following the same section structure as the WC skills (Example Usage → When to Use → Related Skills → Step-by-Step Instructions → Common Issues → Best Practices → Additional Resources)
- All component names, package names, and import paths must be verified against the actual
igniteui-reactpackage — do not copy WC (Igc*/igc-*) identifiers directly - Write
skills/README.mdwith the full skill table and editor setup instructions - Open a PR against the
masterbranch ofigniteui-reactwith the titlefeat(skills): add React-specific LLM agent skills
What NOT to Do
- Do not simply copy-paste the WC skills and do a find-replace of
wc → react— each skill needs genuine React-specific content - Do not include the
igniteui-wc-integrate-with-frameworkskill at all — React is the only target, so a dedicated setup section insideigniteui-react-use-componentsis sufficient - Do not reference
defineComponents(),IgcComponentnames, or custom element HTML tags (<igc-*>) in any skill — those are WC internals