Commit graph

203 commits

Author SHA1 Message Date
Matthieu Riegler
bc81440b25 docs(docs-infra): Remove the edit button from AIO (#54204)
As a move to reduce PRs toward AIO we drop the edit button and recommend users to use ADEV instead and make suggestions there.

PR Close #54204
2024-02-01 18:54:55 +00:00
Paul Gschwendtner
fcea8c1c5d feat(docs-infra): show overloads of methods in API overview (#54053)
This enables us to show overloads of methods in the API overview. This
is useful for e.g. showing the various signatures of the signal input
function, or for signal-based queris.

There seems to be some issues with the length of the `InputFunction`
overloads. There is some line wrapping that doesn't make it _super_
readable but this is an unrelated problem to this change, but rather
a question of UI / API representation in the angular.io site.

PR Close #54053
2024-01-26 19:10:56 +00:00
Sylvain DEDIEU
1c49160129 docs(docs-infra): add if cases in templates to avoid internal marked parameters or methods to appear in the documentation (#52020)
Fix case of not wanted internal properties displayed in the documentation by adding if blocks in the concerned templates. So if the option is marked as internal the template won't create an entry in the documentation table for the concerned property of method

Fixes #52018

PR Close #52020
2024-01-26 15:47:15 +00:00
Sylvain DEDIEU
b1cc0923a0 docs(docs-infra): improve decorator deprecated property display in documentation (#52041)
Add the deprecated-api-item class on decorator-overview option code if deprecated. Add deprecated label on decorator-overview short description if deprecated. Add Add deprecated label on decorator option table header if option is deprecated.

PR Close #52041
2023-11-09 15:36:32 +00:00
Jeremy Elbourn
a49ee46dae docs(docs-infra): add support for block syntax to dgeni (#52123)
This adds the new block syntax to dgeni docs pipeline, mainly copying
the way that elements (`<ng-content>` etc.) work. Actual doc content is
just a placeholder for this PR.

PR Close #52123
2023-10-10 13:55:04 -07:00
Kristiyan Kostadinov
43e6fb0606 feat(core): enable block syntax (#51994)
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see #51979).

PR Close #51994
2023-10-03 15:26:05 -07:00
Andrew Scott
2d5b6fad4e fix(docs-infra): Ensure experimental tag shows up on docs (#51712)
The experimental tag is part of the stability tags along with "deprecated". This commit updates some code to pick up experimental as well.

PR Close #51712
2023-09-11 09:20:52 -07:00
Matthieu Riegler
b2661fe2a0 docs(docs-infra): Hide decorator option row if empty. (#51327)
In case where the decorator option has no description nor usageNotes, we can hide that row.

PR Close #51327
2023-08-11 06:07:38 -07:00
aanchal
388d1db89d docs: add the title tag (#51233)
PR Close #51233
2023-08-01 12:15:11 -07:00
Matthieu Riegler
33acf4f6ea docs(docs-infra): fix rendering of Exported from section on Firefox. (#51116)
On Firefox when an `a` element contains a `block` element, the `a` element is not aligned with the `li` marker.

Fixes #51112

PR Close #51116
2023-07-20 19:58:11 +00:00
aanchal
70c2e39b0b docs: updated the markup elements (#50586)
PR Close #50586
2023-06-06 14:14:26 -07:00
alkavats1
d856be0314 docs: removed the obsolete frameborder Tag and updated the files with using css (#50480)
PR Close #50480
2023-05-30 12:59:26 -07:00
alkavats1
7d8ebfc949 docs: updated the deprecated tag of width in table tag (#50487)
PR Close #50487
2023-05-30 09:21:27 -07:00
Mladen Jakovljević
3152c4de92 fix(docs-infra): remove extra slash from JSON-LD data (#50140)
Remove double slash from the "@id" field.

PR Close #50140
2023-05-23 14:13:10 +00:00
Matthieu Riegler
3e025d9d3b docs(docs-infra): Add a deprecated label to APIs (#50287)
This adds a deprecated label next to the other labels on the API pages for methods & properties.

Fixes #44265

PR Close #50287
2023-05-15 09:31:00 -07:00
Alex Rickabaugh
9d4842cadb Revert "docs(docs-infra): Remove unused annotation template (#50114)" (#50206)
This reverts commit a1ca162fd6.

This commit causes failures in g3, because `@Annotation` is load-bearing for
tsickle's decorator downleveling transformation.

PR Close #50206
2023-05-08 09:45:35 -07:00
Matthieu Riegler
a1ca162fd6 docs(docs-infra): Remove unused annotation template (#50114)
This page is unused since v7.

PR Close #50114
2023-05-03 10:39:49 +02:00
Matthieu Riegler
72ac1a0eab docs(docs-infra): hide Debugging the errorsection. (#50074)
On the error template, hide `Debugging the error` when there is none provided in the markdown file.

PR Close #50074
2023-05-02 12:15:01 +02:00
Matthieu Riegler
436050fcaa docs(docs-infra): Split Error by categories & sort by code. (#49343)
* 2 categories : Runtime errors and Compiler Errors.
* Numeric sort on error code.

PR Close #49343
2023-03-07 19:18:01 +00:00
Alan Agius
2dc31576ab ci: add Angular CLI help pages action (#48577)
This commits adds an action to update the Angular CLI help contents that are used by AIO to generate CLI guides.

This also changes the setup to include the files are source files instead of having to clone the repository each time. This also simplifies the PR review process of the PR opened by the action.

PR Close #48577
2023-01-10 08:01:38 -08:00
Derek Cormier
cd1a90974a build(bazel): fix broken aio github links on Windows
Caused the aio e2e tests to fail.
2022-11-22 13:51:16 -07:00
Derek Cormier
8678550a94 build(bazel): create targets for aio docs tests
This replaces the docs-test npm script
2022-11-22 13:51:16 -07:00
Alan Agius
73693be516 docs: improve grammer in CLI command template (#47891)
Before
```
This command has the following commands:
```

Now
```
This command has the following sub-commands:
```

PR Close #47891
2022-10-28 02:29:07 -07:00
Andrew Kushnir
fc07efdd2b fix(docs-infra): display "developer preview" label on class members (#47814)
This commit adds the "developer preview" label for class properties and methods.

PR Close #47814
2022-10-19 23:08:52 +02:00
Alan Agius
fc66f56c12 fix(docs-infra): wrap enum values in CLI commands (#46658)
This commit changes the enum seperator in the CLI command overview pages so that wrapping is allowed.

PR Close #46658
2022-07-06 07:29:50 -07:00
George Kalpakas
09ceb4ea64 fix(docs-infra): correctly populate "Description" column in CLI command overview (#46502)
Previously, the "Description" column of the CLI command overview section
was populated based on the CLI command docs' `description` property.
Since #45225, the short description of CLI commands is stored in the
`shortDescription` property.

This commit restores the content of the "Description" column by using
the correct property to populate it.

Fixes #46489

PR Close #46502
2022-06-27 10:50:32 -07:00
dario-piotrowicz
ba4f3aabee docs: add standalone details to NG0302 (#46090)
improve the error information of NG0302 by including details about
standalone pipes (and components)

PR Close #46090
2022-06-15 14:04:14 -07:00
Alex Rickabaugh
2444f36cbf fix(docs-infra): correct developer preview link (#46225)
The developer preview link was previously prefixed with the Github URL for
Angular's repo. However, it's meant to go to a guide page on AIO itself.
This commit removes the link prefix.

PR Close #46225
2022-06-02 12:35:13 -07:00
Alex Rickabaugh
85f485f676 feat(docs-infra): add @developerPreview tag for APIs in developer preview (#46050)
This commit adds a tag processor for `@developerPreview`. Adding this tag to
an exported symbol or to a decorator parameter causes an API status tag to
be shown for the API which links to the Developer Preview documentation.

PR Close #46050
2022-06-01 16:01:59 -07:00
Paul Gschwendtner
3a60063a54 build: updates to account for github primary branch rename
This is the commit accounting for the Github primary branch
rename when we actually perform the update.

We have three change phases: Prepare, Direct, Cleanup. This commit
is for the `direct` phase.
2022-04-28 11:17:01 -06:00
George Kalpakas
3dee3d107b fix(docs-infra): fix placement of "Edit source" button on errors and diagnostics pages (#45634)
This commit aligns the layout of errors and extended diagnostics pages
more closely with other docs pages to ensure that the "Edit source"
button is displayed correctly even when the heading is too long to fit
on a single line. For error pages, in particular, this ensures that the
button is not obscured by the error video.

**Before:**
![error-pages before][1]

**After:**
![error-pages after][2]

[1]: https://user-images.githubusercontent.com/8604205/163408291-7aebd029-891c-4045-8fa2-a8e2b2b06dab.png
[2]: https://user-images.githubusercontent.com/8604205/163408296-40e6df8e-aadc-4a82-978a-ab4d902b6f6e.png

PR Close #45634
2022-04-21 11:07:27 -07:00
Alan Agius
aec9abd374 fix(docs-infra): don't wrap subcommands in code element (#45343)
With this change we no longer wrap subcommands titles and sub navigation items in code element for nicer UI

PR Close #45343
2022-03-21 14:49:27 -07:00
Alan Agius
8f06fa3b20 feat(docs-infra): update CLI templates to match changes with new parser and folder structure (#45225)
The underlying parser that the CLI uses changed which caused minor changes in the generated JSON helps especially for subcommands.

The folder structure of the Angular CLI repo also changed slightly.

More context: https://github.com/angular/angular-cli/pull/22778

PR Close #45225
2022-03-10 15:51:18 -08:00
Mladen Jakovljević
9e56e400c5 fix(docs-infra): remove anchor tags from heritage docs (#45287)
Remove anchor tags from heritage docs and let `autoLinkCode` insert them properly.

PR Close #45287
2022-03-08 10:26:49 -08:00
George Kalpakas
7480660a95 fix(docs-infra): track error docs during serve-and-sync (#44704)
Refs #42966.

Look for changes in error docs (i.e. docs under `aio/content/error/`) in
`authors-package`, so that such docs are tracked when running the
`serve-and-sync` script.

PR Close #44704
2022-01-24 10:41:13 -08:00
Pete Bacon Darwin
e0c736066c build(docs-infra): ensure overloaded functions render correctly (#44090)
If there were 1 or 2 additional overloads on a free-standing function in the API the overloads were not being shown.

Also the type of overload parameters were not being escaped correctly.

PR Close #44090
2021-11-17 10:33:10 -08:00
Mladen Jakovljević
b393188899 fix(docs-infra): fix heritage links (#43956)
Fix incorrect escape of special characters when rendering member heritage docs. Example: DefaultIterableDiffer docs incorrectly renders what this class implements - it does not fully display generic types of implemented interfaces.

PR Close #43956
2021-10-27 16:13:34 +00:00
Pete Bacon Darwin
9a6bd264ab build(docs-infra): add a box around CLI command line reference syntax (#43850)
This commit helps to make the section that describes an overview of the syntax of a CLI command stand out from the surrounding text.

Closes #26574

PR Close #43850
2021-10-15 11:35:44 -07:00
Pete Bacon Darwin
fa6aa1be55 build(docs-infra): ensure all overloads are shown in interfaces (#43734)
In the API docs, concrete classes do not list the "implementation" overload on a method, since this is not strictly part of its API.

We recently fixed the rendering of interfaces to display all the overloads, since there is no "implementation" overload.

This commit also fixes the rendering of "pseudo-classes", which are a combination of an interface
and a constant.

Fixes #43001

PR Close #43734
2021-10-06 09:21:08 -07:00
Pete Bacon Darwin
d1589604a8 build(docs-infra): ensure all overloads are shown in interfaces (#43614)
In the API docs, concrete classes do not list the "implementation" overload on a method, since this is not strictly part of its API.
There is already a special case for abstract methods that do not have such an implementation overload.

But we were missing the case where the method was part of an interface. In interfaces none of the methods have implementation overloads.

Fixes #43001

PR Close #43614
2021-09-29 09:58:48 -07:00
George Kalpakas
d02c8da7bd fix(docs-infra): display deprecation notes for properties (#43566)
Previously, deprecation notes for deprecated class/interface properties
were not shown in the API docs. This commit fixes it by ensuring that
deprecation notes are shown for properites (similar to how it works for
methods).

PR Close #43566
2021-09-24 10:56:05 -07:00
George Kalpakas
bdefeb1f11 perf(docs-infra): reduce unnecessary whitespace in API docs (#43435)
The HTML for the docs pages is generated by Dgeni based on some
[Nunjucks][1] templates.

Previously, these templates were set up in a way that introduced a lot
excess whitespace in the generated HTML, unnecessarily bloating the
corresponding JSON files that need to be downloaded in order to view a
certain docs page. This has been discussed in #28105 and was again
observed while investigating #43285.

This commit refactors some of the templates related to API docs (which
seem to be the most affected ones) to drastically reduce the amount of
excess whitespace. More specifically, the total size of all files in
`generated/docs/api/` was reduced from ~13MB to ~7MB.

Besides the reduced payload size for each API page, this change will
also reduce the amount of memory needed by the ServiceWorker to cache
the API pages that have been visited by a user.

NOTE:
The affected files are not eagerly downloaded when navigating to
angular.io. Instead, each file is downloaded individually, as soon as a
user visits the corresponding API docs page. Therefore, the impact of
this change will be relatively small for most users.

[1]: https://mozilla.github.io/nunjucks/

PR Close #43435
2021-09-14 08:29:50 -07:00
George Kalpakas
549b372458 build(docs-infra): update github-slugger to 1.4.0 (#43435)
NOTE:
This [version][1] includes a breaking fix ([commit af59f343d][2]). More
specifically `github-slugger` will no longer trim the text of a heading
before generating an ID and (with whitespace converted to `-`) this
results in different heading IDs:
**Before:** `<h3>  foo bar  </h3>` --> `<h3 id="foo-bar">...`
**After:** `<h3>  foo bar  </h3>` --> `<h3 id="--foo-bar--">...`

The different IDs now break some of our anchor-links, becuase
`github-slugger` is used by [rehype-slug][3], which is in turn used by
our [autolinkHeadings][4] dgeni post-processor.

To avoid the issue with broken anchor links, we update the
`renderMethodDetail()` nunjucks macro to omit excess whitespace in
headings.

[1]: https://github.com/Flet/github-slugger/releases/tag/v1.4.0
[2]: af59f343dc
[3]: https://github.com/rehypejs/rehype-slug
[4]: 75a3c778b1/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.js (L3)

PR Close #43435
2021-09-14 08:29:49 -07:00
Pete Bacon Darwin
e4e98edf20 build(docs-infra): add sealed markers to classes in API pages (#42807)
This change will mark classes as `sealed` unless they have been annotated
with an `@extensible` jsdoc tag.

Fixes #42802

PR Close #42807
2021-08-17 09:23:09 -07:00
dario-piotrowicz
52dc65dd1b build(docs-infra): improve @usageNotes message (#42888)
improve the @usageNotes message by adding the word "is"
(outcome: "Further information is available in...", compared to
"Further information available in...")

PR Close #42888
2021-07-19 17:37:56 -07:00
dario-piotrowicz
bfa1b5d9eb fix(docs-infra): move dots inside Usage Notes anchor tag (#42725)
in the html generated aio docs the dots of "Usage Notes..."
should be part of the anchor tag, same as it is for "See More..."

PR Close #42725
2021-07-01 09:34:04 -07:00
George Kalpakas
fd78678284 refactor(docs-infra): make <details> styles more re-usable (#42620)
This commit makes the styling for `<details>` elements (including
expand/collapse actions in their `<summary>`) more re-usable.

PR Close #42620
2021-06-28 09:33:17 -07:00
Pete Bacon Darwin
15fca6ca94 build(docs-infra): remove disambiguator doc-type (#42414)
Now that we disambiguate files by encoding the outputPath, there is
no need for the `disambiguator` doc-type.

PR Close #42414
2021-06-17 18:14:53 +00:00
Pete Bacon Darwin
62aca30286 feat(docs-infra): add support for "special elements" (#41299)
This commit adds support for generating pages that document
special Angular elements, such as `ng-content` and `ng-template`,
which have special behavior in Angular but are not directives nor
components.

Resolves #41273

PR Close #41299
2021-06-16 14:01:16 -07:00
mgechev
c9bc88757b docs: embed the devtools video in the corresponding guide (#42161)
Allow people consume the content in a video format.

PR Close #42161
2021-05-20 16:55:16 +00:00