Commit graph

35636 commits

Author SHA1 Message Date
Joey Perrott
53f752e7a3 build: update repository to use node 22.21.1 in bazel
The repository was updated to use node 22.21.1 via nvm, but bazel had not been updated to match

(cherry picked from commit 349133374f)
2025-12-09 09:19:19 -08:00
Shuaib Hasan Akib
d9522d9033 docs(docs-infra): hide trailing empty line in code examples
Add CSS rule to hide the last empty line in code blocks to prevent displaying
unnecessary empty lines when source files end with a newline character.
The empty line remains in the DOM for proper copy-paste functionality.

(cherry picked from commit 4b9fffaa79)
2025-12-09 09:17:46 -08:00
Gouvernathor
1a4ce250e7 docs(common): Explain how ::ng-deep works
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit 5607f513a7)
2025-12-09 09:16:51 -08:00
cexbrayat
55fc677cef fix(forms): add signals for dirty, hidden, and pending states in custom controls
FormUiControl states that hidden, pending and dirty will be bind in custom controls, but this is currently not the case.

Fixes #65575

(cherry picked from commit 9fe9566581)
2025-12-08 10:30:48 -08:00
Anuj Chhajed
288238abef refactor(core): correct all typeof ngDevMode comparison patterns introduced by #63875
This change replaces all remaining occurrences of `typeof ngDevMode !== undefined`
with the correct `typeof ngDevMode !== 'undefined'` form. This aligns the codebase
with JavaScript typeof semantics and maintains consistency with other Angular code.

(cherry picked from commit 96b79fc393)
2025-12-08 10:30:06 -08:00
Miles Malerba
a4c436a058 refactor: followup cleanup for #65758 fallout
Fixes some issues left behind by recent refactor

(cherry picked from commit efde94a525)
2025-12-08 10:28:04 -08:00
mahmoudaboueleneen
7c82f4e410 docs: fix typo in 'components' word in host elements guide
(cherry picked from commit bad758d4ea)
2025-12-08 10:24:10 -08:00
Shuaib Hasan Akib
55709c1de6 refactor(core): use proper type for stringifyTypeFromDebugify parameter
Replace the 'any' type with ClassDebugInfo for the debugInfo parameter in
stringifyTypeFromDebugInfo function. This removes the TODO comment that was
tracking the need for proper typing without creating circular dependencies.

The change improves type safety while avoiding circular imports since
stringify_utils.ts doesn't export anything that definition.ts imports.

(cherry picked from commit 5fd75410a9)
2025-12-08 10:23:21 -08:00
Joey Perrott
ed7db0e0a2 build: update to bazel version 8.4.2
Update bazel to use version 8.4.2

(cherry picked from commit aa92f19307)
2025-12-08 10:22:04 -08:00
Alan Agius
f18af4b0db build: ignore adev generated content JSON files in Prettier
These files are auto generated.

(cherry picked from commit 22eda59a31)
2025-12-08 10:20:34 -08:00
Matthieu Riegler
10bdae9098 build: enable angular formatting on all html files
This should also be safe on any html file that isn't an angular template

(cherry picked from commit 9d1d742f1b)
2025-12-08 10:19:50 -08:00
Alessio Pelliccione
7f967997fb feat(docs-infra): add complexity level badge
Introduces the new complexity badge in recommendation cards.
The implementation utilizes CSS variables and `color-mix` to efficiently
handle color themes (Basic, Medium, Advanced) and dark mode support.

Closes #65378

(cherry picked from commit 253dc95d63)
2025-12-08 10:05:51 -08:00
Angular Robot
b2ea55c969 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-08 09:36:30 -08:00
SkyZeroZx
7ab88c1697 docs: add attribute binding reference in accessibility guide
(cherry picked from commit 70e024ea80)
2025-12-08 09:24:30 -08:00
Shuaib Hasan Akib
46f7986a02 docs: add missing page title to update guide
Fixes the missing page title so the update guide displays a proper heading.

(cherry picked from commit c9cba99407)
2025-12-08 09:23:28 -08:00
SkyZeroZx
3c8b3ac07b docs: Updates tutorial syntaxis highlight
(cherry picked from commit ccf31349c5)
2025-12-08 09:21:48 -08:00
Angular Robot
f253f1200d build: update bazel dependencies
See associated pull request for more information.
2025-12-08 09:13:52 -08:00
SkyZeroZx
71568e069c docs: add documentation HOST_TAG_NAME
(cherry picked from commit 6f2ef918e3)
2025-12-08 09:08:55 -08:00
Jessica Janiuk
0352d552a1 docs: Update contributing guidelines
This commit updates the CONTRIBUTING.md file to provide clearer
guidelines for new contributors, including sections on code style,
testing, and the pull request process.

