Commit graph

29561 commits

Author SHA1 Message Date
Andrew Scott
3f95829f6d refactor(core): Allow dirty views to be refreshed in a loop internally (#54572)
ApplicationRef.tick has a loop that will refresh views again that have
an updated signal. This change ensures views marked with the `Dirty`
flag are also considered in this loop, but only inside g3 for now
because this may be considered a breaking change and we need to wait for
v18 to land externally.

PR Close #54572
2024-02-23 09:59:11 -08:00
Andrew Scott
707bfc9b32 perf(common): AsyncPipe should not call markForCheck on subscription (#54554)
This commit prevents `AsyncPipe` from calling `markForCheck` when values
are synchronously emit during subscription to an observable. This
prevents subscriptions to `Replay` observables from needlessly walking
up to the root of the view tree during template execution for each
new replay observable in the template.

PR Close #54554
2024-02-23 09:20:02 -08:00
Alex Rickabaugh
8e65bdc848 release: cut the v17.3.0-next.0 release 2024-02-21 18:02:51 -08:00
Alex Rickabaugh
09710295bc docs: release notes for the v17.2.2 release 2024-02-21 17:57:34 -08:00
Matthieu Riegler
f5f73fd997 docs(docs-infra): enable webcontainers for Firefox (#54550)
PR Close #54550
2024-02-21 15:27:36 -08:00
Joey Perrott
e7b6be5abe build: perform build/serve of adev locally (#54549)
Use no-remote-exec to allow for building and serving to occur locally but still allow remote caching.  Because of the number of
files involved in being passed to and from the RBE server, it is actually a bit faster to perform these actions locally.

PR Close #54549
2024-02-21 15:27:02 -08:00
Jessica Janiuk
42d3ddd9ae fix(migrations): Fix cf migration regular expression to include underscores (#54533)
In rare cases people may use an underscore in their component names, which was not accounted for in the formatting portion of the migration.

fixes: #54532

PR Close #54533
2024-02-21 15:25:05 -08:00
Doug Parker
9ec22244ee docs(devtools): expand release docs (#54525)
This provides some more information on how to release and notably includes commands for zipping extension code and source code, which can otherwise be tricky to get exactly right.

PR Close #54525
2024-02-21 15:24:26 -08:00
Doug Parker
e9e5e255e9 release: bump Angular DevTools version to 1.0.10 (#54523)
PR Close #54523
2024-02-21 15:23:36 -08:00
Kristiyan Kostadinov
a9f563f043 refactor(compiler-cli): move defer block tests into separate file (#54499)
Splits the tests for `@defer` blocks out into a separate file since the `ngtsc_spec.ts` is getting quite large.

PR Close #54499
2024-02-21 15:22:36 -08:00
Kristiyan Kostadinov
badda0c389 fix(compiler-cli): correctly detect deferred dependencies across scoped nodes (#54499)
This is based on an internal issue report.

An earlier change introduced a diagnostic to report cases where a symbol is in the `deferredImports` array, but is used eagerly. The check worked by looking through the deferred blocks in a scope, resolving the scope for each and checking if the element is within the scope. The problem is that resolving the scope won't work across scoped node boundaries. For example, if there's a control flow statement around the block or within the block but around the deferred dependency, it won't be able to resolve the scope since it isn't a direct child, e.g.

```
@if (true) {
  @defer {
   <deferred-dep/>
  }
}
```

To fix this the case where the deferred block is inside a scoped node, I've changed the `R3BoundTarget.deferBlocks` to be a `Map` holding both the deferred block and its corresponding scope. Then to resolve the case where the dependency is within a scoped node inside the deferred block, I've added a depth-first traversal through the scopes within the deferred block.

PR Close #54499
2024-02-21 15:22:36 -08:00
Kristiyan Kostadinov
1d14e527d5 refactor(compiler-cli): add the ability to treat object literals as enums in docs (#54487)
We have a couple of cases now (#53753 and #54414) where we're forced to redefine enums as object literals. These literals aren't rendered in the best way in the docs so these changes introduce a new `object-literal-as-enum` tag that we can use to mark them so they're treated for documentation purposes.

PR Close #54487
2024-02-21 15:21:58 -08:00
Dean Davidson
5a13c18104 docs: add closing tags to code examples (#54485)
There were two minor issues in the code examples that this addresses.
PR Close #54485
2024-02-21 15:20:12 -08:00
Lukas Matta
27603996fa docs: fix typos (#54475)
PR Close #54475
2024-02-21 15:19:39 -08:00
vladboisa
024c14fb69 docs(docs-infra): fix tab shrinking (#54380)
Fix a behavior when block shrinks on Usage notes tab

Fixes #52818

PR Close #54380
2024-02-21 15:19:13 -08:00
cexbrayat
efdc50a403 docs: view child static query differences formatting (#54370)
The docs were broken as the first line is the only one to be displayed in the table.

PR Close #54370
2024-02-21 15:18:43 -08:00
Dmitry Ivanitskiy
dba3e0b5aa fix(compiler): adding the inert property to the "SCHEMA" array (#53148)
This change allows template binding "inert" attribute with the following syntax: [inert]="isInert"

Fixes #51879

fixup! fix(compiler): adding the inert property to the "SCHEMA" array

revert: "fixup! fix(compiler): adding the inert property to the "SCHEMA" array"

This reverts commit b637b7ce646e8bab2f585339028a84018e8ea982.

This commit is being reverted because the inert property is safe as a boolean attribute

PR Close #53148
2024-02-21 15:13:48 -08:00
Matthieu Riegler
23119c5397 refactor(platform-browser): use performance API for async animations (#53963)
This commit adds a standard performance marker

PR Close #53963
2024-02-21 15:12:04 -08:00
Andrew Scott
d3b273ac33 fix(router): Clear internal transition when navigation finalizes (#54261)
This commit fixes a small memory issue in the router where a destroyed
component instance would be retained.

fixes #54241

PR Close #54261
2024-02-21 14:09:52 -08:00
Joey Perrott
e9246f745a refactor(docs-infra): correct location of hosted images (#54547)
Properly include hosted images in the generated application

PR Close #54547
2024-02-21 16:52:01 +00:00
Matthieu Riegler
554628e190 docs(docs-infra): Add missing API entries to ADEV (#54530)
* `localize`: `MessageId` & `MessageId`
* `core/global`
*  `upgrade/static` : `downgradeComponent`, `downgradeInjectable`, `getAngularJSGlobal`, `getAngularLib`, `setAngularJSGlobal` & `setAngularLib`

PR Close #54530
2024-02-21 16:41:33 +00:00
Matthieu Riegler
d49558d18d docs: fix brokens links (#54507)
PR Close #54507
2024-02-21 16:05:30 +00:00
Matthieu Riegler
0644072354 docs: fix links in ngModule API guide (#54507)
fixes #54506

PR Close #54507
2024-02-21 16:05:30 +00:00
Joey Perrott
7220c89cef fix(docs-infra): enable font inlining for adev (#54524)
Enable font inlining for adev

PR Close #54524
2024-02-21 16:02:00 +00:00
Joey Perrott
6501d9bbe1 build: update to the latest @angular/docs version (#54528)
Update @angular/docs to latest

PR Close #54528
2024-02-21 16:00:35 +00:00
cexbrayat
36afd8902b docs: typos in signal queries guide (#54540)
PR Close #54540
2024-02-21 15:59:00 +00:00
Matthieu Riegler
dd413ebc3b docs(docs-infra): fix error page. (#54522)
Display the not found page on 404.

fixes #54506

PR Close #54522
2024-02-21 15:58:01 +00:00
Matthieu Riegler
55fd7b3c85 docs(docs-infra): Add missing api entries (#54517)
This commit adds `common/http/testing` and `platform-browser/animations/async`.

PR Close #54517
2024-02-20 09:50:36 -08:00
Kristiyan Kostadinov
219445cda4 fix(common): image placeholder not removed in OnPush component (#54515)
Fixes that the placeholder wasn't being removed when an optimized image is placed in an `OnPush` component.

Fixes #54478.

PR Close #54515
2024-02-20 09:49:58 -08:00
Pawel Kozlowski
69daa37b65 test(core): more tests for queries as signals (#54508)
A couple of tests that illustrate combination of signal
and decorator queries in once component.

PR Close #54508
2024-02-20 09:49:19 -08:00
JoostK
0c8744c73e fix(compiler-cli): use correct symbol name for default imported symbols in defer blocks (#54495)
This commit addresses a problem with PR #53695 that introduced support for default imports,
where the actual dynamic import used in the defer loading function continued to use the
symbol name, instead of `.default` for the dynamic import. This issue went unnoticed in the
testcase because a proper instance was being generated for the `ɵsetClassMetadataAsync` function,
but not the generated dependency loader function.

Fixes #54491

PR Close #54495
2024-02-20 09:45:32 -08:00
Jamie Couperwhite
960fe156ee docs: fix developer preview link in signal queries (#54492)
PR Close #54492
2024-02-20 09:44:42 -08:00
Alex Castle
a14d139a24 docs(common): add new faq entry to NgOptimizedImage docs (#54469)
add new FAQ entry explaining that we're not adding new loaders to the angular repo

PR Close #54469
2024-02-20 09:43:46 -08:00
Andrew Scott
a9741e69d2 docs(router): deprecate RouterTestingModule (#54466)
Deprecate `RouterTestingModule` as it is no longer needed or useful and
is not actively maintained.

fixes #54461

PR Close #54466
2024-02-20 09:33:16 -08:00
Ahmed Hakeem
fcfef52cb2 docs: enhance Dependency injection description (#54464)
PR Close #54464
2024-02-20 09:29:53 -08:00
Matthieu Riegler
70345b1292 docs: override piscina dependency for webcontainers projects in adev (#54494)
PR Close #54494
2024-02-20 09:21:04 -08:00
Pawel Kozlowski
d9a1a7dd07 fix(core): properly execute content queries for root components (#54457)
Prior to this fix an incorrect view instance (a dynamically created component
one instead of the root view) was passed to the content query function. Having
incorrect view instance meant that a component instance could not be found.

This is a pre-existing bug, introduction of signal-based queries just surfaced it.

Fixes #54450

PR Close #54457
2024-02-15 12:21:29 -08:00
Joey Perrott
62be6802d3 build: no longer include the unnecessary --config=aio_local_deps flag (#54465)
With the correction of how local build linker interaction works the `aio_local_deps` flag is
no longer needed.

PR Close #54465
2024-02-15 12:20:40 -08:00
Pawel Kozlowski
ee9c272434 docs: add guide for signal queries (#54395)
Adding new guide for the signal-based queries.

PR Close #54395
2024-02-15 12:17:01 -08:00
Fabio Heer
d181a36296 docs: correct default application builder for new apps (#54386)
The documentation on angular.dev mentions build-angular:browser as default
application builder. This is not correct. Recent applications are setup
with build-angular:application by default.

PR Close #54386
2024-02-15 10:54:17 -08:00
Joey Perrott
96e9dbee7f ci: automatically deploy to angular.dev on every push to the main branch (#54436)
Automatically deploy adev on each commit to the main branch

PR Close #54436
2024-02-15 10:50:03 -08:00
Joey Perrott
03acdbe94f fix(docs-infra): process mermaid code blocks (#54462)
Render mermaid code blocks as SVGs in adev

PR Close #54462
2024-02-15 10:33:34 -08:00
Dylan Hunn
6c2d4b650b refactor(compiler): Enable Template Pipeline globally in 1P. (#54435)
The switch/index.ts file only affects g3; externally, it is replaced with a Blaze genrule.

PR Close #54435
2024-02-15 09:24:18 -08:00
AleksanderBodurri
ebcdc8dc96 refactor(devtools): implement multiframe support in devtools page (#53934)
In the Angular DevTools Chrome DevTools page:

- Angular DevTools is able to ask the background script to list each frame that has been registered on a page.
- Angular Devtools is able to ask the background script to "enable" the connection on a particular frame. This enables the messaging between the content script <-> background script <-> devtools page
- Implements detection of non unique urls on the inspected page

Limitations:
- The `inspectedWindow.eval` API is only able to target frames by frameURL. This means some features that integrate with Chrome DevTools like inspect element and open source will not be available when inspecting frames that do not have a unique url on the page.

PR Close #53934
2024-02-14 17:15:25 -08:00
AleksanderBodurri
dd3dac9cc9 refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934)
Modifies the messaging layer of devtools to allow for switching communication between frames on a page. When served as a browser extension.

Design:
- When a page renders, DevTools installs a content script onto it through it's manifest file. The all_frames option is used here to install this script onto every frame in a page.
- When Angular is detected, the content script will install a backend script into it's frame.
- Each content script / backend script pairing is kept track of in the background script. This pairing represents an angular devtools context in a particular frame.
- Angular DevTools is able to ask the background script to list each frame that has been registered on a page.
- Angular Devtools is able to ask the background script to "enable" the connection on a particular frame. This enables the messaging between the content script <-> background script <-> devtools page

Limitations:
- The `inspectedWindow.eval` API is only able to target frames by frameURL. This means some features that integrate with Chrome DevTools like inspect element and open source will not be available when inspecting frames that do not have a unique url on the page.

PR Close #53934
2024-02-14 17:15:25 -08:00
Andrew Kushnir
e0d59f71bb Revert "fix(docs-infra): process mermaid code blocks (#54434)" (#54448)
This reverts commit 925c86a76e.
Reason for revert: broken CI after merging to main, see https://github.com/angular/angular/actions/runs/7908845750/job/21588824548.

PR Close #54448
2024-02-14 16:18:57 -08:00
Joey Perrott
da7fbb40f0 fix(compiler-cli): detect when the linker is working in unpublished angular and widen supported versions (#54439)
When the linker is running using an unpublished version of angular, locally built, the version will be `0.0.0`.
When encountering this situation, the range that for the linker map support is considered to be `*.*.*` allowing
for the linker to work at build time with packages built with versioned angular.

Most notably this allows for us to properly use the linker in building our documentation site with the locally
built version of angular.

PR Close #54439
2024-02-14 15:43:22 -08:00
Angular Robot
36bd7d3a1d build: update all non-major dependencies (#54406)
See associated pull request for more information.

PR Close #54406
2024-02-14 15:39:36 -08:00
Joey Perrott
2bf0ccc002 docs: remove unnecessary usages of aio in adev (#54445)
Remove usages of aio in adev.

PR Close #54445
2024-02-14 15:38:45 -08:00
Joey Perrott
925c86a76e fix(docs-infra): process mermaid code blocks (#54434)
Render mermaid code blocks as SVGs in adev

PR Close #54434
2024-02-14 15:36:16 -08:00