Skip to content

Commit 8172c20

Browse files
authored
Merge branch 'main' into isAssignmentOperation
2 parents 53d3843 + 7d985ce commit 8172c20

24 files changed

Lines changed: 215 additions & 103 deletions

File tree

adev/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"@algolia/requester-browser-xhr": "5.46.2",
66
"@algolia/requester-node-http": "5.46.2",
77
"@angular/animations": "workspace:*",
8-
"@angular/aria": "21.1.0-next.3",
8+
"@angular/aria": "21.1.0-next.4",
99
"@angular/build": "21.1.0-rc.0",
10-
"@angular/cdk": "21.1.0-next.3",
10+
"@angular/cdk": "21.1.0-next.4",
1111
"@angular/cli": "21.1.0-rc.0",
1212
"@angular/common": "workspace:*",
1313
"@angular/compiler": "workspace:*",
1414
"@angular/compiler-cli": "workspace:*",
1515
"@angular/core": "workspace:*",
1616
"@angular/docs": "workspace:*",
1717
"@angular/forms": "workspace:*",
18-
"@angular/material": "21.1.0-next.3",
18+
"@angular/material": "21.1.0-next.4",
1919
"@angular/platform-browser": "workspace:*",
2020
"@angular/platform-server": "workspace:*",
2121
"@angular/router": "workspace:*",

