35866 Commits

Author SHA1 Message Date
Matthieu Riegler f173acab69 ci: add Charles & Doug as optional adev reviewers
Since we also have tooling docs...

(cherry picked from commit c69b67147a)
2026-01-02 08:14:41 +01:00
Alan Agius 349b54351a docs: update flattened type definitions description to include rollup-plugin-dts.
(cherry picked from commit e11f02af81)
2026-01-02 08:14:09 +01:00
Shuaib Hasan Akib b9d7455d9c refactor(core): mark VERSION exports as pure for better tree-shaking
Adds a PURE annotation to VERSION constants, enabling tree-shaking
and keeping the implementation consistent with other pure exports.

(cherry picked from commit abb179466d)
2026-01-02 08:13:44 +01:00
Shuaib Hasan Akib d4799c1e82 docs: update Angular Package Format version references to latest
(cherry picked from commit 54a49ad9eb)
2026-01-02 08:12:50 +01:00
Alan Agius 901d66dbb7 build: correct markdown link syntax for commit hashes in changelog generation
The links were generated incorrectly

(cherry picked from commit 98bfd139ee)
2026-01-02 08:11:51 +01:00
SkyZeroZx 0aa5c7b815 refactor(core): remove unused Injector and Renderer2 dependencies from hydration functions
Removes the unsued `Injector` & `Renderer2` dependency from the hydration annotation process.

(cherry picked from commit 93fe833088)
2026-01-02 08:11:19 +01:00
SkyZeroZx 269799979f docs(docs-infra): adjust z-index to prevent adev tutorial nav overlapping sidebar
Updated the z-index hierarchy to avoid the adev tutorial navigation bar
overlapping the main sidebar.

(cherry picked from commit 59c1dcc662)
2026-01-02 08:10:57 +01:00
Leon Senft 85621f11e1 test(forms): add test coverage for binding errors to custon controls
This input was missing dedicated test coverage.

(cherry picked from commit e7745dc9dd)
2026-01-02 08:09:39 +01:00
Leon Senft 6d167bd64c test(forms): remove duplicate test case
We had two test cases that tested the `Field` directive synchronizes
with a custom checkbox control components.

(cherry picked from commit 8832fc01b2)
2026-01-02 08:09:39 +01:00
Leon Senft ec110f170b fix(forms): allow custom controls to require pending input
* Allow custom controls to make `pending` a required input
* Refactor test for `pending` input to be consistent with other control
  properties
* Test that `pending` inputs are reset when the field binding changes

(cherry picked from commit 1a4c3eb1d0)
2026-01-02 08:09:39 +01:00
Leon Senft 79d16919a5 test(forms): remove obsolete test case
There's no longer a need to test that inputs are set before
initialization on custom controls now that required inputs are
supported.

(cherry picked from commit 9ad603fa11)
2026-01-02 08:09:39 +01:00
Leon Senft 8c83266816 test(forms): refactor and improve test coverage for disabledReasons input
* Refactor test for `disabledReasons` input to be consistent with other control
  properties
* Test that `disabledReasons` inputs are reset when the field binding changes

(cherry picked from commit 4f73a350a5)
2026-01-02 08:09:39 +01:00
Leon Senft 561772b152 fix(forms): allow custom controls to require dirty input
* Allow custom controls to make `dirty` a required input
* Refactor test for `dirty` input to be consistent with other control
  properties
* Test that `dirty` inputs are reset when the field binding changes

(cherry picked from commit 89c37f1f7f)
2026-01-02 08:09:39 +01:00
Leon Senft 929306e658 test(forms): refactor and improve test coverage for invalid input
* Refactor test for `invalid` input to be consistent with other control
  properties
* Test that `invalid` inputs are reset when the field binding changes

(cherry picked from commit b563b5cfc2)
2026-01-02 08:09:39 +01:00
Leon Senft f0fb1d8581 fix(forms): allow custom controls to require hidden input
* Allow custom controls to make `hidden` a required input
* Refactor test for `hidden` input to be consistent with other control
  properties
* Test that `hidden` inputs are reset when the field binding changes

(cherry picked from commit 82edf18427)
2026-01-02 08:09:38 +01:00
Leon Senft 9748b0d5da fix(forms): support custom controls with non signal-based models
* Recognize directives with non signal-based models as valid custom controls
* Relax type checker to allow non signal-based models

The `FormValueControl` and `FormCheckboxControl` interfaces still
require a `model()`-input, however, a custom control need not implement
either interface to be bound by the `Field` directive.

All of the following examples can be used to define a custom control:

```ts
// Preferred: model()
class MyFormControl implements FormValueControl<string> {
  readonly value: model.required<string>();
}

// Supported: input() + output()
class MyFormControl {
  readonly value: input.required<string>();
  readonly valueChange: output<string>();
}

// Supported: @Input() + @Output()
class MyFormControl {
  @Input({required: true}) value!: string;
  @Output() valueChange: new EventEmitter<string>();
}
```

