SkyZeroZx
44fc79b7f7
docs(docs-infra): Adds anchor links to class member headers for linking
...
Adds anchor links to class member headers for direct linking.
Add test to ensure anchors render correctly.
Fixes angular#67970
2026-04-06 11:05:20 -07:00
SkyZeroZx
522c5ba868
docs(docs-infra): ensure code preview copy preserves spaces
...
Preserve whitespace when copying code examples from the docs. Fixes the copy handler so copied snippets keep original spacing.
Fixes #66790
2026-02-02 10:09:35 -08:00
Matthieu Riegler
72dfb4d92a
docs(docs-infra): wrap getTextOfJSDocComment
...
This commits adds a wrapper around `ts.getTextOfJSDocComment` because of bugs that won't be fixed by the TS team (see microsoft/TypeScript#63027 )
2026-01-29 13:16:00 -08:00
Matthieu Riegler
4ca2722d6f
docs(docs-infra): fix regression on docs-tabs
2026-01-21 12:43:04 -08:00
Matthieu Riegler
f0b1061791
docs(docs-infra): Handle additional description format
...
Ex: https://angular.dev/api/router/withExperimentalPlatformNavigation
2026-01-21 11:37:08 -08:00
Joey Perrott
a88f353a45
fix(docs-infra): support providing links to multiple symbols within a single line of a code block
...
Previously our system only found the first matching symboling to link to within a code block on each line, now we set up a link for all of the discovered symbols on each line
Fixes #65403
2026-01-20 09:35:33 -08:00
Matthieu Riegler
c09f5352f6
docs(docs-infra): Throw build error on invalid guide links
...
The list of valid links is generated from navigation data configuration in the ADEV app.
Redirections are knowingly exclude so we stop referencing them.
2026-01-12 13:38:20 -08:00
Shuaib Hasan Akib
8bdd98ef41
fix(docs-infra): prevent duplicate description rendering for block API entries
...
Block entries (@if, @defer, @for,@let, @switch) were falling back to the generic
DocsReference template, causing the description to appear twice - once in
the header section and once in the main content area.
This commit adds a dedicated rendering path for block entries:
- Creates BlockEntryRenderable type and associated transforms
- Adds BlockReference template that uses RawHtml directly
- Modifies HeaderApi to accept hideDescription prop
- Updates processing and rendering pipelines to handle blocks
The fix ensures block documentation displays only one description section
while preserving the existing behavior for all other API entry types.
Update adev/shared-docs/pipeline/api-gen/rendering/transforms/block-transforms.mts
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2026-01-12 13:37:54 -08:00
Matthieu Riegler
a056413520
docs(docs-infra): Show API decorators docs
...
fixes #66129
2026-01-12 09:41:25 -08:00
Matthieu Riegler
8199945637
refactor(core): add dedicated deprecated signatures for providedIn: any / NgModule.
...
Those were deprecated by #47616 back in v15.
fixes #65923
2025-12-09 10:38:09 -08:00
SkyZeroZx
2d854e01bc
docs(docs-infra): Improves symbol linking for Angular Aria selectors
...
Improves the symbol linking logic to handle Angular component selectors (e.g., ngCombobox). It attempts to convert Angular selector patterns to their corresponding class names, improving navigation to Angular API documentation.
2025-12-01 18:47:19 +01:00
SkyZeroZx
ef034c15c1
docs(docs-infra): renders inline code snippets in docs pills
...
Improves the rendering of `DocsPillRow` to correctly display inline code snippets (using backticks) within the pill labels.
2025-11-25 18:30:05 -05:00
Joey Perrott
fee79e37d5
refactor(docs-infra): use shiki for highlighting
...
Use shiki to perform highlighting instead of a postprocessing action
2025-11-21 13:20:46 -05:00
Miles Malerba
59635bba34
docs: improve docs generation for namespaces ( #64747 )
...
Improves docs epxerience for interfaces / type aliases that are merged
with a namespace.
PR Close #64747
2025-11-05 22:42:59 +00:00
Miles Malerba
662f0e5c00
feat(docs-infra): add support for namespaces
...
Adds support for generating docs for namespaces (and merged declarations
of namespace + type)
2025-10-29 20:22:21 +00:00
SkyZeroZx
f3d056a065
docs(docs-infra): Prevent empty extends clause in interface documentation
...
Interfaces with no extends clause were incorrectly rendered with a trailing extends keyword followed by nothing, resulting in invalid TypeScript syntax
2025-10-29 18:48:30 +01:00
Matthieu Riegler
54636eacca
docs(docs-infra): Extract multiple extends statements for interfaces ( #64539 )
...
fixes #64528
PR Close #64539
2025-10-20 21:18:13 +00:00
Matthieu Riegler
31c689a5f4
docs(docs-infra): highlight & parse api descriptions. ( #63536 )
...
The prevent future regression of this, this commit introduces additional tests.
PR Close #63536
2025-09-02 16:49:10 +00:00
Matthieu Riegler
47dc4ffd1a
docs(docs-infra): share markdown rendering and highlighting code between api-gen and guides ( #63357 )
...
This reduces code duplication and improves the maintability.
PR Close #63357
2025-08-25 15:33:55 -07:00
Matthieu Riegler
da06239a41
docs(docs-infra): Add exemption list for linking symbols. ( #63309 )
...
PR Close #63309
2025-08-21 10:05:55 -07:00
Matthieu Riegler
5c54cb87a5
docs: improve support for decorator APIs ( #60411 )
...
The commit introduce the distinction between
- class like decorators (like Component, Interface, NgModule. They are formatted like classes/interfaces, with each attribute being documents.
- function like decorators (Attribute, Host, Optional...)
PR Close #60411
2025-07-03 11:51:34 +00:00
Matthieu Riegler
ca700e1def
docs(docs-infra): Improve formatting of functions ( #61154 )
...
The commit introduce prettier to format some API entries.
For now we'll do only functions are other are a bit more complex because of the support of deprecation.
fixes #59211
PR Close #61154
2025-05-16 13:58:35 +00:00
Joey Perrott
5f1c08d75f
build: migrate adev shared-docs package to use ts_project ( #61193 )
...
Migrate the build rules for shared docs to use ts_project
PR Close #61193
2025-05-09 16:30:05 +00:00
Miles Malerba
47e44c8af0
docs: update rendering to use generated repo link ( #61130 )
...
PR Close #61130
2025-05-06 14:07:32 -07:00
Miles Malerba
e0248aae6a
docs: hide entries that are marked @docs-private ( #61104 )
...
PR Close #61104
2025-05-05 08:43:30 -07:00
Matthieu Riegler
f580318411
docs(docs-infra): Add version of introduction for APIs ( #60814 )
...
For new APIs we'll mention since when a particular API is in its current status (experimental, devPreview, stable)
fixes #49668
PR Close #60814
2025-05-02 07:51:33 -07:00
Alan Agius
8e48bc9a82
docs(docs-infra): add support for @example ( #60443 )
...
In TSDoc, we currently handle the `@usageNotes` annotation, but this is not a standard TSDoc tag. Instead, the `@example` annotation is the correct standard, which is used in the Angular CLI repo and on the SSR package.
This change ensures that `@example` is treated the same as `@usageNotes` during the transform process and also handle multiple instances of `@example` on the same tag.
PR Close #60443
2025-03-18 18:14:10 +01:00
Matthieu Riegler
286e4da52b
docs(docs-infra): Throw error at build time for invalid links ( #59162 )
...
PR Close #59162
2025-03-04 20:07:23 +00:00
hawkgs
2b114e784d
docs(docs-infra): API doc content rendering fixes ( #60116 )
...
The PR introduces a few doc content rendering fixes:
- Fix highlighted section heading styles (regression from #59965 ).
- Convert JSDoc links within 'Usage Notes' sections to HTML and render them.
- Add IDs to doc content headings. This, by itself, makes these headings available in the page ToC.
PR Close #60116
2025-03-04 17:46:30 +00:00
Miles Malerba
2e03a8685b
docs(docs-infra): Improve support for @link within the jsdoc. ( #60201 )
...
PR Close #60201
2025-03-04 17:13:42 +00:00
hawkgs
b6733eeea4
docs(docs-infra): drop tabs layout from the API reference details page ( #59068 )
...
Drop the tabs in favor of a single page separated by sections.
PR Close #59068
2025-02-13 14:58:33 +00:00
Matthieu Riegler
f15ccb94b9
docs(docs-infra): enable tslint ( #58961 )
...
PR Close #58961
2024-12-05 16:03:35 -08:00
hawkgs
f13f52f70f
feat(docs-infra): remove redundant JSDoc transform related to code examples ( #59004 )
...
The transform is no longer relevant nor it served any functional purpose.
PR Close #59004
2024-12-04 18:05:58 +01:00
Alan Agius
c2a9b75045
fix(docs-infra): retain function keyword in API definitions ( #58561 )
...
**Before:**
```ts
animate(
timings: string | number,
styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null
): AnimationAnimateMetadata;
```
**Now:**
```ts
function animate(
timings: string | number,
styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null
): AnimationAnimateMetadata;
```
PR Close #58561
2024-11-08 17:16:04 +00:00
Alan Agius
d271c4422a
fix(compiler-cli): correct extraction of generics from type aliases ( #58548 )
...
**Before:**
```ts
type HttpEvent = | HttpSentEvent
| HttpHeaderResponse
| HttpResponse<T>
| HttpProgressEvent
| HttpUserEvent<T>
```
**After:**
```ts
type HttpEvent<T> = | HttpSentEvent
| HttpHeaderResponse
| HttpResponse<T>
| HttpProgressEvent
| HttpUserEvent<T>
```
PR Close #58548
2024-11-08 17:15:06 +00:00
Alan Agius
c95aca1f17
docs(docs-infra): update default generic values and add constraints for type parameters in functions ( #58548 )
...
Before
```typescript
createNodeRequestHandler(
handler: T
): T;
```
```typescript
class NgIf<T> {
@Input() set ngIf(value: T);
@Input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null);
@Input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null);
static ngTemplateGuard_ngIf: "binding";
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean;
}
```
Now
```typescript
createNodeRequestHandler<T extends NodeRequestHandlerFunction>(
handler: T
): T;
```
```typescript
class NgIf<T = unknown> {
@Input() set ngIf(value: T);
@Input() set ngIfThen(value: TemplateRef<NgIfContext<T>> | null);
@Input() set ngIfElse(value: TemplateRef<NgIfContext<T>> | null);
static ngTemplateGuard_ngIf: "binding";
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): boolean;
}
```
PR Close #58548
2024-11-08 17:15:06 +00:00
Alan Agius
c5ce302e0b
docs(docs-infra): add support for @remarks ( #58523 )
...
In TSDoc, we currently handle the `@usageNotes` annotation, but this is not a standard TSDoc tag. Instead, the `@remarks` annotation is the correct standard, which is used in the Angular CLI repo and on the SSR package.
This change ensures that `@remarks` is treated the same as `@usageNotes` during the transform process.
PR Close #58523
2024-11-07 15:49:13 +00:00
Matthieu Riegler
c1aa9c6041
docs(docs-infra): fix CLI commands ( #58294 )
...
With this commit the CLI doc will display the correct arguments for the subcommands
fixes #58279
PR Close #58294
2024-10-22 07:42:21 -07:00
Joey Perrott
9dbe6fc18b
refactor: update license text to point to angular.dev ( #57901 )
...
Update license text to point to angular.dev instead of angular.io
PR Close #57901
2024-09-24 15:33:00 +02:00
Matthieu Riegler
49f7179ded
docs(docs-infra): Add dedicated support for decorators. ( #57595 )
...
PR Close #57595
2024-09-19 14:16:31 -07:00
Matthieu Riegler
dbdd7875dd
docs: Enable direct links to class/interface methods for @link ( #57615 )
...
PR Close #57615
2024-09-06 16:03:36 +00:00
Matthieu Riegler
1b7571f404
docs(docs-infra): enable tests for api-gen ( #57618 )
...
PR Close #57618
2024-09-05 14:05:04 +00:00
Matthieu Riegler
a84cecfc99
docs(docs-infra): add support for extends/implements on API entries ( #57588 )
...
PR Close #57588
2024-09-03 07:47:25 -07:00
Matthieu Riegler
b96e75b89a
docs(docs-infra): Improve styling around API pages ( #57492 )
...
PR Close #57492
2024-08-30 11:12:25 -07:00
Matthieu Riegler
55387c5b56
docs(docs-infra): Improve support for deprecated methods ( #57492 )
...
PR Close #57492
2024-08-30 11:12:25 -07:00
Matthieu Riegler
01030d58a7
docs(docs-infra): Add support for cross-links on API pages ( #57346 )
...
PR Close #57346
2024-08-29 13:39:58 -07:00
Matthieu Riegler
cb3128d925
docs(docs-infra): fix regressions around members & deprecations ( #57465 )
...
This commit fixes regressions introduced by #57255
PR Close #57465
2024-08-21 11:26:26 -07:00
Matthieu Riegler
b87bbf6c95
docs(docs-infra): Add tests for marked rendering ( #57344 )
...
On top of #57338 , to make sure we prevent similar regressions on marked rendering.
PR Close #57344
2024-08-19 09:21:16 -07:00
Matthieu Riegler
04911d7599
docs(docs-infra): Add support for function/method overloads ( #57255 )
...
PR Close #57255
2024-08-13 12:09:01 -07:00
Joey Perrott
3bdead1b2f
refactor(docs-infra): migrate api-gen from dev-infra into the repo ( #57241 )
...
Move the api-gen pipeline into the shared-docs directory.
PR Close #57241
2024-08-05 17:06:29 +00:00