34766 Commits

Author SHA1 Message Date
Jessica Janiuk 39f9e239b7 release: cut the v20.3.12 release 20.3.12 2025-11-14 08:13:05 -08:00
Cheng-Hsuan Tsai 01719a59ab docs(docs-infra): hide file tabs when code example is hidden
(cherry picked from commit 6d8c3fc888)
2025-11-13 23:58:13 +00:00
Matthew Beck f689269eca Revert "fix(compiler): support one additional level of nesting in :host()"
This reverts commit 036c5d2a07.
2025-11-13 15:44:25 -08:00
Matthew Beck 7b2e6caaf8 Revert "fix(compiler): support arbitrary nesting in :host-context()"
This reverts commit f9d0818087.
2025-11-13 15:44:25 -08:00
Matthew Beck 6036eef73c Revert "fix(compiler): support commas in :host() argument"
This reverts commit 106b9040df.
2025-11-13 15:44:25 -08:00
Matthew Beck a44658ba3e Revert "fix(compiler): support complex selectors in :nth-child()"
This reverts commit 9419ea348a.
2025-11-13 15:44:25 -08:00
Joey Perrott fdd267a775 ci: use hardcoded global approvers group
Use a single hardcoded, within the pullapprove config file, group for global approvers instead of leveraging a github team as a group
2025-11-13 15:00:57 -08:00
Alessio Pelliccione 70da36f251 docs(docs-infra): improve theme picker accessibility and add animations
(cherry picked from commit 25320ae1eb)
2025-11-13 22:05:11 +00:00
SkyZeroZx 06bc1467b1 docs: adds guide references to router APIs
Adds `@see` tags with links to relevant guides in the router documentation.

(cherry picked from commit 718eb7bb3a)
2025-11-13 18:00:23 +00:00
Shuaib Hasan Akib 3a8fb096d6 docs: replace <docs-code> block with standard fenced code block for typescript example
Replaced the <docs-code> wrapper with a Markdown fenced code block to improve
copy/paste usability, syntax highlighting consistency, and alignment with current
documentation formatting standards.

Inspired by #65043

(cherry picked from commit 3cfd4361a5)
2025-11-13 17:34:14 +00:00
Matthieu Riegler a02b957b60 refactor(core): remove resource flag.
This was used to migrate G3 and is no longer necessary.

(cherry picked from commit d1ab73dd87)
2025-11-13 17:12:21 +00:00
Shuaib Hasan Akib ba28305b04 docs: replace <docs-code> block with standard fenced code block for typescript example
Replaced the <docs-code> wrapper with a Markdown fenced code block to improve
copy/paste usability, syntax highlighting consistency, and alignment with current
documentation formatting standards.

Inspired by angular#65043

(cherry picked from commit caaa5ec8e6)
2025-11-13 17:11:24 +00:00
hawkgs a586bd26e7 docs(docs-infra): improve playground layout
Improve the layout and optimize the empty space; Introduce some minor improvements to the code editor

(cherry picked from commit 7ab1b3a32a)
2025-11-13 17:07:57 +00:00
SkyZeroZx 3c065f76de docs: Fixed mermaid diagram node label contrast in dark mode
(cherry picked from commit b6a91d4c39)
2025-11-12 23:01:39 +00:00
SkyZeroZx 1c4fb90857 docs: update tutorials with self-closing tags, standalone router directives, and fix syntax highlighting
(cherry picked from commit 4544135b1e)
2025-11-12 21:13:26 +00:00
SkyZeroZx 2e7623ca13 docs: correct example for RouteReuseStrategy getRouteKey
Update the example to properly demonstrate the getRouteKey method usage fixes #65021

(cherry picked from commit a48029b810)
2025-11-12 19:49:07 +00:00
SkyZeroZx 3737724504 docs: correct code block language in error handling and signals interop
(cherry picked from commit 05ef2a5ca9)
2025-11-12 19:35:13 +00:00
Andrew Kushnir 3bafe23c34 release: cut the v20.3.11 release 20.3.11 2025-11-12 08:24:17 -08:00
Matthew Beck 9419ea348a fix(compiler): support complex selectors in :nth-child()
:nth-child() (and its siblings) support complex expressions, e.g.
`:nth-child(2n of :is(.foo, .bar))`. Previously we'd choke because of
the `:is()`. Now, we reuse the `_parenSuffix` subexpression to match
nested parentheses the same way we do for :host() and :host-context().
Note that we only support 3 levels of nesting, so a selector like
`:nth-child(n of :is(:has(:not(.foo))))` will still break.

I'll say yet again that we really should add a proper parser so we stop
getting bug reports like this :)

Fixes #64913

(cherry picked from commit 24cfd5a0ed)
2025-11-11 14:03:36 -08:00
Andrew Scott f00fb46347 Revert "feat(service-worker): notify clients about version failures (#62718)"
This reverts commit 6d011687ec.