The latter two may still choose to implement `FormUiControl` for other
properties, but again it is not required.

Fix #65478

(cherry picked from commit cb09fb8308)
2026-01-02 08:09:07 +01:00
Leon Senft ab86c90c20 refactor(forms): always bind [field] to ControlValueAccessor if present
Change the order of precedence that `[field]` binds to from

  1. Custom control (`FormValueControl`, `FormCheckboxControl`)
  2. Interop control (`ControlValueAccessor`)
  3. Native control (`<input>`, `<select>`, `<textarea>`)

to

  1. Interop control (`ControlValueAccessor`)
  2. Custom control (`FormValueControl`, `FormCheckboxControl`)
  3. Native control (`<input>`, `<select>`, `<textarea>`)

This ensures that Reactive Forms controls authored to use
`ControlValueAccessor` work correctly with Signal Forms, even if they
happen to conform to the `FormValueControl` interface.

(cherry picked from commit 817e2b87a8)
2026-01-02 08:09:06 +01:00
SkyZeroZx ce7b1ab3b6 refactor(core): Add ngDevMode guards and new sanitization error codes
Adds new runtime sanitization error codes. Adds `ngDevMode` guards around
error message strings to ensure detailed diagnostics are included only
in development mode. This allows production builds to tree-shake verbose error descriptions, reducing bundle size.

(cherry picked from commit 4e7e38c591)
2026-01-02 08:08:25 +01:00
Angular Robot 069974a519 build: update dependency @angular/aria to v21.0.4
See associated pull request for more information.
2025-12-17 16:57:02 -08:00
Miles Malerba 59b3790031 refactor(forms): rename server errors to submission errors
This better reflects the intent to indicate an error during submission,
regardless of whether the error came from the server or not.

(cherry picked from commit 244b54c9bf)
2025-12-17 15:42:11 -08:00
Angular Robot 96dccc4e6f docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-17 15:40:54 -08:00
Andrew Seguin 0edbee4550 fix(core): explicitly cast signal node value to String
If the computed's `toString` is called and `node.value` is a Symbol, the browser will throw an exception `ERROR TypeError: Cannot convert a Symbol value to a string`

Symbols cannot be implicitly changed to strings. This change changes the conversion to be explicit by wrapping `node.value` with `String()`

This can be reproduced if you create a computed with `createComputed(computation, equal)` and call `toString()` while `node.value` is something like `Symbol(UNSET)`

(cherry picked from commit e2a9938c51)
2025-12-17 14:38:41 -08:00
Angular Robot a8127273a6 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-17 14:35:48 -08:00
Shuaib Hasan Akib 441d158302 docs(docs-infra): clean up TODO comment, unused imports, and helper function
(cherry picked from commit e9d1c6478a)
2025-12-17 14:34:02 -08:00
Shuaib Hasan Akib c8d14d75ba docs: fix incorrect line highlighting in tutorials
Ensures highlighted lines in tutorial examples match the
corresponding code shown to readers.

(cherry picked from commit ad88c72f24)
2025-12-17 14:26:34 -08:00
Miles Malerba ae0d707d44 docs: call out breaking changes as experimental
Explicitly calls out that recent breaking changes were only for
experimental features

