Skip to content

Commit c75f904

Browse files
authored
Merge pull request #1952 from IgniteUI/sstoychev/mcp-angular-specific-content
fix(theming-mcp): adding angular specific content for sst
2 parents 2b1a8ec + 331d90d commit c75f904

File tree

1 file changed

+68
-2
lines changed

1 file changed

+68
-2
lines changed

doc/en/components/ai/theming-mcp.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ npx -y igniteui-theming igniteui-theming-mcp
5757
> [!NOTE]
5858
> The `-y` flag tells `npx` to auto-confirm the package download prompt so the server can start without manual intervention.
5959
60+
<!-- Angular -->
61+
### How version resolution works
62+
63+
Because `igniteui-theming` is a dependency of `igniteui-angular`, it is already present in your `node_modules` after `npm install`. When you run the launch command above, `npx` detects the locally installed copy and runs it directly — no network request is made. This means the MCP server version always stays in sync with the rest of your Ignite UI packages.
64+
65+
If you run the command outside a project (or before running `npm install`), `npx -y` downloads the **latest** version from npm into a temporary cache instead. The server will still start, but `detect_platform` will return `generic` since there is no `package.json` to inspect.
66+
67+
Choose your AI client below for the specific configuration steps.
68+
<!-- end: Angular -->
69+
6070
### VS Code
6171

6272
GitHub Copilot in VS Code supports MCP servers through a workspace-level configuration file. Create or edit `.vscode/mcp.json` in your project root:
@@ -245,6 +255,11 @@ Here is a brief overview of each tool:
245255
> [!NOTE]
246256
> For compound components (e.g., `combo`, `select`, `grid`), `get_component_design_tokens` returns a list of related child themes instead of a flat token list. For example, querying `grid` may return child themes such as `grid`, `grid-toolbar`, `grid-filtering`, and `paginator`. The AI will generate a separate `create_component_theme` call for each child theme using the appropriate scoped selector.
247257
258+
<!-- Angular -->
259+
> [!NOTE]
260+
> If your project uses the licensed `@infragistics/igniteui-angular` package, tell the AI so it can set the `licensed` parameter on palette, theme, and component tools. This adjusts the generated import paths accordingly.
261+
<!-- end: Angular -->
262+
248263
## Example Scenarios
249264

250265
The following scenarios show what you can ask the AI to do once the MCP server is connected.
@@ -255,6 +270,29 @@ The following scenarios show what you can ask the AI to do once the MCP server i
255270
256271
The AI will call `create_theme` and return a ready-to-use `styles.scss` file. The generated output will look similar to this:
257272

273+
<!-- Angular -->
274+
```scss
275+
/* styles.scss */
276+
@use 'igniteui-angular/theming' as *;
277+
278+
$my-palette: palette(
279+
$primary: #2563eb,
280+
$secondary: #f97316,
281+
$surface: #fff,
282+
$gray: #9e9e9e,
283+
);
284+
285+
$my-typography: typography(
286+
$font-family: 'Roboto, sans-serif',
287+
);
288+
289+
@include core();
290+
@include typography($my-typography);
291+
@include theme($my-palette, $schema: $light-material-schema);
292+
```
293+
<!-- end: Angular -->
294+
295+
<!-- React, WebComponents -->
258296
```scss
259297
/* styles.scss */
260298
@use 'igniteui-theming' as *;
@@ -274,6 +312,7 @@ $my-palette: palette(
274312
$type-scale: $material-type-scale
275313
);
276314
```
315+
<!-- end: React, WebComponents -->
277316

278317
### Dark Mode Variant
279318

@@ -283,7 +322,7 @@ $my-palette: palette(
283322

284323
> _"Our design system specifies exact hex values for all 14 shades of our primary green. I'll paste the values — create a custom palette."_
285324
286-
The AI will call `create_custom_palette` with `mode: "explicit"` for the primary color and auto-generate the rest.
325+
The AI will call `create_custom_palette` with `mode: "explicit"` for the primary color and auto-generate the rest.<!-- Angular --> See [Palettes](https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass/palettes) for more detail on shade generation.<!-- end: Angular-->
287326

288327
### Component-Level Customization
289328

@@ -301,7 +340,7 @@ The AI will call `set_spacing` scoped to the calendar component and `set_size` a
301340

302341
**Platform not detected**
303342

304-
If `detect_platform` returns `null` or `generic`, make sure your `package.json` lists an Ignite UI package (e.g., `igniteui-react`) as a dependency. You can also tell the AI explicitly: _"Use {ProductName}."_
343+
If `detect_platform` returns `null` or `generic`, make sure your `package.json` lists an Ignite UI package (e.g., `{PackageCommon}`) as a dependency. You can also tell the AI explicitly: _"Use the {Platform} platform."_
305344

306345
**Luminance warning on colors**
307346

@@ -311,9 +350,36 @@ If the AI warns about color luminance, it means the chosen color is too light or
311350

312351
For light themes use a light surface (e.g., `#fafafa`). For dark themes use a dark surface (e.g., `#121212`). Mismatched surface colors cause the AI to emit a warning.
313352

353+
<!-- Angular -->
354+
**Generated Sass does not compile**
355+
356+
Ensure `igniteui-angular` and `igniteui-theming` are installed:
357+
358+
```bash
359+
ng add igniteui-angular
360+
```
361+
362+
Also confirm that `core()` is called before any other theming mixin in your `styles.scss`. See [Theming with Sass](<a href="https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass/index">) for the correct file setup.
363+
<!-- end: Angular -->
364+
314365
## Additional Resources
315366

316367
- [{ProductName} Skills](./skills.md)
368+
369+
<!-- Ideally these should be included once documentation is combined
370+
- [Theming Overview](../themes/index.md)
371+
- [Palettes](../themes/palettes.md)
372+
- [Typography](../themes/typography.md)
373+
- [Elevations](../themes/elevations.md)
374+
- [Spacing](../themes/spacing.md)
375+
- [Roundness](../themes/roundness.md)
376+
- [Theming with Sass](../themes/sass/index.md)
377+
-->
378+
379+
<div class="divider--half"></div>
380+
381+
Our community is active and always welcoming to new ideas.
382+
317383
- [{ProductName} **Forums**]({ForumsLink})
318384
- [{ProductName} **GitHub**]({GithubLink})
319385

0 commit comments

Comments
 (0)