issue #63500 reproduces at head on the main branch in the dev app.
Reverting this change along resolves it.

fixes https://github.com/angular/angular/issues/63500

(cherry picked from commit 4af408afcb)
2025-11-11 12:48:48 -08:00
SkyZeroZx a8c577d3af docs: add reference to Built-in Pipes in multiple pipe files
(cherry picked from commit d999667b57)
2025-11-11 08:47:11 -08:00
RobinReinecke 0baa28b886 docs: correct mermaid code block formatting
(cherry picked from commit 07703875b5)
2025-11-11 08:33:31 -08:00
SkyZeroZx c59fa8b85a docs: improve discoverability in service worker documentation
(cherry picked from commit dde18c2303)
2025-11-11 08:32:18 -08:00
Devin Chasanoff e0407c0fe3 docs: add links to SDUI example and livestream
(cherry picked from commit 5af33724a4)
2025-11-10 14:16:22 -08:00
Andrew Kushnir 8922cae0f9 Revert "refactor(http): migrate XSRF classes to use inject() function"
This reverts commit 2ad6b729a1.

Revert reason: the change relies on the code that is not available in the `20.3.x` branch (the `HttpXsrfCookieExtractor` class is not marked as `providedIn: "root"`).
2025-11-10 13:56:23 -08:00
arturovt 5047849a4a fix(common): remove placeholder image listeners once view is removed
Prior to this commit, attempting to resolve a `ChangeDetectorRef` after views or app have been destroyed would result in an error. In this commit, we clean up listeners once the view is destroyed, before the placeholder loads or fails to load.

(cherry picked from commit feb86e3fde)
2025-11-10 12:05:23 -08:00
arturovt 4c66fe4796 refactor(core): mark VERSION as @__PURE__ for better tree-shaking
Annotate the `new Version(...)` call with `/* @__PURE__ */` to signal to optimizers that the constructor is side-effect free.

Without this hint, bundlers such as Terser or ESBuild may conservatively retain the `VERSION` instantiation even when unused. With the annotation, the constant can be tree-shaken away in production builds if not referenced, reducing bundle size.

(cherry picked from commit d3f67f6ca8)
2025-11-10 12:04:08 -08:00
Alan Agius 742122d5a7 docs: use markdown code fences in service worker docs
Replaces the <docs-code> component with standard markdown code fences in the service worker documentation. This improves the readability and maintainability of the documentation.

(cherry picked from commit d42f9ce3a9)
2025-11-10 12:03:35 -08:00
SkyZeroZx 2ad6b729a1 refactor(http): migrate XSRF classes to use inject() function
Remove constructor injection in favor of inject() calls

(cherry picked from commit 55be477979)
2025-11-10 09:49:13 -08:00
Shuaib Hasan Akib b20bf5dc70 docs: add shell language to CLI installation examples
Added `language="shell"` to installation command examples to display
the shell prompt `$` icon consistently across npm, pnpm, yarn, and bun
code blocks.

(cherry picked from commit 27d54654e3)
2025-11-10 08:01:33 -08:00
Shuaib Hasan Akib 77ca0d7534 docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.,
"src/app/open-close.component.ts" → "open-close.component.ts")
to make code examples cleaner and more focused.

(cherry picked from commit e0a4bdd72b)
2025-11-10 08:00:37 -08:00
Shuaib Hasan Akib c5a41aae34 docs(docs-infra): removed unused import and use self-closing syntax for component
(cherry picked from commit 8c6619a531)
2025-11-10 08:00:10 -08:00
SkyZeroZx 7b1a47866a docs: improve discoverability of forms
(cherry picked from commit e3fc57e8fc)
2025-11-10 07:57:47 -08:00
jnizet fedb0831c5 fix(docs-infra): avoid double slash in sitemap urls
Previously, the URLs in the  generated sitemap contained double slashes between the host and the path. It's not the case anymore.

fix #65022

(cherry picked from commit afe5fc0399)
2025-11-10 07:53:43 -08:00
SkyZeroZx 63f1d94c2f docs: correct import path and self-closing tag in ng-content example
(cherry picked from commit 6a2f4a88de)
2025-11-10 07:52:50 -08:00
Matthew Beck 2531863909 test(compiler): add test for :host:has(> .foo)
I took a quick look at my recent changes to see if I had inadvertently
fixed this bug, but I couldn't seem to reproduce it even before my
changes. Seems like it's working, though.

Closes #58436