(cherry picked from commit 5b06996fb2)
2025-12-17 14:25:36 -08:00
Andrew Scott eaa68c4cd7 release: bump VSCode extension version to 21.0.1 (#66153) vsix-21.0.1 2025-12-17 13:51:34 -08:00
Andrew Kushnir 85317f405a release: cut the v21.0.6 release v21.0.6 2025-12-17 13:12:23 -08:00
Alan Agius 8d7bcbc881 build: migrate Bazel ignore rules from .bazelignore to REPO.bazel
See: https://bazel.build/rules/lib/globals/repo and https://github.com/aspect-build/rules_js/blob/092dd7892b816f899c7ab5b794fdb6236abb6939/docs/pnpm.md?plain=1#L77
2025-12-17 10:14:32 -08:00
Andrew Scott 5047be4bc1 fix(language-service): Prevent language service from crashing on suggestion diagnostic errors
This prevents the language service from crashing when a
`FatalDiagnosticError` is thrown when retrieving suggestion diagnostics.

fixes #66069

(cherry picked from commit ce1a4769f9)
2025-12-17 10:13:15 -08:00
Angular Robot a27bdd3327 build: update bazel dependencies
See associated pull request for more information.
2025-12-17 10:00:39 -08:00
Angular Robot 2bb5bb47e0 build: update all github actions
See associated pull request for more information.
2025-12-17 09:59:09 -08:00
Shuaib Hasan Akib 3b3b982fa3 docs: add documentation for schema validation with Signal Forms
Fixes: #66098
(cherry picked from commit 3e57f9eaf5)
2025-12-17 09:52:50 -08:00
SkyZeroZx 14b529e5ce docs: align lightweight injection tokens with the style guide
(cherry picked from commit 50d5c2997f)
2025-12-17 09:45:18 -08:00
Matthieu Riegler dd38869b46 docs(docs-infra): leverage the search on 404
This introduces a search result matching the requested url when the page couldn't not be found.

(cherry picked from commit d23ce76821)
2025-12-17 09:40:47 -08:00
kirjs 4d966c99e3 refactor(forms): convert Signal Forms errors to use RuntimeError
- Added 13 new error codes to forms/src/errors.ts (1900-1999)
- use RuntimeError

(cherry picked from commit 6f6b2408fa)
2025-12-17 09:40:01 -08:00
SkyZeroZx e0694df3ec fix(language-service): avoid interpolation highlighting inside @let
This change omits treating `{{ }}` interpolation syntax as valid inside `@let` binding strings, preventing the interpolation curly braces from superseding the match of the surrounding binding expression and ensuring the highlighter reflects the correct semantics of `@let` bindings.

fixes #61643

(cherry picked from commit 9f5744a92d)
2025-12-17 09:39:23 -08:00
Alan Agius 48492524ea fix(core): use mutable ResponseInit type for RESPONSE_INIT token
The `RESPONSE_INIT` token previously used `ResponseInit`. However, `@types/node` (and `undici`) definitions for `ResponseInit` mark properties as `readonly`, which differs from the standard DOM `ResponseInit`.

This commit introduces a `ResponseInit` type that explicitly removes `readonly` modifiers to ensure compatibility and allow for mutable options. This type is now used by the `RESPONSE_INIT` token and is exported from `@angular/core`.

(cherry picked from commit f516370c8e)
2025-12-17 09:35:27 -08:00
Andrew Kushnir a4d2de8179 Revert "fix(core): explicitly cast signal node value to String"
This reverts commit c501b25d04.

(cherry picked from commit 9fa77af110)
2025-12-16 17:37:38 -08:00
Andrew Seguin 0eb623c05a fix(core): explicitly cast signal node value to String
If the computed's `toString` is called and `node.value` is a Symbol, the browser will throw an exception `ERROR TypeError: Cannot convert a Symbol value to a string`

Symbols cannot be implicitly changed to strings. This change changes the conversion to be explicit by wrapping `node.value` with `String()`

This can be reproduced if you create a computed with `createComputed(computation, equal)` and call `toString()` while `node.value` is something like `Symbol(UNSET)`

(cherry picked from commit c501b25d04)
2025-12-16 16:38:07 -08:00
SkyZeroZx dc0aae9a59 docs: add section about reactive contexts
(cherry picked from commit 62ccd64e9f)
2025-12-16 16:35:28 -08:00
Marc Stammerjohann 0e59ac795c docs(router): add missing inject import
(cherry picked from commit dc7ae9aef3)
2025-12-16 16:34:23 -08:00
Matthieu Riegler feed89e83c ci: reformat files
This is after we've slightly changed a rule in #66056

(cherry picked from commit 6270bba056)
2025-12-16 14:44:25 -08:00
Miles Malerba 729b96476b refactor(forms): rename field to fieldTree in FieldContext and ValidationError
BREAKING CHANGE:

(cherry picked from commit ae0c59028a)
2025-12-16 10:26:26 -08:00
SkyZeroZx 8d92f05105 refactor(platform-browser): remove unused platformIsServer flag from renderer
The` platformIsServer` flag is no longer referenced by the renderer and is effectively unused.
Removing it simplifies the implementation and avoids carrying redundant state.

(cherry picked from commit 2ccdf50fba)
2025-12-16 10:25:14 -08:00
SkyZeroZx 0a5fd6b6d4 refactor(core): conditionally include debug names based on ngDevMode
Conditionally include debug-related metadata based on `ngDevMode` to avoid
unnecessary information in production builds.

(cherry picked from commit bf2e50843d)
2025-12-16 09:37:42 -08:00
Angular Robot 7846bccdfc build: lock file maintenance
See associated pull request for more information.
2025-12-16 09:36:56 -08:00
Angular Robot b92ffccf43 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-16 09:34:00 -08:00
Ben Hong 61a46487f1 docs: update links to guides in signal forms overview
(cherry picked from commit 3750622c46)
2025-12-16 09:29:15 -08:00
SkyZeroZx 561d300302 docs: update lightweight injection tokens guide to use contentChild, contentChildren, and inject APIs.
(cherry picked from commit 53c447e3c8)
2025-12-16 09:28:27 -08:00