adev/shared-docs/services/search.service.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,23 @@ export class Search {
105105
const content = hitItem._snippetResult.content;
106106
const hierarchy = hitItem._snippetResult.hierarchy;
107107
const category = hitItem.hierarchy?.lvl0 ?? null;
108-
const hasSubLabel = hierarchy?.lvl2 || hierarchy?.lvl3 || hierarchy?.lvl4;
108+
109+
const lvl1Value = hierarchy?.lvl1?.value || hitItem.hierarchy?.lvl1;
110+
111+
const sublabelSnippet = this.getBestSnippetForMatch(hitItem);
112+
113+
// If no lvl1, promote sublabel to label to avoid empty titles
114+
const label = lvl1Value || sublabelSnippet || '';
115+
116+
const hasSubLabel = lvl1Value && (hierarchy?.lvl2 || hierarchy?.lvl3 || hierarchy?.lvl4);
109117

110118
return {
111119
id: hitItem.objectID,
112120
type: hitItem.hierarchy.lvl0 === 'Tutorials' ? 'code' : 'doc',
113121
url: hitItem.url,
114122

115-
labelHtml: this.parseLabelToHtml(hitItem._snippetResult.hierarchy?.lvl1?.value ?? ''),
116-
subLabelHtml: this.parseLabelToHtml(
117-
hasSubLabel ? this.getBestSnippetForMatch(hitItem) : null,
118-
),
123+
labelHtml: this.parseLabelToHtml(label),
124+
subLabelHtml: this.parseLabelToHtml(hasSubLabel ? sublabelSnippet : null),
119125
contentHtml: content ? this.parseLabelToHtml(content.value) : null,
120126
package: category === 'Reference' ? extractPackageNameFromUrl(hitItem.url) : null,
121127

adev/src/content/ai/mcp-server-setup.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ Some tools are provided in experimental / preview status since they are new or n
2222
| Name | Description | `local-only` | `read-only` |
2323
| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------: | :---------: |
2424
| `build` | Perform a one-off, non-watched build using `ng build`. |||
25-
| `modernize` | Performs code migrations and provides further instructions on how to modernize Angular code to align with the latest best practices and syntax. [Learn more](/reference/migrations) |||
2625
| `devserver.start` | Asynchronously starts a development server that watches the workspace for changes, similar to running `ng serve`. Since this is asynchronous it returns immediately. To manage the resulting server, use the `devserver.stop` and `devserver.wait_for_build` tools. |||
2726
| `devserver.stop` | Stops a development server started by `devserver.start`. |||
2827
| `devserver.wait_for_build` | Returns the output logs of the most recent build in a running development server started by `devserver.start`. If a build is currently ongoing, it will first wait for that build to complete and then return the logs. |||
28+
| `e2e` | Executes the end-to-end tests configured in the project. |||
29+
| `modernize` | Performs code migrations and provides further instructions on how to modernize Angular code to align with the latest best practices and syntax. [Learn more](https://angular.dev/reference/migrations) |||
30+
| `test` | Runs the project's unit tests. |||
2931

3032
## Get Started
3133

@@ -133,11 +135,11 @@ For other IDEs, check your IDE's documentation for the proper location of the MC
133135

134136
The `mcp` command can be configured with the following options passed as arguments in your IDE's MCP configuration:
135137

136-
| Option | Type | Description | Default |
137-
| :---------------------------- | :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
138-
| `--read-only` | `boolean` | Only register tools that do not make changes to the project. Your editor or coding agent may still perform edits. | `false` |
139-
| `--local-only` | `boolean` | Only register tools that do not require an internet connection. Your editor or coding agent may still send data over the network. | `false` |
140-
| `--experimental-tool`<br>`-E` | `string` | Enable an [experimental tool](#experimental-tools). Separate multiple options by spaces, e.g. `-E tool_a tool_b`. You can also enable tool groups like `devserver` to enable all related tools at once, e.g. `-E devserver`. | |
138+
| Option | Type | Description | Default |
139+
| :---------------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------ |
140+
| `--read-only` | `boolean` | Only register tools that do not make changes to the project. Your editor or coding agent may still perform edits. | `false` |
141+
| `--local-only` | `boolean` | Only register tools that do not require an internet connection. Your editor or coding agent may still send data over the network. | `false` |
142+
| `--experimental-tool`<br>`-E` | `string` | Enable an [experimental tool](#experimental-tools). Separate multiple options by spaces, e.g. `-E tool_a tool_b`. Enable all `devserver.x` tools by using `-E devserver`. | |
141143

142144
For example, to run the server in read-only mode in VS Code, you would update your `mcp.json` like this:
143145

adev/src/content/guide/forms/signals/field-state-management.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ When checking validity in code, use `invalid()` instead of `!valid()` if you wan
109109

110110
Access the array of validation errors with `errors()`. Each error object contains:
111111

112-
| Property | Description |
113-
| --------- | --------------------------------------------------------------- |
114-
| `kind` | The validation rule that failed (such as "required" or "email") |
115-
| `message` | Optional human-readable error message |
116-
| `field` | Reference to the `FieldTree` where the error occurred |
112+
| Property | Description |
113+
| ----------- | --------------------------------------------------------------- |
114+
| `kind` | The validation rule that failed (such as "required" or "email") |
115+
| `message` | Optional human-readable error message |
116+
| `fieldTree` | Reference to the `FieldTree` where the error occurred |
117117

118118
NOTE: The `message` property is optional. Validators can provide custom error messages, but if not specified, you may need to map error `kind` values to your own messages.
119119

adev/src/content/guide/forms/signals/validation.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,19 @@ export class UrlFormComponent {
461461
}
462462
```
463463

464+
For submission errors that target specific fields, use the `fieldTree` property:
465+
466+
```ts
467+
// In a submit function
468+
return [
469+
{
470+
fieldTree: registrationForm.username, // Target specific field
471+
kind: 'server',
472+
message: 'Username already taken',
473+
},
474+
];
475+
```
476+
464477
The validator function receives a `FieldContext` object with:
465478

466479
| Property | Type | Description |

adev/src/content/guide/templates/expression-syntax.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ Angular supports a subset of [literal values](https://developer.mozilla.org/en-U
88

99
### Supported value literals
1010

11-
| Literal type | Example values |
12-
| --------------- | ------------------------------- |
13-
| String | `'Hello'`, `"World"` |
14-
| Boolean | `true`, `false` |
15-
| Number | `123`, `3.14` |
16-
| Object | `{name: 'Alice'}` |
17-
| Array | `['Onion', 'Cheese', 'Garlic']` |
18-
| null | `null` |
19-
| Template string | `` `Hello ${name}` `` |
20-
| RegExp | `/\d+/` |
11+
| Literal type | Example values |
12+
| ---------------------- | ------------------------------- |
13+
| String | `'Hello'`, `"World"` |
14+
| Boolean | `true`, `false` |
15+
| Number | `123`, `3.14` |
16+
| Object | `{name: 'Alice'}` |
17+
| Array | `['Onion', 'Cheese', 'Garlic']` |
18+
| null | `null` |
19+
| RegExp | `/\d+/` |
20+
| Template string | `` `Hello ${name}` `` |
21+
| Tagged template string | `` tag`Hello ${name}` `` |
2122

2223
### Unsupported value literals
2324

@@ -64,6 +65,9 @@ Angular supports the following operators from standard JavaScript.
6465
| Unary Negation | `-x` |
6566
| Unary Plus | `+y` |
6667
| Property Accessor | `person['name']` |
68+
| typeof | `typeof 42` |
69+
| void | `void 1` |
70+
| in | `'model' in car` |
6771
| Assignment | `a = b` |
6872
| Addition Assignment | `a += b` |
6973
| Subtraction Assignment | `a -= b` |
@@ -74,6 +78,9 @@ Angular supports the following operators from standard JavaScript.
7478
| Logical AND Assignment | `a &&= b` |
7579
| Logical OR Assignment | `a \|\|= b` |
7680
| Nullish Coalescing Assignment | `a ??= b` |
81+
| Spread in object literals | `{...obj, foo: 'bar'}` |
82+
| Spread in array literals | `[...arr, 1, 2, 3]` |
83+
| Rest in function calls | `fn(...args)` |
7784

7885
Angular expressions additionally also support the following non-standard operators:
7986

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-explorer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export class DirectiveExplorerComponent {
349349
const selectedFrame = this._frameManager.selectedFrame();
350350

351351
if (!this._frameManager.activeFrameHasUniqueUrl()) {
352-
const error = `The currently inspected frame does not have a unique url on this page. Cannot inspect object.`;
352+
const error = `The currently inspected frame does not have a unique URL on this page. Cannot inspect object.`;
353353
this.snackBar.open(error, 'Dismiss', {duration: 5000, horizontalPosition: 'left'});
354354
this._messageBus.emit('log', [{level: 'warn', message: error}]);
355355
return;

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-explorer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ describe('DirectiveExplorerComponent', () => {
356356
expect(messageBusMock.emit).toHaveBeenCalledWith('log', [
357357
{
358358
level: 'warn',
359-
message: `The currently inspected frame does not have a unique url on this page. Cannot inspect object.`,
359+
message: `The currently inspected frame does not have a unique URL on this page. Cannot inspect object.`,
360360
},
361361
]);
362362
});

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/property-view-body/property-view-body.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export class PropertyViewBodyComponent {
109109
this.controller().logValue(node);
110110
this._snackBar.open(`Logged value of '${node.prop.name}' to the console`, 'Dismiss', {
111111
duration: 2000,
112+
horizontalPosition: 'left',
112113
});
113114
}
114115

devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/profiler-import-dialog/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ package(default_visibility = ["//devtools:__subpackages__"])
55
sass_binary(
66
name = "profiler-import-dialog_styles",
77
src = "profiler-import-dialog.component.scss",
8+
deps = [
9+
"//devtools/projects/ng-devtools/src/styles:typography",
10+
],
811
)
912

1013
ng_project(
@@ -19,5 +22,6 @@ ng_project(
1922
deps = [
2023
"//:node_modules/@angular/core",
2124
"//:node_modules/@angular/material",
25+
"//devtools/projects/ng-devtools/src/lib/shared/button",
2226
],
2327
)

0 commit comments

Comments
 (0)