Commit graph

53 commits

Author SHA1 Message Date
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
1af0db5742 docs(docs-infra): replace non-interactive buttons with spans
These elements are not interactive, so using <button> is misleading for accessibility
(screen readers and keyboard navigation expect an action).

(cherry picked from commit ad3991cd0b)
2026-03-23 10:24:13 -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
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
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
b22835579e docs(docs-infra): prevent from showing duplicate usage blocks in functions API docs
fixes #66398
2026-01-12 09:50:12 -08:00
Matthieu Riegler
a056413520 docs(docs-infra): Show API decorators docs
fixes #66129
2026-01-12 09:41:25 -08:00
Shuaib Hasan Akib
e9d1c6478a docs(docs-infra): clean up TODO comment, unused imports, and helper function 2025-12-17 14:33:58 -08:00
Matthieu Riegler
6270bba056 ci: reformat files
This is after we've slightly changed a rule in #66056
2025-12-16 14:44:19 -08:00
Shuaib Hasan Akib
3ff20a58d3 refactor(docs-infra): remove deprecated h.JSX.HTMLAttributes usage
Import HTMLAttributes directly from preact to address deprecation warning in header-api.tsx
2025-12-15 17:44:24 -08:00
SkyZeroZx
15e3407dab docs(docs-infra): Fixes the visibility of the copy link button in API documentation headings
Fixes the visibility of the copy link button in API documentation headings.
The button now appears on hover, improving the user experience.
2025-12-10 10:15:59 -08:00
Matthieu Riegler
a784995a98 docs(docs-infra): Show examples on function overloads 2025-12-02 12:13:11 +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
Matthieu Riegler
f737a9dd5c docs(docs-infra): Add support for metadata on fenced code blocks
This will help us replace `docs-code` with inline code usages and prevent future indentation issues
2025-11-13 09:36:13 -08:00
Matthieu Riegler
16e61f5dd0 docs(docs-infra): Add support for experimental enum entries 2025-11-11 08:46:06 -08: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
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
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
Alan Agius
494385cac0 fix(docs-infra): allow wrapping of types-and-default CLI options (#63211)
This change fixes an issue where long lists of enum values would display on a single line, running off the screen, especially on mobile devices.

PR Close #63211
2025-08-18 12:52:03 +02:00
Alan Agius
1714e9ea0e fix(docs-infra): display value type in CLI pages (#63211)
The value type was not being displayed when a value had an enum, which was misleading. This change ensures the value type is always shown, so users know whether to expect a single value or an array of values.

PR Close #63211
2025-08-18 12:52:03 +02:00
Matthieu Riegler
00afc73f67 docs: fix CLI reference layout (#62609)
fixes #62602

PR Close #62609
2025-07-14 09:59:54 -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
08e6e7bf37 docs: display deprecation message for top most symbol (#62427)
For classes, types, functions, enums etc.

fixes #62365

PR Close #62427
2025-07-03 08:35:01 +00:00
Matthieu Riegler
44782beea7 docs(docs-infra): fix & simplify scrolling for code blocks (#62179)
PR Close #62179
2025-06-23 14:19:34 +02:00
Matthieu Riegler
f1f37896c5 docs(docs-infra): display CLI enum values for enums (#61521)
fixes #61516

PR Close #61521
2025-05-20 16:54:12 +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
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
hawkgs
d8204bf584 docs(docs-infra): fix function api ref header width (#61022)
Fix the width of the function API reference header when the viewport width is for-desktop-down.

PR Close #61022
2025-04-28 10:01:40 -07:00
hawkgs
3e293535e3 docs(docs-infra): use a custom scrollbar for the examples using HighlightTypeScript (#60981)
The examples used to render the native scrollbar.

PR Close #60981
2025-04-23 17:24:29 +02:00
Matthieu Riegler
c990265473 docs(docs-infra): Improve doc support for pipes. (#60926)
This commits adds the pipe usage and the impure pipe mention.

PR Close #60926
2025-04-23 08:46:11 +02:00
Matthieu Riegler
ba94f6f84f docs(docs-infra): hide github link for external repos. (#60114)
fixes #60113

PR Close #60114
2025-03-04 17:02:37 +00:00
hawkgs
ea5b7371e5 docs(docs-infra): fix card highlighting in the API reference details page (#59965)
Drop `pointer-events: none` and update the member card highlighting mechanism.

PR Close #59965
2025-02-18 14:56:48 +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
fd073004bb docs(docs-infra): fix entry labels. (#59384)
fixes #59382

PR Close #59384
2025-01-08 15:22:43 +00:00
Matthieu Riegler
139f61913c docs: remove data attributes from api-item-label (#59273)
Perf measurments have revealed that `data-*` attributes are slower to set than classes.

PR Close #59273
2025-01-06 16:03:42 +00:00
Matthieu Riegler
f15ccb94b9 docs(docs-infra): enable tslint (#58961)
PR Close #58961
2024-12-05 16:03:35 -08: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
Matthieu Riegler
bb0edaded0 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:16 -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
e3919e7b9d docs: display property details (#57622)
In case there are no signatures (like in an bare interface method), we display the implementation information.

PR Close #57622
2024-09-05 17:22:32 +00: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