31038 Commits

Author SHA1 Message Date
wlotherington e60d016f46 docs(docs-infra): change mermaid diagram colors (#58223)
Change diagram colors to:

- Better match the overall site theme.
- Improve dark theme.
- Make the diagram easier to understand. "Unchecked" nodes have no color and "Checked" nodes match the color of the "Event" node that triggered the change detection.

Fixes #56314

PR Close #58223
2024-10-16 16:46:17 +00:00
Dzhavat Ushev 532bd11f41 docs(language-service): fix link URLs (#58143)
PR Close #58143
2024-10-16 14:48:13 +00:00
Matthieu Riegler 608a1511ca refactor(compiler-cli): Don't extract abstract overload multiple times (#57707)
Prior to this commit, each abstract method that was overloaded was extracted. With this commit it will be extracted only once. Every overload was and still will be supported by the signatures.

fixes #57693

PR Close #57707
2024-10-16 07:31:48 +00:00
Alan Agius 06f45c3d59 docs: update browserslist config to include last 2 Android major versions (#58186)
See: https://github.com/angular/angular-cli/pull/28620 for more context.

PR Close #58186
2024-10-15 16:48:59 +00:00
Angular Robot 4049d7797d build: update scorecard action dependencies (#58202)
See associated pull request for more information.

PR Close #58202
2024-10-15 06:38:07 +00:00
Daniel Kimmich c1f4a47457 docs: remove word repetition (#58187)
PR Close #58187
2024-10-14 13:19:42 +00:00
Paul Gschwendtner 6cd2028d81 ci: disable bazel-saucelabs job (#58162)
Disables the `bazel-saucelabs` job in `main`, and re-uses the PR legacy
saucelabs job to run on `main` instead (which is much more stable and
reliable).

PR Close #58162
2024-10-11 14:07:35 +00:00
Angular Robot d9bb74f950 build: update io_bazel_rules_sass digest to 583fc8c (#58155)
See associated pull request for more information.

PR Close #58155
2024-10-11 10:37:57 +00:00
vladboisa 47467949d8 docs: move JSDoc below constructor (#57187)
Move the JSDoc above transform signature for correct view

Fixes #56349

refactor: format file

PR Close #57187
2024-10-10 12:37:36 +00:00
Steven Tucker 00de13c909 docs: Updated event-listeners.md doc to use correct term, even -> every (#57964)
event time -> every time

PR Close #57964
2024-10-10 12:36:41 +00:00
arturovt 79a89f7742 refactor(docs-infra): allow table of contents to be GCed (#58034)
This commit updates the table of contents functionality to clean up correctly whenever the user
navigates to other pages and nodes are removed from the DOM.

Currently, calling `renderComponent` with the `TableOfContents` keeps creating a new table of contents
component without removing the previous one, as they are created manually.

This leads to memory leaks because the components cannot be collected properly, even if the user
navigates to the home page where there is no TOC component.

PR Close #58034
2024-10-10 12:33:51 +00:00
Matthieu Riegler a9e440d96b refactor(core): drop the Mutable utility type. (#58124)
The complexity of this type isn't necessary, `Writable` is well suited where it was used.

PR Close #58124
2024-10-10 10:47:51 +00:00
reosablo da0e6b1eee docs(core): fix description about signal value equality (#56472)
PR Close #56472
2024-10-10 10:24:33 +00:00
Jaime González Fábregas 45a788b0b7 docs(docs-infra): substitute string interpolation on json data with actual value (#57626)
substitute "${this.baseUrl}" with "https://angular.dev/assets/images/tutorials/common" in the photo url on the json data provided on the hands on tutorial in the webpage "https://angular.dev/tutorials/first-app/14-http". The previous json content caused the images to fail loading.

PR Close #57626
2024-10-10 10:22:34 +00:00
Paul Gschwendtner 2532ffa35e release: cut the v18.2.8 release 18.2.8 2024-10-10 11:59:47 +02:00
Georgy Serga 21be258be6 fix(compiler): scope :host-context inside pseudo selectors, do not decrease specificity (#57796)
parse constructions like `:where(:host-context(.foo))` correctly
revert logic which lead to decreased specificity if `:where` was applied
to another selector, for example `div` is transformed to `div[contenta]`
with specificity of (0,1,1) so `div:where(.foo)` should not decrease it
leading to `div[contenta]:where(.foo)` with the same specificity (0,1,1)
instead of `div:where(.foo[contenta])` with specificity equal to (0,0,1)

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga d325f9b55f fix(compiler): fix parsing of the :host-context with pseudo selectors (#57796)
fix regexp which is used to test for host inside pseudo selectors

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga aea747ab3b fix(compiler): preserve attributes attached to :host selector (#57796)
keep attributes used to scope :host selectors

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga 11692c8dab fix(compiler): add multiple :host and nested selectors support (#57796)
add support for nested and deeply nested (up to three levels) selectors,
parse multiple :host selectors, scope selectors within pseudo functions

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga 48a1437e77 fix(compiler): fix comment typo (#57796)
fix spelling in the comment

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga 66dcc691f5 fix(compiler): allow combinators inside pseudo selectors (#57796)
allow css combinators within pseudo selector functions, parsing those
correctly. Similarly to previous version, don't break selectors
into part if combinators are within parenthesis, for example
`:where(.one > .two)`

PR Close #57796
2024-10-10 08:13:23 +00:00
Georgy Serga 7a6fd427d5 fix(compiler): transform pseudo selectors correctly for the encapsulated view (#57796)
fix scoping and transforming logic of the `shimCssText` for the
components with encapsulated view:
- add support for pseudo selector functions
- apply content scoping for inner selectors of `:is()` and `:where()`
- allow multiple comma separated selectors inside pseudo selectors

Fixes #45686

PR Close #57796
2024-10-10 08:13:22 +00:00
cexbrayat 31fb9d0d52 docs: mention autoDetectChanges parameter default value (#58092)
It was unclear whether the parameter was necessary, as its default value was not mentioned in the jdsoc.

PR Close #58092
2024-10-09 13:50:32 +00:00
Krzysztof Platis b40875a2cc fix(platform-server): destroy PlatformRef when error happens during the bootstrap() phase (#58112) (#58135)
The `bootstrap()` phase might fail e.g. due to an rejected promise in some `APP_INIIALIZER`.
If `PlatformRef` is not destroyed, then the main app's injector is not destroyed and therefore `ngOnDestroy` hooks of singleton services is not called on the end (failure) of SSR.

This could lead to possible memory leaks in custom SSR apps, if their singleton services' `ngOnDestroy` hooks contained an important teardown logic (e.g. unsubscribing from RxJS observable).

Note: I needed to fix by the way another thing too: now we destroy `moduleRef` when `platformInjector` is destroyed - by setting a `PLATFORM_DESTROY_LISTENER`

Patch port of #58112

PR Close #58135
2024-10-09 13:50:02 +00:00
Angular Robot 59394ee830 build: update actions/cache digest to 3624ceb (#58125)
See associated pull request for more information.

PR Close #58125
2024-10-08 13:27:59 -07:00
Kristiyan Kostadinov 46bafb0b0a fix(core): clean up afterRender after it is executed (#58119)
We stop tracking `afterRender` hooks as soon as they execute, but their on destroy callbacks stay registered until either the injector is destroyed or the user calls `destroy` manually. This was leading to memory leaks in the `@defer` triggers based on top of `afterRender` when placed inside long-lived views, because the callback would execute, but its destroy logic was waiting for the view to be destroyed.

These changes resolve the issue by destroying the `AfterRenderRef` once it is executed.

PR Close #58119
2024-10-08 13:27:07 -07:00
Matthieu Riegler 9ca9db4f74 refactor(core): drop ViewRefTracker in favor of ApplicationRef. (#58096)
We can leverage an `import type` to prevent the circular import.

PR Close #58096
2024-10-08 13:25:24 -07:00
ColinJolivet 9f2726bb43 refactor(docs-infra): add tooltip to the download button in playground (#58065)
Add a material tooltip to the download button in the playground in order to clarify what this button does

PR Close #58065
2024-10-08 09:28:37 -07:00
Lang 490786af10 docs: complete the example in use InjectionToken section (#57839)
PR Close #57839
2024-10-08 09:27:23 -07:00
Angular Robot 7b13d34a24 build: update scorecard action dependencies (#58116)
See associated pull request for more information.

PR Close #58116
2024-10-08 06:18:16 +00:00
Angular Robot 99b5417d28 build: update actions/cache digest to 2cdf405 (#58107)
See associated pull request for more information.

PR Close #58107
2024-10-08 06:17:36 +00:00
Angular Robot bf83801b8c build: update actions/checkout digest to eef6144 (#58108)
See associated pull request for more information.

PR Close #58108
2024-10-07 13:26:53 -07:00
arturovt 02de7fc731 fix(zone.js): remove abort listener once fetch is settled (#57882)
This commit updates the `fetch` patch for zone.js. Currently, we're attaching an
`abort` event listener on the signal (when it's provided) and never removing it.
We should be good citizens and remove event listeners whenever objects need to be
properly collected. In Firefox, when saving a heap snapshot and running it through
`fxsnapshot`, querying `AbortSignal` will print a so-called "CaptureMap" with a list
of "lambdas," indicating that the signal is not garbage collected because of the event
listener lambda function.

PR Close #57882
2024-10-07 08:27:54 -07:00
Kristiyan Kostadinov f187c3abf8 fix(compiler-cli): defer symbols only used in types (#58104)
Currently we don't defer any symbols that have references outside of the `import` statement and the `imports` array. This is a bit too aggressive, because it's possible that the symbol is only used for types (e.g. `viewChild<SomeCmp>('ref')`) which will be stripped when emitting to JS.

These changes expand the logic so that references inside type nodes aren't considered.

**Note:** one special case is when the symbol used in constructor-based DI (e.g. `constructor(someCmp: SomeCmp)`, because these constructors will be compiled to `directiveInject` calls. We don't need to worry about them, because the compiler introduces an addition `import * as i1 from './some-cmp';` import that it uses to refer to the symbol.

Fixes #55991.

PR Close #58104
2024-10-07 08:26:07 -07:00
Luan Gong 7eb264a017 docs: use correct heading in templates guide (#58101)
PR Close #58101
2024-10-07 08:22:46 -07:00
Matthieu Riegler b35e7f8bb3 docs: add info on AbstractControl.source type. (#58094)
The source can be of any type and can't be inferred from `T`

fixes #58076

PR Close #58094
2024-10-07 08:21:56 -07:00
vladboisa 10081a9d7a docs: move JSDoc before functions (#58087)
Move the JSDoc before functions for correct view of params

PR Close #58087
2024-10-04 14:47:53 -07:00
Matthieu Riegler 0e225ce16b docs(docs-infra): Add NgModule exports for directives. (#58071)
This information is extracted from the @NgModule Jsdoc tag.

fixes #57906

PR Close #58071
2024-10-04 14:46:17 -07:00
Adrien Crivelli ccf2c7f40e docs(common): Minor typo in code example (#58085)
PR Close #58085
2024-10-04 14:38:41 -07:00
JoostK 39a851fa55 refactor: change security issue redirect to angular.dev (#58070)
Ensure the security issue template points to the correct location.

PR Close #58070
2024-10-04 10:57:43 -07:00
Stanka Kopalova 91874a7c41 docs: add better title name (#58060)
PR Close #58060
2024-10-04 10:57:08 -07:00
Stanka Kopalova 3b06a09df2 docs: fix wrong title of section (#58060)
PR Close #58060
2024-10-04 10:57:08 -07:00
Angular Robot 3fb696df96 refactor(compiler): update dependency chokidar to v4 (#57945)
This commit bump chokidar to the latest major and adjusts to the breaking changes.

PR Close #57945
2024-10-04 10:56:03 -07:00
arturovt 69702b17cc docs(zone.js): update docs to enable beforeunload (#57881)
In this commit, we update the documentation to reflect the property that allows
enabling the default browser `beforeunload` handling, which was added in a
previous commit.

Additionally, some cosmetic grammar changes have been made in this documentation,
as the previous text had some issues.

Closes #52256

PR Close #57881
2024-10-04 10:55:01 -07:00
Matthieu Riegler de03e93262 build: update ts target to ES2022 and module to ES2022 (#58022)
Our integration tests are based on the CLI. CLI build force the target to ES2022 else it logs a warning

PR Close #58022
2024-10-04 13:33:48 +00:00
Jeevan Mahesha 44cb2f8131 docs: add documentation for lazy loading a standalone component (#57620)
Added a new section in the documentation explaining how to lazy load a standalone component using `loadComponent`. This includes a code example demonstrating the setup in Angular routes.

PR Close #57620
2024-10-04 13:31:52 +00:00
Matthieu Riegler 1db1b3d6b8 refactor(compiler-cli): exclude private computed properties from class member extractions (#57596)
This will exclude properties like `[ɵWRITABLE_SIGNAL]` from the `WritableSignal` interface.

PR Close #57596
2024-10-04 13:29:52 +00:00
Matthieu Riegler c18ec3dd26 ci: disable updates for @bazel (#58050)
This is to prevent the bot to update #51047

PR Close #58050
2024-10-04 13:28:16 +00:00
vladboisa 694fe3faab fix(docs-infra): fix calculation of height editor (#54128)
Apply the min() function for set the smallest height

fix(docs-infra): move height into editor-wrapper

Move the calculation rule of height edit into editor-wrapper selector

fix(docs-infra): change has selector

Change the has selector

fix(docs-infra): change selector's for child

Changing the selector for test this solution

Fix

PR Close #54128
2024-10-03 16:43:03 +00:00
vladboisa ca5bc0c5bd feat(docs-infra): add transition on editor wrapper (#54128)
Add the smooth animation when height of the container is changing

PR Close #54128
2024-10-03 16:43:03 +00:00