(cherry picked from commit ce4ddf4b47)
2025-12-08 09:06:31 -08:00
Miles Malerba
195c574ca1 test: fix broken adev tests
Fixes a broken adev tests and enables another one that seems to work
fine now

(cherry picked from commit cda56db20f)
2025-12-08 09:04:55 -08:00
SkyZeroZx
56418b108e docs: add documentation for HTTP_TRANSFER_CACHE_ORIGIN_MAP
(cherry picked from commit 7e1e396a00)
2025-12-08 09:00:13 -08:00
SkyZeroZx
5b911d6025 docs(docs-infra): fix hideCopy option to code snippets
Adds the ability to hide the copy button on code snippets.

Updates documentation to use the new `hideCopy` option with the new
markdown code fence syntax.

(cherry picked from commit a4563044ad)
2025-12-08 08:48:25 -08:00
Shuaib Hasan Akib
b8ed18c527 docs: fix lazy loading documentation reference
Updates broken or outdated references in the lazy loading guide.

Fixes: #65906
(cherry picked from commit 45aa63308e)
2025-12-08 08:47:45 -08:00
Alan Agius
8bedd996ac build: format manifest files after updating its version
This commit run the formatter during the release.

(cherry picked from commit d2ac93d5ca)
2025-12-08 08:44:01 -08:00
Alan Agius
79ebbf7e36 refactor: move Prettier ignore rules from ng-dev config to .prettierignore
This moves all prettier ignore rules to the prettier config

(cherry picked from commit 52aac81829)
2025-12-08 08:43:11 -08:00
Matthieu Riegler
5d8adf2105 docs(docs-infra): fix next version dropdown
fixes #65912

(cherry picked from commit 13bc1bc721)
2025-12-08 08:42:24 -08:00
Matthieu Riegler
bd4cfc88ef docs(docs-infra): expose VERSION from @angular/upgrade
The missing src was responsible for not exposing the symbols during the doc extraction.

fixes #65916

(cherry picked from commit 81cf319534)
2025-12-08 08:41:40 -08:00
kirjs
28e7546edc feat(docs-infra): forward preview error locations
Intercept the WebContainer preview overlay open-in-editor requests and relay them to the editor via postMessage so errors open the matching file.

(cherry picked from commit 789f91bd4f)
2025-12-04 11:45:56 -08:00
kirjs
3d58d10e68 feat(docs-infra): allow navigating to editor error locations
This shows up in a little pop-up, and is clickable now, and leads to exact line

(cherry picked from commit 21b995f4b7)
2025-12-04 11:45:56 -08:00
diegoinost02
ba61579cb7 docs: clarify linkedSignal update behavior
Updates the linkedSignal documentation to specify that it updates its value when the source changes or when any signal referenced in the computation changes, ensuring the description accurately reflects its behavior.

(cherry picked from commit e311f3df72)
2025-12-04 11:42:51 -08:00
Shuaib Hasan Akib
ab38d91891 docs: update rxResource changes in updated page
Add both `request` and `loader` changes in rxResource section

(cherry picked from commit abcd6b5bfb)
2025-12-04 11:41:41 -08:00
SkyZeroZx
36cffc72d3 docs: update zone pollution guide highlight syntax
(cherry picked from commit 3adb091c1a)
2025-12-04 11:40:07 -08:00
Kirill Cherkashin
7de8558219 refactor(forms): Break logic.ts into separate files
This would make it easier to navigate

(cherry picked from commit 5be33048cc)
2025-12-04 11:33:26 -08:00
Nakul Sharma
d40a517c0f refactor(core): use getComponentDef in stringify_utils
- Use getComponentDef in debugStringifyTypeForError to clean up TODO
- Remove outdated comment from stringify_utils