(cherry picked from commit 4b871b139b)
2025-11-10 07:51:20 -08:00
Matthew Beck 106b9040df fix(compiler): support commas in :host() argument
This change adds support for commas in :host() arguments (e.g.
`:host(:not(.foo, .bar))` as well as in nested parens when the argument
is applied without parens (e.g. `:host:not(:has(.foo, .bar))`).
Previously these selectors would receive an extra `[nghost]` attr, e.g.
`[nghost]:not(.foo, [nghost].bar)`.

I didn't file a bug for this one, but it's also blocking on an internal
LSC. Like the other CSS changes, I'll run a TGP to confirm this isn't
breaking.
2025-11-10 07:49:19 -08:00
Matthew Beck f9d0818087 fix(compiler): support arbitrary nesting in :host-context()
Previously we supported one level of nested pseudo-element selectors
inside :host-context(), e.g. :host-context(:is(.foo, .bar)). This was
based on a regex-based approach. We could support deeper levels of
nesting by updating the regex, but using a regex approach prohibits us
from supporting arbitrary nesting.

Rather than just adding one more level to the existing expression, I've
added a new generator function which splits selectors on commas in a
parenthesis-aware way. This allows us to support arbitrary nesting.

It's likely we'll want to reuse this in other places where we're not as
careful today. We'll probably do this on a request-based basis, though.

Fixes #59176
2025-11-10 07:49:19 -08:00
Andrew Kushnir b47054c52e Revert "fix(compiler): support commas in :host() argument"
This reverts commit 1e09bdc114.

Revert reason: the change relies on helper functions that do not exist in `20.3.x` branch (only exist in `main`).
2025-11-07 16:03:07 -08:00
Danny Koppenhagen f04cf2299b docs(core): add a11y considerations related to @defer()
closes #53466

(cherry picked from commit d2b854b37e)
2025-11-07 15:27:13 -08:00
Matthew Beck 1e09bdc114 fix(compiler): support commas in :host() argument
This change adds support for commas in :host() arguments (e.g.
`:host(:not(.foo, .bar))` as well as in nested parens when the argument
is applied without parens (e.g. `:host:not(:has(.foo, .bar))`).
Previously these selectors would receive an extra `[nghost]` attr, e.g.
`[nghost]:not(.foo, [nghost].bar)`.

I didn't file a bug for this one, but it's also blocking on an internal
LSC. Like the other CSS changes, I'll run a TGP to confirm this isn't
breaking.

(cherry picked from commit 680c3c7bff)
2025-11-07 10:43:36 -08:00
Shuaib Hasan Akib 143883afe3 docs(docs-infra): use self-closing syntax for component examples
Replaced multiple component tags such as `<example></example>` with
self-closing syntax (`<example />`) across documentation examples.
This improves readability and aligns with the current Angular
style conventions.

(cherry picked from commit a2cd36777a)
2025-11-07 10:24:40 -08:00
SkyZeroZx b8972dad85 refactor(devtools): replace HostListener with host metadata for keydown handling
Uses host metadata instead of the HostListener decorator for keydown events

(cherry picked from commit c74367c5de)
2025-11-07 15:44:45 +00:00
khanhkhanhlele 7f8336d9e0 docs: Fix typos in some files
(cherry picked from commit a625f6bb20)
2025-11-07 15:44:07 +00:00
tsc036 41466a7bbf refactor(core): move profile_types.ts to primtives
move profile_types.ts so the types can be used in Wiz code

(cherry picked from commit cf47ce2db9)
2025-11-06 22:22:37 +00:00
SkyZeroZx 1dcecdf823 refactor(platform-browser): remove unused Platform ID dependency from DomRendererFactory2
Eliminates the unnecessary injection and usage of Platform ID in the renderer factory logic, along with related test scaffolding cleanup

(cherry picked from commit 5343001835)
2025-11-06 20:00:49 +00:00
Matthew Berry 036c5d2a07 fix(compiler): support one additional level of nesting in :host()
Previously we supported one level of nested parentheses inside of a
`:host()` selector, e.g. `:host(:not(p))`. This caused a breakage in g3
when I migrated a selector from `:host:not(:has(p))` to
`:host(:not(:has(p)))`. This change adds support for just one more level
of nesting.

It'd be nice to move everything to a real CSS parser (or even update it
to count parentheses like I did with :host-context()), but I wasn't able
to get that to work in ~20 minutes and I'm focusing on other things at
the moment.

This change punts the problem until somebody tries to use just one more
level of nesting in a selector.

Fixes #64830

(cherry picked from commit 444143758e)
2025-11-06 18:53:46 +00:00
Alan Agius ee578d3e86 build: format md files
Format all md files
2025-11-06 10:10:22 -08:00
Jessica Janiuk dcdd1bcdbb fix(core): skip leave animations on view swaps
We accounted for skipping leave animations during moves, but not swaps.
This accounts for the swap cases and updates how we deal with swaps and
moves. Now we always queue animations and then essentially dequeue them
if we attach them back in the same render pass.

fixes: #64818
fixes: #64730
2025-11-06 09:46:52 -08:00
tsc036 d6ef181f6c refactor(core): export types from primitives
export Version type and a type for linkedSignal previous value so they can be used for the Wiz implementations

(cherry picked from commit 104f7d57c1)
2025-11-06 16:34:57 +00:00