Commit graph

457 commits

Author SHA1 Message Date
Bob Watson
a6d953e145 docs: move tour of heroes tutorial to a subdirectory (#48162)
This commit prepares the documentation directories for future tutorials organized by directory.

Also, it moves the Angular Libraries topic from the Tutorials section to Developer Guides in TOC

PR Close #48162
2022-12-12 12:07:46 -08:00
Joey Perrott
303bb4d27c build: reformat BUILD files (#48181)
Reformat BUILD file usage of globs.

PR Close #48181
2022-11-22 21:22:34 +00:00
Derek Cormier
903917b13d build(bazel): remaining AIO Bazel migration fixes 2022-11-22 13:51:16 -07:00
Derek Cormier
320f521a8c build(bazel): fix regressions for docs-watch
Some earlier refactoring prevented the watchr script from running in
the source tree. There was also a Windows issue where running architect
didn't preserve symlinks causing the app to not be served.
2022-11-22 13:51:16 -07:00
Derek Cormier
4247136226 build(bazel): fix a regression where github links were incorrectly
written

Incorrectly prepended 'packages/' to docs that were under aio/content.
2022-11-22 13:51:16 -07:00
Derek Cormier
92d18bbac0 build(bazel): use workspace status command for AIO version stamping
Fixes a bug where the navigation map did not have the correct SHAs.
2022-11-22 13:51:16 -07:00
Derek Cormier
e4b82cea26 build(bazel): clean up pathing in aio build tooling
Make use of process.env.RUNFILES.
2022-11-22 13:51:16 -07:00
Derek Cormier
ffea372105 build(bazel): update documentation for docs authors
Where possible, preseve the original yarn commands.
2022-11-22 13:51:16 -07: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
0d8f87407f build(bazel): use git toolchain for dgeni build
Now using a toolchain from dev-infra that provides the
path to git in a template var.
2022-11-22 13:51:16 -07:00
Derek Cormier
8775a745ad build(bazel): fix some aio linting errors
Surfaced by modifying ci to include aio targets
2022-11-22 13:51:16 -07:00
Derek Cormier
50dee93f35 build(bazel): add aio targets to ci
This is a first pass. There is more work to do on package.json, adding
more test targets under bazel, and revising documentation.
2022-11-22 13:51:16 -07:00
Derek Cormier
07126ae40f build(bazel): fix race conditions in windows aio build
Disables the rules_nodejs linker and adds a custom esm module resolver
2022-11-22 13:51:16 -07:00
Derek Cormier
7c8ca113c1 build(bazel): replace ignore example feature with bazel equivalent
Comment out the entry in the EXAMPLES map to ignore an example.
2022-11-22 13:51:16 -07:00
Derek Cormier
7642abfb7a build(bazel): fix bazel aio regressions after rebase
The aio-bazel-migration branch was rebased onto main to include runfiles
support on windows.
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
Derek Cormier
2daf369ec8 build(bazel): add an aio fast serve target
This is equivalent to docs-watch in the legacy build.
2022-11-22 13:51:16 -07:00
Derek Cormier
655427f9b8 build(bazel): add a bazel aio serve target
This works with ibazel but is not highly incremental
2022-11-22 13:51:16 -07:00
Derek Cormier
431c562815 build(bazel): add bazel targets for aio doc generation
This is an incremental step to produce dgeni output with bazel. The
generated outputs are not yet used by other targets.
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
Marc Wrobel
eca3db5692 docs(docs-infra): fix minor typos in angular.io (#47295) (#47295)
PR Close #47295

PR Close #47295
2022-09-07 10:47:21 -07:00
Angular Robot
bea953a5cf build: update dependency typescript to ~4.8.0 (#47293)
See associated pull request for more information.

PR Close #47293
2022-09-06 13:10:36 -07:00
George Kalpakas
14f505abd4 fix(docs-infra): prevent unnecessary warning in mergeOverridenImplementation Dgeni processor (#47201)
The `mergeOverridenImplementation` processor tries to ensure that any
doc used with the `@overrideImplementation` annotation is not itself
public (and explicitly marks is as internal if it is).

Previously, it determined the public/private status of a doc by only
checking the value of the doc's `internal` property (which is mainly set
via the `@internal` annotation). This failed to account for docs marked
as "private exports" (such as those prefixed with `ɵ`), which are
essentially also treated as internal.

This would result in incorrect warnings. [Example warning][1]:

> Constructor doc forms/ɵFormControlCtor was not marked '@internal';
> adding this annotation.

This commit prevents the incorrect warning by also checking the value of
the doc's `privateExport` property to determine its public/private
status.

[1]: https://circleci.com/gh/angular/angular/1215057#step-104-164

PR Close #47201
2022-08-22 10:51:02 -07:00
George Kalpakas
35171a8681 build(docs-infra): improve error message in mergeOverridenImplementation Dgeni processor (#47201)
Previously, error messages related to an overriden constructor doc would
stringify the doc as `[object Object]`, which is not helpful for
debugging the issue. For example:

> Constructor doc [object Object] was not marked '@internal'

This commit improves the error message by including the doc's ID
instead. For example, the above error message would become:

> Constructor doc forms/ɵFormControlCtor was not marked '@internal'

PR Close #47201
2022-08-22 10:51:02 -07:00
Andrew Kushnir
7e491cfab3 fix(docs-infra): do not require @ngModule tag on standalone types (#47024)
This commit updates docs extraction logic to avoid requiring the `@ngModule` tag on standalone types, since they don't have to be present in any NgModule.

PR Close #47024
2022-08-03 11:04:55 -07: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
George Kalpakas
3fdcf991c7 build(docs-infra): be able to resolve root-relative image URLs in getImageDimensions() (#46138)
Previously, `getImageDimensions()` would try to resolve image URLs
relative to the base path using `path.resolve()`. This resulted in
root-relative URLs (i.e. URLs starting with `/`) being treated as
absolute filesystem paths and thus resolving incorrectly
([example failure][1]).

This commit fixes it by using `.join()` instead, which is more
appropriate in this case. (Originally discussed [here][2].)

[1]: https://circleci.com/gh/angular/angular/1173150
[2]: https://github.com/angular/angular/pull/46134#issuecomment-1137191996

PR Close #46138
2022-05-26 11:25:07 -07:00
Thomas Mair
863c32e8c9 fix(docs-infra): add member name to search index without ignore list (#46060)
Previously classs, interface and enum members where filtered with the default word ignore list. This lead to  poor search results if a search for a member on the ignore list was performed.

PR Close #46060
2022-05-23 09:56:08 -07:00
Paul Gschwendtner
68a6a075f4 build: clean up references to old master branch (#45856)
Cleans up all references to the `master` branch we renamed to
`main` across Angular.

PR Close #45856
2022-05-04 16:23:33 -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
Andrew Kushnir
788f587367 fix(docs-infra): avoid internal symbols from being referenced during auto-linking (#45689)
This commit adds extra logic to avoid internal and privately exported symbols from being referenced during auto-linking. Currently such symbols can be used for linking, thus resulting in a non-existing link and causing the linking process to fail.

PR Close #45689
2022-04-20 09:11:22 -07:00
Tobias Speicher
4ddcf81e61 refactor: replace deprecated String.prototype.substr() (#45397)
.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

PR Close #45397
2022-03-24 11:48:09 -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
34218ecdb4 feat(docs-infra): remove hidden commands processor (#45225)
Hidden commands are no longer included in help JSON output.

PR Close #45225
2022-03-10 15:51:18 -08: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
Dylan Hunn
f0cfa00a34 refactor(forms): Move FormControl to an overridden exported constructor. (#44316) (#44806)
This implementation change was originally proposed as part of Typed Forms, and will have major consequences for that project as described in the design doc. Submitting it separately will greatly simplify the risk of landing Typed Forms. This change should have no visible impact on normal users of FormControl.

See the Typed Forms design doc here: https://docs.google.com/document/d/1cWuBE-oo5WLtwkLFxbNTiaVQGNk8ipgbekZcKBeyxxo.

PR Close #44316

PR Close #44806
2022-01-31 22:48:23 +00:00
George Kalpakas
c577a1dc93 fix(docs-infra): fix links to CLI commands source code (#44835)
Recently, the [CLI repository][1] switched to not prefixing tag names
with a `v`. Update the `versionInfo` generated for CLI commands docs, so
that the links to the source code (which include the tag name) are
correct.

Fixes #44822

[1]: https://github.com/angular/angular-cli

PR Close #44835
2022-01-28 16:07:47 +00: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
George Kalpakas
b19c3f7e71 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
Dylan Hunn
c2da290659 feat(docs-infra): Add a new processor for @overriddenImplementation. (#44689)
This new processor, named `mergeOverriddenImplementation`, allows Dgeni to produce correct documentation for symbols with overridden exported constructors. For example, in the following example, the implementation documentation will be used, including the constructor signature:

```
export const Foo: FooCtor = FooImpl as FooCtor;
```

This is a major improvement over the current situation, in which no constructor signature is documented whatsoever.

PR Close #44689
2022-01-13 12:02:22 -08:00
Borja Paz Rodríguez
9d2401d99a docs: fix several typos (#44508)
PR Close #44508
2022-01-04 12:13:46 -08:00
dario-piotrowicz
f3898f8d84 fix(docs-infra): prevent automatic linking of 'json' (#44294)
add 'json' to the ignoreGenericWords set so that it doesn't get
wrongly linked to the jsonPipe during the aio docs generation
as it is a generic javarscript term

PR Close #44294
2021-12-01 15:22:00 -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