New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.3.x]: Patch port of angular.dev signal API docs generation changes #55053
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devversion
added
action: merge
The PR is ready for merge by the caretaker
target: patch
This PR is targeted for the next patch release
PullApprove: disable
labels
Mar 26, 2024
crisbeto
previously approved these changes
Mar 26, 2024
devversion
force-pushed
the
patch-port-docs
branch
from
March 27, 2024 12:02
5b65f4a
to
530f1b0
Compare
devversion
force-pushed
the
patch-port-docs
branch
from
March 27, 2024 16:53
530f1b0
to
6e3bbdd
Compare
Looks like this one needs a rebase. |
dylhunn
added
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
area: adev
Angular.dev documentation
and removed
action: merge
The PR is ready for merge by the caretaker
labels
Mar 27, 2024
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.
This commit ensures that extracted initializer API functions are showing up in angular.dev and can be filtered.
…ev support 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.
Improves the API documentation for `model`, similarly to how we updated the `input` function.
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.
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.
…extraction 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`.
devversion
force-pushed
the
patch-port-docs
branch
from
March 27, 2024 18:20
6e3bbdd
to
67c2956
Compare
devversion
added
action: merge
The PR is ready for merge by the caretaker
and removed
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
labels
Mar 27, 2024
dylhunn
approved these changes
Mar 28, 2024
This PR was merged into the repository by commit ee76001. |
dylhunn
pushed a commit
that referenced
this pull request
Mar 28, 2024
…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
dylhunn
pushed a commit
that referenced
this pull request
Mar 28, 2024
This commit ensures that extracted initializer API functions are showing up in angular.dev and can be filtered. PR Close #55053
dylhunn
pushed a commit
that referenced
this pull request
Mar 28, 2024
…ev 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
dylhunn
pushed a commit
that referenced
this pull request
Mar 28, 2024
dylhunn
pushed a commit
that referenced
this pull request
Mar 28, 2024
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
dylhunn
pushed a commit
that referenced
this pull request
Mar 28, 2024
…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
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
action: merge
The PR is ready for merge by the caretaker
area: adev
Angular.dev documentation
PullApprove: disable
target: patch
This PR is targeted for the next patch release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Patch port of #54925