(cherry picked from commit 0bb8924ab6)
2025-12-04 11:32:17 -08:00
Joey Perrott
c3bd22d10d
build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-04 11:26:14 -08:00
Alex Rickabaugh
bf1c12cd93 fix(forms): memoize reads of child fields in signal forms (#65802)
Previously, navigating a `FieldTree` in signal forms involved reactive reads
of the value of the parent field(s), both directly and via `.childrenMap()`.

This meant that on _any_ change to the value of a field, reactive
notifications would trigger updates of computeds, reruns of effects, etc.
So for example, this effect would run on every change to the form:

```ts
const f = form(signal({data: 'abc', unrelated: 0}));
effect(() => {
  // accessing f.data incurs a dependency on f().value() which changes
  // on every change in the whole form
  console.log(f.data().value());
});
```

This is deeply counterintuitive and troublesome when attempting to write
effect logic, and also results in `computed`s unnecessarily updating.

This change introduces the concept of a "reader" computed, which memoizes
the access of a field at a given key via the reactive graph. With this, the
same `f.data` access above now depends on the `data` reader in `f` only,
which is effectively a constant computed. As a result, the effect only
reruns on changes to `data`'s value, as intended.

PR Close #65802
2025-12-03 12:52:43 -08:00
Alex Rickabaugh
2c12661620 refactor(forms): simplify child field creation (#65802)
Previously, several values were being passed into the creation of
`FieldNodeStructure`s that were only used in the creation of child nodes.
Separately, we also passed a `createChildNode` function which these values
were passed back into.

Instead, this moves the small bit of logic from structure.ts behind the
`createChildNode` callback, which reduces the passing of values back-and-
forth and gives `createChildNode` a much more suitable signature.

PR Close #65802
2025-12-03 12:52:43 -08:00
cexbrayat
565c022a87 build: disable assistant_to_the_branch_manager on forks
It currently fails as it is triggered on push, but requires an angular-robot-key that forks don't have.

(cherry picked from commit fc23fcdd3b)
2025-12-03 12:33:18 -08:00
Angular Robot
4e19d6c072 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-03 12:32:36 -08:00
Joey Perrott
fbc43f9272 build: use mjs files for ng-dev configuration
In preperation for ng-dev requiring mjs files for configuration, switch over our usage
2025-12-03 12:30:55 -08:00
Joey Perrott
34caae5978 ci: use defined ng-dev config for deploying docs site
Use the repo defined ng-dev configuration for deploying the docs site

(cherry picked from commit eebcaf49f1)
2025-12-03 11:26:10 -08:00
Shuaib Hasan Akib
2e5d187120 fix(docs-infra): prevent readonly TypeScript keyword from being linked
This updates the docs infrastructure to avoid incorrectly linking the `readonly` keyword in TypeScript examples.

Fixes #65632

(cherry picked from commit 7f8ffa3304)
2025-12-03 16:30:55 +01:00
Pawel Kozlowski
c355ffd99e release: cut the v21.0.3 release 2025-12-03 16:18:30 +01:00
SkyZeroZx
6b4ab876e8 feat(forms): Allows transforms on FormUiControl signals
Extends the `FormUiControl` interface to allow `InputSignalWithTransform` in addition to `InputSignal` for its properties.

Fixes #65756

(cherry picked from commit 7d1e502345)
2025-12-03 15:13:06 +01:00
Leon Senft
609699ae17 perf(core): tree shake unused dynamic [field] binding instructions (#65599)
Move the instructions used to dynamically bind a `Field` directive to a
form control onto the `Field` itself. This way the instructions are only
retained if the app uses the `Field` directive.

PR Close #65599
2025-12-03 15:10:50 +01:00
Leon Senft
a5dbd4b382 fix(forms): support dynamic [field] bindings (#65599)
Support binding a `Field` directive to a component created dynamically
with `createComponent()`.

Fix #64632

PR Close #65599
2025-12-03 15:10:49 +01:00
Kristiyan Kostadinov
4bb085311e fix(core): unable to inject viewProviders when host directive with providers is present
When registering providers, the DI system assumes that `viewProviders` are registered before plain `providers`. This was reinforced by components always being first in the array of directive matches, only one component being allowed per node and the fact that only components can have `viewProviders`.

This breaks down if there are host directives with `providers` on the component, because they'll execute earlier, throwing off the order of operations.

These changes fix the issue by separating out the resolvers for `viewProviders` and plain `providers` and explicitly running the component's `viewProviders` resolver before any others. This also has the benefit of not attempting to resolve `viewProviders` for directives which are guaranteed not to have them.

Fixes #65724.

(cherry picked from commit 886cf6c452)
2025-12-03 15:09:53 +01:00
Angular Robot
6491df9175 build: lock file maintenance
See associated pull request for more information.
2025-12-03 13:24:37 +01:00
Alan Agius
20474d3f0f fix(http): enable XSRF protection for same-origin absolute URLs
Previously, the XSRF interceptor only added the XSRF token to requests with relative URLs.
This commit updates the interceptor to also add the token to requests with absolute URLs, provided they match the current origin.

(cherry picked from commit 0659d11c85)
2025-12-03 12:19:46 +01:00
Kristiyan Kostadinov
1f1856e897 fix(compiler-cli): check that field radio button values are strings
Adds some type checking code which verifies that the bound `value` on a `Field` radio button is a string.

Fixes #65726.

(cherry picked from commit 6773d3b97d)
2025-12-03 12:19:01 +01:00