Commit graph

29647 commits

Author SHA1 Message Date
Matthieu Riegler
f4e9768da2 docs: fix aio job (#55179)
PR Close #55179
2024-04-02 20:33:20 +00:00
ivanwonder
7b67ad2fc5 refactor(language-service): support showing tags info in the completion (#51140)
The Angular VSCode extension will support showing the tags info in this

[PR][1], so the language service can return the tags info now.

[1]: https://github.com/angular/vscode-ng-language-service/pull/1904

PR Close #51140
2024-04-02 16:21:02 +00:00
garrettld
129c973934 fix(devtools): fix padding in property tree view (#54648)
This import was missed when switching devtools to standalone.

fixes #54622

PR Close #54648
2024-04-01 10:52:45 -07:00
Jessica Janiuk
bc429baa92 ci: Update workflows to use latest dev infra hash (#55128)
This bumps the hash for dev-infra dependencies to utilize the latest build and changes

PR Close #55128
2024-04-01 10:00:11 -07:00
Paweł Kubiak
a84beaa4a7 fix(docs-infra): scrolling experience in API Reference (#55133)
Fix scrolling experience in API Reference:
- set correct margin top for members container (right side) which is aligned with tabs (left side)
- prevent scroll on focus
- remove redundant blur calls

PR Close #55133
2024-03-29 19:05:56 -07:00
Matthieu Riegler
fd45d03d2f docs(docs-infra): Use monospace font for API reference (#54558)
fixes #52612

PR Close #54558
2024-03-29 16:46:25 -07:00
Kristiyan Kostadinov
949dec26b8 fix(migrations): avoid conflicts with some greek letters in control flow migration (#55113)
The control flow migration was using a couple of Greek letters as placeholders. This ended up conflicting with templates authored in Greek.

These changes use a more obscure placeholder to make conflicts less likely. It also moves the placeholder generation to a centralized function so it's easier to make changes if we decide to update the pattern again.

Fixes #55085.

PR Close #55113
2024-03-29 13:10:55 -07:00
Matthieu Riegler
fc034137ab docs(docs-infra): move Features APIs above the filter section & rename to "Most Common (#54557)
Fixes #52705

PR Close #54557
2024-03-29 13:08:31 -07:00
vladboisa
ca60d9dd3f refactor(docs-infra): move gif to display (#54795)
To display the image correctly, swap the image from the folders

Fixes  #54778

feat(docs-infra): change path for correct ADEV

Changing path for correctly displaying in adev

PR Close #54795
2024-03-29 13:06:43 -07:00
Johnny Gérard
10851d27cc docs(common): clean up comment (#55088)
PR Close #55088
2024-03-29 13:02:50 -07:00
Andrew Scott
d10dc5c85c Revert "refactor(compiler): add support for the new search element (#54945)" (#55127)
This reverts commit 367b3ee6e9.
The search element is not a void element but existing components may use
the same selector and be used as a void element.

PR Close #55127
2024-03-29 12:56:33 -07:00
Andrew Scott
cb95e2f8ab Revert "ci: Update workflows to use latest dev infra hash (#55123)" (#55126)
This reverts commit e4fde98279.

PR Close #55126
2024-03-29 12:48:28 -07:00
Jessica Janiuk
eb0ccfc40c ci: Update workflows to use latest dev infra hash (#55123)
This bumps the hash for dev-infra dependencies to utilize the latest build and changes

PR Close #55123
2024-03-29 11:51:32 -07:00
Matthieu Riegler
a8a20ad238 refactor(compiler): add support for the new search element (#54945)
See #whatwg/html#5811
Spec: https://html.spec.whatwg.org/multipage/grouping-content.html#the-search-element

fixes #54944

PR Close #54945
2024-03-29 10:02:03 -07:00
reafernandes10
e53d02df85 docs(http): Update the Setup for testing in Http Client to include provideHttpClient() (#53716)
It is not enough to use provideHttpClientTesting() for HTTP Client Testing, it will throw a dependency injection error. Update the docs to include both provideHttpClient() and provideHttpClientTesting()

Fixes #53390

PR Close #53716
2024-03-29 09:40:13 -07:00
vladboisa
109df125c8 docs(docs-infra): rephrase sentence to make sense (#54914)
Remove the confuse sentences with 2 categories, and rephrase

Fixes #54792

PR Close #54914
2024-03-29 09:34:50 -07:00
Matthieu Riegler
17f2181299 docs: fix API tabs height to allow overflow/scrolling (#55109)
fixes #53294

PR Close #55109
2024-03-29 09:33:15 -07:00
Matthieu Riegler
0bcea6c928 docs: document why undefined is usefull and does not remove classes (#55112)
Fixes #54601

PR Close #55112
2024-03-29 09:22:11 -07:00
Matthieu Riegler
2c325d46b0 docs(docs-infra): improve styling for deprecated CLI option (#54794)
Related to #54770

PR Close #54794
2024-03-28 15:48:26 -07:00
Matthieu Riegler
54a8fc3b19 docs(docs-infra): add margin for command aliases (#54794)
PR Close #54794
2024-03-28 15:48:24 -07:00
Matthieu Riegler
555696635e docs(docs-infra): improve space between cli command options (#54794)
fixes #54767

PR Close #54794
2024-03-28 15:48:23 -07:00
Allan Barrantes
878f581961 docs: remove broken link from CONTRIBUTING.md (#54953)
PR Close #54953
2024-03-28 15:06:59 -07:00
Garrett Darnell
9cef0d210f docs(core): fix toSignal docs (#54964)
PR Close #54964
2024-03-28 13:06:45 -07:00
Angular Robot
346a555e93 build: update github/codeql-action action to v3.24.9 (#55039)
See associated pull request for more information.

PR Close #55039
2024-03-28 13:05:59 -07:00
Ben Hong
fa837a393e docs: fix outdated security guide reference (#55069)
PR Close #55069
2024-03-28 13:02:00 -07:00
Andrew Scott
4d043992e5 fix(core): test cleanup should not throw if Zone is not present (#55096)
The test hooks should not throw if applications choose not to load ZoneJS.

fixes #48198

PR Close #55096
2024-03-28 12:12:31 -07:00
Ben Hong
2abcb040eb docs: add missing h1 to page for skip to main content on home page (#55052)
PR Close #55052
2024-03-28 12:09:59 -07:00
Dylan Hunn
67f0cf5fc8 release: cut the v17.3.2 release 2024-03-28 09:56:43 -07:00
Kristiyan Kostadinov
2f9d94bc4a fix(migrations): account for variables in imports initializer (#55081)
Fixes that the control flow migration was throwing an error if the `imports` of a component are initialized to an identifier.

Fixes #55080.

PR Close #55081
2024-03-28 09:40:33 -07:00
Paul Gschwendtner
ee76001431 refactor(compiler-cli): support ignoring specific doc entries during extraction (#55053)
This commit adds support for ignoring specific doc entries when
extracting doc entries. This allows us to drop e.g. `InputFunction` from
the API docs, given that the `input` API entry holds all the relevant
information.

`InputFunction` only exists for type purposes in the `.d.ts`.

PR Close #55053
2024-03-28 09:38:43 -07:00
Paul Gschwendtner
b63afb9e93 refactor(core): improve API documentation for query initializer APIs (#55053)
Similar to `input`, `model`, `output`, the query initializer APIs are
also explicitly denoted as such. This allows angular.dev to display them
more readable and compactly.

PR Close #55053
2024-03-28 09:38:43 -07:00
Paul Gschwendtner
658fb0a17f refactor(core): improve API documentation for output (#55053)
This improves the API documentatino for `output` in angular.dev,
similar to how we improved the API for `input`.

Angular.dev can now show these documentation entries more
readable if annotated explicitly as initializer API.

Note: output API is short enough that we want to include
the types in the code snippet previews.

PR Close #55053
2024-03-28 09:38:42 -07:00
Paul Gschwendtner
f8aa778b70 refactor(core): improve API documentation for model (#55053)
Improves the API documentation for `model`, similarly to how
we updated the `input` function.

PR Close #55053
2024-03-28 09:38:41 -07:00
Paul Gschwendtner
60ed00a601 refactor(core): improve API documentation for input after angular.dev support (#55053)
This commit improves the API documentation for `input` after
we added support for initializer APIs in angular.dev docs generation.

Changes:

- Rename `ReadT` to `T`. This conceptually makes it easy to talk about
  inputs of type `T` if there is no transform involved. The common case.
- Rename `WriteT` to `TransformT`. This makes it clear that this is the
  type that the "transform" needs to handle.
- Improves the "overall" description of the input function so that it
  can be shown as a general overview for the API site.
- Improves usage notes to be a little more helpful, yielding more useful
  content in the API docs usage notes section.
- Add short JSDoc description for each individual overload.

PR Close #55053
2024-03-28 09:38:40 -07:00
Paul Gschwendtner
c7ff3d158a refactor(docs-infra): support initializer API functions (#55053)
This commit ensures that extracted initializer API functions are
showing up in angular.dev and can be filtered.

PR Close #55053
2024-03-28 09:38:39 -07:00
Paul Gschwendtner
aeb20f95d2 refactor(compiler-cli): support extracting initializer API functions (#55053)
This commit adds support for extracting initializer API functions.
Initialixer API functions are functions conceptually that can are
intended to be used as class member initializers.

Angular started introducing a few of these for the new signal
APIs, like `input`, `model` or signal-based queries.

These APIs are currently confusingly represented in the API docs because
the API extraction:

- does not properly account for call signatures of interfaces
- does not expose information about sub-property objects and call
  signatures (e.g. `input.required`)
- the docs rendering syntax highlighting is too bloated and confusing
  with all types being included.

This commit adds support for initializer API functions, namely two
variants:

- interface-based initializer APIs. e.g. `export const input:
  InputFunction`- which is a pattern for `input` and `input.required`.
- function-based simpler initializer APIs with overloads. e.g.
  `contentChildren` has many signatures but doesn't need to be an
  interface as there are no sub-property call signatures.

PR Close #55053
2024-03-28 09:38:38 -07:00
Andrew Kushnir
708ba8115f fix(core): establish proper injector resolution order for @defer blocks (#55079)
This commit updates the `@defer` logic to establish proper injector resolution order. More specifically:

- Makes node injectors to be inspected first, similar to how it happens when `@defer` block is not used.
- Adds extra handling for the Router's `OutletInjector`, until we replace it with an `EnvironmentInjector`.

Resolves #54864.
Resolves #55028.
Resolves #55036.

PR Close #55079
2024-03-28 09:23:42 -07:00
Matthieu Riegler
fb5a28858d refactor(devtools): prevent exeception on state serializer (#55061)
`Object.getPrototypeOf(obj)` returns `null` if `obj` is an empty object. `Object.getOwnPropertyDescriptors` throws on `null`/`undefined`

PR Close #55061
2024-03-28 09:14:25 -07:00
Paul Gschwendtner
5b67c94775 refactor(compiler-cli): improve error message for uncaught FatalDiagnosticError (#55070)
For `FatalDiagnosticError` we are currently hiding the `message` string
field in favor of the actual TS `diagnosticMessage`.

This works as expected, but makes these errors hard to debug in certain
environments (e.g. Jasmine). That is because `null` is the value of
`message` at runtime. We fix this by just overriding the type, like we
originally intended to do.

In addition, we properly render message chains in the `Error#message`
field— so that these errors, when uncaught, are somewhat reasonable and
can be useful.

PR Close #55070
2024-03-28 09:13:09 -07:00
Paul Gschwendtner
b478dfbfda fix(compiler-cli): report errors when initializer APIs are used on private fields (#55070)
This commit ensures that the new APIs like `input`, `model`, `output`,
or signal-based queries are not accidentally used on fields that have a
problematic visibility/access level that won't work.

For example, queries defined using a private identifier (e.g. `#bla`)
will not be accessible by the Angular runtime and therefore _dont_ work.

This commit ensures:

- `input` is only declared via public and protected fields.
- `output` is only declared via public and protected fields.
- `model` is only declared via public and protected fields.
- signal queries are only declared via public, protected and TS private
  fields (`private` works, while `#bla` does not).

Fixes #54863.

PR Close #55070
2024-03-28 09:13:08 -07:00
Paul Gschwendtner
75d1cae616 refactor(compiler-cli): support enforcing field access for initializer APIs (#55070)
An initializer API like `input`, `output`, or signal queries may not be
compatible with certain access levels. E.g. queries cannot work with ES
private class fields.

This commit introduces a check for access levels into the initializer
API recognition— enforcing that every initializer API *clearly*
specifies what type of access is allowed.

PR Close #55070
2024-03-28 09:13:07 -07:00
Paul Gschwendtner
53fe455630 refactor(compiler-cli): reflection should inspect ES private fields and visibility (#55070)
This commit changes the TypeScript reflection host to:

* inspect / process ES private fields. e.g. `#someField` — those are
  ignored right now and we would want to check them to issue
  diagnostics.

* determine an access level of a class member. E.g. a member may be
  public, may be private, may be ES private, or public readonly. This
  can then be used in various checks later.

PR Close #55070
2024-03-28 09:13:06 -07:00
Kristiyan Kostadinov
1470b7d40e refactor(compiler-cli): expand type of initializer parsing function (#55070)
Updates the function that parses initializer APIs to check any `Expression`, instead of expecting a class member. This will be useful for the upcoming changes.

PR Close #55070
2024-03-28 09:13:05 -07:00
Matthieu Riegler
76631995e1 docs: link to http security now at best-practices/security (#55060)
fixes #55058

PR Close #55060
2024-03-27 11:32:09 -07:00
Esteban Luchsinger
519e781701 docs: explain difference between @placeholder and @loading (#54779)
Add a sentence to the `@loading` block documentation that emphasizes more that the `@loading` block will replace the `@placeholder` block once the deferred view starts loading.

PR Close #54779
2024-03-27 11:09:17 -07:00
vladboisa
1af2be9b23 docs(docs-infra): replace link by HTTPsecurity tab (#55029)
Replace a broke link by content of HTTP Client Security Tab.

Fixes #54918 & #54922

PR Close #55029
2024-03-27 10:50:25 -07:00
JiaLiPassion
a893f0b60d fix(zone.js): should not clear onhandler when remove capture listener (#54602)
Close #54581

Should not clear `onHandler` when remove capture event listeners.

PR Close #54602
2024-03-27 10:40:06 -07:00
Paul Gschwendtner
93ce4d0483 refactor(compiler-cli): properly preserve file overview comments (#54983)
This commit updates the logic for preserving file overview comments
to be more reliable and less dependent on previous transforms.

Previously, with the old import manager, we had a utility called
`addImport` that always separated import statements and non-import
statements. This meant that the non-emitted statement from Tsickle
for the synthetic file-overview comments no longer lived at the
beginning of the file.

`addImports` tried to overcome this by adding another new non-emitted
statement *before* all imports. This then was later used by the
transform (or was assumed!) to attach the synthetic file overview
comments if the original tsickle AST Node is no longer at the top.

This logic can be improved, because the import manager shouldn't need to
bother about this fileoverview non-emitted statement, and the logic for
re-attaching the fileoverview comment should be local. This commit fixes
this and makes it a local transform.

PR Close #54983
2024-03-27 10:18:30 -07:00
Paul Gschwendtner
ed271ebb37 test(compiler-cli): add tests to verify import generation in TCB files/blocks (#54983)
This commit adds some unit tests verifying the import generation in TCB
files and inline blocks. We don't seem to have any unit tests for these
in general. This commit adds some, verifying some characteristics we
would like to guarantee.

PR Close #54983
2024-03-27 10:18:30 -07:00
Paul Gschwendtner
6734b59b35 refactor(compiler-cli): rename ImportManagerV2 to ImportManager (#54983)
To ease review and to allow for both instances to co-exist, `ImportManagerV2`
was introduced. This commit renames it to `ImportManager` now that we
deleted the older one.

PR Close #54983
2024-03-27 10:18:29 -07:00