docs: update documentation to prefer get_example for working code s… - #191
Open
Marina-L-Stoyanova wants to merge 2 commits into
Open
docs: update documentation to prefer get_example for working code s…#191Marina-L-Stoyanova wants to merge 2 commits into
get_example for working code s…#191Marina-L-Stoyanova wants to merge 2 commits into
Conversation
…nippets over `get_doc`
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates multiple skill/reference documents to prefer the get_example MCP call (for runnable, working code snippets) over get_doc as the first-stop source when implementing or migrating Ignite UI React components.
Changes:
- Updates “look up docs” guidance to call
get_example('react', '<name>', { language: 'tsx' })first, withget_docas a fallback for deeper API details. - Aligns component discovery workflows and reference docs to emphasize examples for props/event handlers/structure.
- Extends the same guidance to chart/grid references and the Grid Lite → IgrGrid migration skill.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/igniteui-react-generate-from-image-design/SKILL.md | Updates the skill workflow to prefer get_example before get_doc. |
| skills/igniteui-react-generate-from-image-design/reference/component-mapping.md | Updates mapping reference guidance to prefer get_example for working code. |
| skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md | Updates component catalogue guidance to prefer get_example first and documents it in the tool list. |
| skills/igniteui-react-components/reference/CHARTS-GRIDS.md | Updates charts/grids reference to prefer get_example for runnable snippets. |
| skills/grid-lite-to-igr-grid-migration/SKILL.md | Updates migration protocol to prefer get_example for working code confirmation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| ## Overview | ||
| This reference gives high-level guidance on charts and grids, their key features, and common API members. For detailed documentation, call `get_doc` and `get_api_reference` from `igniteui-cli` with the specific chart, or grid component, or feature you're interested in. | ||
| This reference gives high-level guidance on charts and grids, their key features, and common API members. For working code examples (props, event handlers, component structure), prefer `get_example('react', '<name>')` — pass `language: 'tsx'` to reduce response size. For full documentation (prop tables, API details, feature explanations), call `get_doc` and `get_api_reference` from `igniteui-cli`. |
| ## Step 4: Look Up Component API | ||
|
|
||
| For every chosen component category, call `get_doc('react', '<name>')` using the doc `name` field from `list_components` results (e.g., `get_doc('react', 'card')`), not the result title shown in the list. This is mandatory before coding and gives exact React usage patterns, prop names, slot structure, event signatures, and any required module registration. | ||
| For every chosen component category, first call `get_example('react', '<name>', { language: 'tsx' })` using the doc `name` field from `list_components` results (e.g., `get_example('react', 'card', { language: 'tsx' })`). This returns a runnable snippet with exact props, slot structure, and event signatures faster than full docs. Only call `get_doc('react', '<name>')` when you need prop tables, feature explanations, or details not covered by the example. This is mandatory before coding and gives exact React usage patterns, prop names, slot structure, event signatures, and any required module registration. |
|
|
||
| 1. **Read the user's existing component files** to understand current Grid Lite usage (columns, templates, data binding, `dataPipelineConfiguration`). | ||
| 2. **Use the MCP server** — call `get_doc` or `search_docs` with `framework: "react"` to confirm API details when in doubt. | ||
| 2. **Use the MCP server** — for working code (props, event handlers, column config), call `get_example('react', '<name>', { language: 'tsx' })` first; call `get_doc` or `search_docs` with `framework: "react"` for full API details or when `get_example` isn't sufficient. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…nippets over
get_docCloses #
Additional information (check all that apply):
Checklist:
README.MDCHANGELOG.MDupdates for newly added functionality