30446 Commits

Author SHA1 Message Date
Andrew Kushnir 62970ca688 Revert "fix(common): Don't run preconnect assertion on the server. (#56213)" (#56740)
This reverts commit 39e48ce675.

PR Close #56740
2024-06-27 17:44:43 +00:00
Paul Gschwendtner 11f066b8d5 refactor(compiler-cli): support running JIT transforms as part of tsickle emit (#56520)
When running the JIT transforms in 1P w/ tsickle, tsickle will
transform source files before our custom transforms can run. This is
also impacting the Ivy transform and hence we use `ts.getOriginalNode`
in various places to inspect the source AST for detecting Angular.

For the JIT transform we need to do a similar change so that the
transform could run in 1P.

PR Close #56520
2024-06-27 15:55:19 +00:00
Matthieu Riegler 819f27e528 docs: replace @link with absolute link. (#56557)
Currently `@link` doesn't work for cross-package references.

Fixes #56556

PR Close #56557
2024-06-27 15:54:47 +00:00
Matthieu Riegler a55719f55e fix(common): Don't run preconnect assertion on the server. (#56213)
The `window` global is patched by domino on the server but the value of `window.location.href` isn't a valid base.

Before this change `getUrl()` would throw when running in devmode on the server.

Fixes #56207

PR Close #56213
2024-06-27 15:54:12 +00:00
Matthieu Riegler 64f6860a68 test(core): Add testing for defer error block (#56561)
In #56558 it was raised that we used an devMode function in a prod scope.
This commit adds a test when an defer error block is missing in devMode and prodMode

PR Close #56561
2024-06-27 15:53:19 +00:00
Angular Robot b3d6841678 build: update dependency selenium-webdriver4 to v4.22.0 (#56580)
See associated pull request for more information.

PR Close #56580
2024-06-27 15:52:47 +00:00
Pawel Kozlowski 1a21ed86a1 refactor(common): remove ng_switch ability to use == equality check (#56426)
In Angular v17 we've alligned NgSwitch equality check with the build in control
flow to be ===. At the same time we've left the ability to use ==. This ability was
controlled by the NG_SWITCH_USE_STRICT_EQUALS const targetted by the G3 patch.

This commits removes the infrastructure to swap equality operator in preparation
for the G3 patch removal.

PR Close #56426
2024-06-27 15:07:57 +00:00
Thomas Nguyen aaa00b3f9c refactor(core): Add global event delegation provider (#56247)
This replaces all addEventListener calls with a stashing function,
and installs an event listener on the document body to retrieve
the stashed function;

PR Close #56247
2024-06-27 14:24:47 +00:00
Dylan Hunn a59496cbc9 release: cut the v18.0.5 release 18.0.5 2024-06-26 17:13:25 -07:00
Matthieu Riegler 81e6a54909 docs: Add mention of picture support in FAQ (#56692)
PR Close #56692
2024-06-26 16:58:28 -07:00
Matthieu Riegler 95f118b20e docs(docs-infra): fix asset path for learn angular #11 (#56587)
fixes #56568

PR Close #56587
2024-06-26 12:39:00 -07:00
Ofer Segev b8a91c9c04 docs: Update signals overview.md (#56671)
change "computed" to a term using a backtick
PR Close #56671
2024-06-26 12:38:26 -07:00
Matthieu Riegler f49a2a4a11 docs: Move the background image migration to its own section. (#56588)
PR Close #56588
2024-06-26 08:52:18 -07:00
Tom Wilkinson 26f97c03b4 refactor(core): Use ActionResolver in Dispatcher. (#56369) (#56369)
`EventContract` usages in Angular now use `false` for
`useActionResolver`. Tests have been updated, with functionality that
depends on `ActionResolver` moving to dispatcher_test.ts.

PR Close #56369

PR Close #56369
2024-06-26 08:49:30 -07:00
Kristiyan Kostadinov cf059979d7 refactor(core): support let declarations during hydration (#56527)
Updates the hydration logic to account for the fact that let declarations don't create a DOM node.

PR Close #56527
2024-06-26 08:48:32 -07:00
Kristiyan Kostadinov 37b6c937ce refactor(core): integrate let instructions into the runtime (#56527)
Adds the implementation of the following new instructions:
* `declareLet` - creation-time instruction that initializes the slot for a let declaration.
* `storeLet` - update-time instruction that stores the current value of a let declaration.
* `readContextLet` - instruction that reads the stored value of a let declaration from a different view.

On top of the instructions, it also introduces a new `LetDeclaration` TNode type.
The new TNode is nececessary for DI to work correctly in pipes inside the let expression,
as well as for proper hydration support.

PR Close #56527
2024-06-26 08:48:32 -07:00
Shannon V.C cfe1f388f0 docs: add neovim setup section to adev (#56057)
PR Close #56057
2024-06-25 09:28:48 -07:00
MikaelSvanasbakken f9a9b55442 docs: fix broken redirection to contributing.md (#56581)
PR Close #56581
2024-06-25 09:27:56 -07:00
Matthieu Riegler 5f9bd5521e fix(core): prevent calling devMode only function on @defer error. (#56559)
`getTemplateLocationDetails()` is a devMode only function and should guarded by `ngDevMode` or calling it will throw an error.

fixes #56558

PR Close #56559
2024-06-25 09:17:34 -07:00
Sasidharan SD ac84d2c920 docs: fix broken component fixture link (#56563)
PR Close #56563
2024-06-25 09:15:02 -07:00
Matthieu Riegler 553914d0b2 docs(docs-infra): add canonical link to each adev page (#56540)
PR Close #56540
2024-06-24 09:44:30 -07:00
Sasidharan SD 75c3921e7b docs: fix file structure link (#56542)
PR Close #56542
2024-06-21 10:04:45 -07:00
Matthieu Riegler a74f5a0565 build: add ignores for aio (#56538)
The files are needed/generated to run aio on the 17.3.

PR Close #56538
2024-06-21 10:03:34 -07:00
Gerald Monaco be9e4892f9 fix(core): improve support for i18n hydration of projected content (#56192)
When collecting nodes from the DOM for hydration, we need to treat nodes with paths (e.g. content projection) as the new root for all subsequent elements, not just the next one.

Additionally, when using content projection it's possible for translated content to become disconnected, e.g. when it doesn't match a selector and there isn't a default. We need to handle such cases by manipulating the disconnected node data associated with hydration as usual.

PR Close #56192
2024-06-20 14:59:58 -07:00
cexbrayat 2f73281dfd fix(core): improve docs on afterRender hooks (#56525)
This commit improves the documentation of the options parameter of the afterRender hooks.

PR Close #56525
2024-06-20 14:58:51 -07:00
Luis Fernando Scapin 9c3c8ae2b9 docs: ordered words (#56534)
Ordered correctly some words

PR Close #56534
2024-06-20 14:58:13 -07:00
Andrew Kushnir 2e586203c4 release: cut the v18.0.4 release 18.0.4 2024-06-20 12:00:17 -07:00
Andrew Kushnir 5f8f18dba7 refactor(docs-infra): use an older version of the afterRender API (#56526)
This commit updates the code to use an older version of the `afterRender` API, since the newer one is not available in 18.0.x.

PR Close #56526
2024-06-20 10:43:33 -07:00
Andrew Kushnir 5928baa0a2 test(compiler-cli): update formatting of a golden file (#56526)
This commit updates a golden file that is used to verify compiler output. There are no major changes, just a few new commas added due to a difference in TS version.

PR Close #56526
2024-06-20 10:43:33 -07:00
Andrew Scott c45c5205b5 refactor(router): Update afterRender phase to use old API (#56526)
The new API does not exist in the 18 branch

PR Close #56526
2024-06-20 10:43:33 -07:00
Andrew Scott 5578681da2 fix(router): Delay the view transition to ensure renders in microtasks complete (#56494)
This commit delays makes two changes:

* Use the `read` phase for `afterNextRender` hook. We really want to
   wait for any write hooks to complete before starting the animation
* In addition, wait a macrotask before resolve (really, this makes the
   above change unnecessary but it's still conceptually the right
   thing). This ensures any follow-up rendering in the microtask queue
   is flushed before the animation starts.

Important note: This only affects the timing of the animation start,
delaying it longer to allow additional rendering/change detections to
flush. This promise already resolves in an `afterNextRender` hook and is
only used directly by the browser's view transition machinery.

PR Close #56494
2024-06-20 08:56:50 -07:00
Sasidharan SD 73abcda1b3 docs: fix page not found (#56512)
PR Close #56512
2024-06-20 08:56:10 -07:00
Matthieu Riegler 2b9d1c9ad3 docs: fix code example for http headers (#56508)
PR Close #56508
2024-06-20 08:55:32 -07:00
Matthieu Riegler cff9ede7d2 docs: add mention of preconnect links (#56503)
Text is copied from AIO.

fixes #56502

PR Close #56503
2024-06-20 08:54:51 -07:00
Charles Lyding 1f1ed52ed1 build: remove unused root dependencies (#56499)
With the removal of AIO, several dependencies are now unused and can be removed.

PR Close #56499
2024-06-20 08:54:12 -07:00
Andrew Kushnir 69e0aa56f1 refactor(core): use performance API for Event Replay (#56509)
This commit adds a standard performance marker that can be viewed in Chrome dev tools and other tooling.
See more info at https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark

PR Close #56509
2024-06-20 08:53:19 -07:00
Andrew Kushnir 83ffa94783 fix(core): do not activate event replay when no events are registered (#56509)
This commit adds extra checks to handle a situation when an application has no events configured, but the Event Replay feature was enabled. This situation can happen when some routes in an application are mostly static, when other routes are more interactive.

Resolves #56423.

PR Close #56509
2024-06-20 08:53:19 -07:00
arturovt 284705f5f4 refactor(core): missing space in zoneless warning (#56491)
There's currently a missing space in the zoneless warning, showing words together.

PR Close #56491
2024-06-20 08:49:40 -07:00
Kristiyan Kostadinov bc655bf309 refactor(compiler): integrate let declarations into the template pipeline (#56299)
These changes integrate let declarations into the template pipeline. This involves a few operations:
* Producing a `declareLet` instruction call at creation time to initialize the declaration.
* Producing a `storeLet` instruction call in the place of the let declaration, including the necessary `advance` calls beforehand.
* For let declarations used within their declaration view, moving the `const` to be placed right after the `storeLet` call to ensure the their value has been computed.
* For let declarations that are _only_ used in their declaration view, removing the `storeLet` call and inlining the expression into the constant statement.

PR Close #56299
2024-06-20 08:48:53 -07:00
Joey Perrott cc6cd08ca3 refactor(docs-infra): complete removal of aio directory (#56496)
Finish removal of aio directory as it is no longer used or relied upon.

PR Close #56496
2024-06-18 12:26:04 -07:00
Joey Perrott 7be9397ec5 refactor(docs-infra): remove reliance on aio example macro (#56496)
Remove usage of aio example macro in adev

PR Close #56496
2024-06-18 12:26:03 -07:00
Joey Perrott 1a32e799a8 refactor(docs-infra): move windows-chromium-path to adev (#56496)
Move windows-chromium-path help from aio to adev

PR Close #56496
2024-06-18 12:26:02 -07:00
Matthieu Riegler 2eaf04d556 docs: add ng generate directive page (#56417)
fixes #56296

PR Close #56417
2024-06-18 09:31:27 -07:00
Angular Robot ce2d7c4caf build: update scorecard action dependencies (#56485)
See associated pull request for more information.

PR Close #56485
2024-06-18 09:30:45 -07:00
Angular Robot 904edcb22d build: update actions/checkout action to v4.1.7 (#56484)
See associated pull request for more information.

PR Close #56484
2024-06-18 09:28:58 -07:00
Angular Robot 7ea25eb392 build: update io_bazel_rules_sass digest to b222c61 (#56483)
See associated pull request for more information.

PR Close #56483
2024-06-18 09:28:20 -07:00
Andrew Scott 395d26ad16 fix(docs-infra): reference page restores scroll position or goes top when no anchor (#56478)
This contains follow-up fixes to 2a2439712a.
This commit updates scrolling on references page to scroll to the top
when there is no anchor in the URL. The behavior after the above commit would
be that the position doesn't change from whatever the previous page was
(potentially scrolled to the bottom). In addition, this restores the
previous scroll position when traversing through browser history rather
than always scrolling to the fragment.

PR Close #56478
2024-06-18 09:26:57 -07:00
Viktor T 841476da1c docs(docs-infra): Remove redundant API link (#56480)
As there is no longer a page for the localize API the URL pointing to this page is removed

PR Close #56480
2024-06-17 12:48:12 -07:00
Andrew Kushnir 1d48e72ba7 refactor(core): handle incomplete DOCUMENT instances during cleanup in tests (#56422)
`DOCUMENT` instances retrieved from DI may not contain a necessary function to complete the cleanup. In tests that don't interact with DOM, the `DOCUMENT` might be mocked and some functions might be missing. For such tests, DOM cleanup is not required and we can skip DOM cleanup logic if there are missing functions. For tests that use DOM, TestBed would behave the same as before and rely on more complete `DOCUMENT` instances.

PR Close #56422
2024-06-17 09:05:53 -07:00
Andrew Kushnir 38010d2b3a refactor(core): avoid exposing OutletInjector in injector resolution path (#56394)
Router's `OutletInjector` required a special handling in cases when `@defer` is used, see https://github.com/angular/angular/pull/55374 for additional info. As a result, the `ChainedInjector` that represents an `OutletInjector` instance is currently exposed via `getInjectorResolutionPath` function. This creates a problem, because other debug APIs used by DevTools can not interact with `ChainedInjector`s. This commit updates the logic around `getInjectorResolutionPath` utility to avoid exposing `OutletInjector`in the resolution path.

Resolves #56331.

PR Close #56394
2024-06-17 09:05:12 -07:00