4816 Commits

Author SHA1 Message Date
George Kalpakas 585b3dec5d build(docs-infra): upgrade cli command docs sources to 18b20d67b (#43025)
Updating [angular#12.1.x](https://github.com/angular/angular/tree/12.1.x) from
[cli-builds#12.2.x](https://github.com/angular/cli-builds/tree/12.2.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/0ab046223...18b20d67b):

**Modified**
- help/e2e.json

PR Close #43025
2021-08-04 08:59:53 -07:00
dario-piotrowicz a036cb5d17 docs: amend links in content-projection guide (#43009)
PR Close #43009
2021-08-02 15:36:52 -07:00
Nichola Alkhouri 67a25b7410 docs: Fix wrongly provided/Injected AnimalService (#42988)
In the logical tree example which demonstrate the use of `@SkipSelf` and  `@Host`, the provided and injected `AnimalService` are reversed.
PR Close #42988
2021-07-29 15:05:52 -07:00
Joe Martin da35c0409f docs: Add josmar-crwdstffng to contributors list. (#42972)
Add josmar-crwdstffng to list in contributors.json.  Add josephmmartin
image file.

PR Close #42972
2021-07-28 15:56:01 -07:00
codebriefcase c7e4f14bc8 docs: include interpolations in the "What is Angular" example (#42702)
Affected URL - https://angular.io/guide/what-is-angular#template

Fixes #42665

PR Close #42702
2021-07-28 10:53:33 -07:00
George Kalpakas 3e1657d560 fix(docs-infra): notify ErrorHandler of UnrecoverableState errors (#42941)
With this commit, the `ErrorHandler` is notified of ServiceWorker
`UnrecoverableState` errors. The main purpose of this change is
gathering info about the occurrence (and frequency) of such errors in
Google analytics.

PR Close #42941
2021-07-27 09:23:15 -07:00
Vladyslav 0bf6ab4066 docs: updated input-output page documentation content (#42964)
PR Close #42964
2021-07-27 09:22:20 -07:00
Yuvaraj 5cffdd0e54 docs: fix the selector in component interaction guide (#42891)
The selector for the `CountdownTimerComponent` is `app-countdown-timer`
not `countdown-timer`.

PR Close #42891
2021-07-26 11:47:56 -07:00
Teri Glover e8eb87ff58 docs: Edits to remove jargon (#42861)
PR Close #42861
2021-07-23 17:12:51 -07:00
George Kalpakas 065d263547 build(docs-infra): upgrade cli command docs sources to 0ab046223 (#42944)
Updating [angular#12.1.x](https://github.com/angular/angular/tree/12.1.x) from
[cli-builds#12.1.x](https://github.com/angular/cli-builds/tree/12.1.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/18bbd044d...0ab046223):

**Modified**
- help/generate.json

PR Close #42944
2021-07-23 10:36:22 -07:00
Renovate Bot a69edc487f build: update dependency globby to v12 (#42945)
Update dependency `globby` to v12.

PR Close #42945
2021-07-23 10:35:30 -07:00
George Kalpakas 246cdadcdc build(docs-infra): switch the example-e2e script to ESM (#42945)
Switch the JS script used for running the docs examples tests from
CommonJS to ESM format. This is necessary for upgrading the `globby`
dependency to [version 12.0.0][1] in a subsequent commit.

[1]: https://github.com/sindresorhus/globby/releases/v12.0.0

PR Close #42945
2021-07-23 10:35:30 -07:00
George Kalpakas da0dabc6b4 build(docs-infra): switch the generate-stackblitz/zips scripts to ESM (#42945)
Switch the JS scripts used for generating StackBlitz projects and zips
from CommonJS to ESM format. This is necessary for upgrading the
`globby` dependency to [version 12.0.0][1] in a subsequent commit.

[1]: https://github.com/sindresorhus/globby/releases/v12.0.0

PR Close #42945
2021-07-23 10:35:30 -07:00
Pete Bacon Darwin dda23b9cb0 docs: fix spacing in code style guide (#42908)
Fixes #42906

PR Close #42908
2021-07-22 16:25:40 +00:00
Teri Glover c2d3f60da0 docs: Edits to remove jargon (#42907)
PR Close #42907
2021-07-22 16:24:16 +00:00
George Kalpakas 29f50976db fix(docs-infra): fix keyword color in CLI pages code blocks (#42889)
Previously, names of CLI commands that also happened to be keywords were
shown in black color in the code block demonstrating the command's
usage. This worked fine when in light mode (where the code block
background is white) but not in the recently introduced dark mode (where
the code block background is dark gray).

This commit fixes this by ensuring the `.kwd` token color is inherited
from its parent (which has an appropriate color for the current theme).
Previously, the `.kwd` token was reset to its initial value (which is
`black` regardless of the theme).

**Before:** ![CLI pages keyword before][1]
**After:** ![cli-pages-keyword after][2]

[1]: https://user-images.githubusercontent.com/8604205/126073803-af317f0c-d04f-4c3a-9a83-e92541d7dd5a.png
[2]: https://user-images.githubusercontent.com/8604205/126073806-1d57e3ed-90b1-4735-ae2a-d0a39862bb95.png

PR Close #42889
2021-07-20 11:56:34 -07:00
dario-piotrowicz e6b7472d11 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:57 -07:00
George Kalpakas 778edfc63c fix(docs-infra): prevent main content from overlapping with ToC (#42884)
Previously, if there was more content than what would horizontally fit
in the main content area, it would overflow to the right and overlap
with the Table of Contents (ToC).
This was accidentally introduced in #42787.

This commit fixes it by ensuring that the main content area will not
overlap with ToC and the necessary space for the ToC will be reserved
using `margin` (instead of `padding`, which contributes to the element's
size).

Fixes #42867

PR Close #42884
2021-07-19 17:35:36 -07:00
George Kalpakas 89893972c8 fix(docs-infra): correctly handle reported errors (#42883)
Error-handling in AIO happens mainly in two places:
1. For errors happening inside the app we have a custom `ErrorHandler`
   implementation, `ReportingErrorHandler`. `ReportingErrorHandler`
   passes errors to the default `ErrorHandler` (for them to be logged to
   the console) and also forwards them to `window.onerror()`.
2. Errors happening outside the app and errors forwarded by
   `ReportingErrorHandler` are handled by `window.onerror()`, which in
   turn reports them to Google analytics.

Previously, we were making some assumptions (which turned out to be
incorrect based on the info captured in Google analytics - see #28106):
- `ReportingErrorHandler` assumed that the errors passed to its
  `handleError()` method would be either strings or `Error` instances.
  _Apparently, other values (such as `null` or `undefined`) may also be
  passed._
- `window.onerror()` assumed that if an `Error` instance was passed in,
  it would always have a stacktrace (i.e. its `stack` property would be
  defined).
  _This is not necessarily true, although it is not clear (based on the
  logs) whether reported errors of this type are caused by `Error`
  instance with no stacktrace or by non-string error objects which are
  incorrectly treated as `Error` instances.

This commit ensures that all types of error arguments can be handled
correctly, including `Error` instances with no stacktrace and other
types of objects or primitives.

NOTE:
PR #42881 is related as it fixes handling `null` and `undefined`
arguments in the default `ErrorHandler`.

Fixes #28106

PR Close #42883
2021-07-19 17:35:03 -07:00
David Shevitz c06cbb2ec4 docs: remove references to future in topic (#42841)
Fixes #25704

PR Close #42841
2021-07-15 13:23:28 -07:00
dario-piotrowicz 688b1c5b53 docs(docs-infra): remove unnecessary "Podcast" from happy-angular podcast's title (#42756)
PR Close #42756
2021-07-15 13:22:04 -07:00
dario-piotrowicz 12ad314d5a docs(docs-infra): add the angular show to the podcast resources (#42756)
PR Close #42756
2021-07-15 13:22:04 -07:00
dario-piotrowicz 8b9aea9503 docs(docs-infra): podcast keys cleanup in resources.json (#42756)
PR Close #42756
2021-07-15 13:22:04 -07:00
dario-piotrowicz 1d9d74a2d1 docs(docs-infra): remove deep dive from podcast resources (#42756)
PR Close #42756
2021-07-15 13:22:03 -07:00
Krzysztof Kotowicz e6f01d777d revert: docs: remove references to Trusted Types due to incompatibility with Webpack 5 (#42796)
Re-add reference to Trusted Types since the issue #41754 is resolved in 12.1.1.

This reverts commit 7254fbc2baa1455e3b24400597342843df3017f2.

PR Close #42796
2021-07-14 11:14:08 -07:00
Alan Agius fa3e7f87e7 docs: remove End-to-end test files structure (#42844)
Since version 12, the Angular CLI no longer generates end-to-end tests.

PR Close #42844
2021-07-14 11:12:42 -07:00
David Shevitz 8d184f9a31 docs: update incorrect bullet text (#42839)
Fixes #42286

PR Close #42839
2021-07-14 11:11:56 -07:00
David Shevitz 34b2669d3a docs: update routing-overview topic with link to custom route matches tutorial (#42837)
PR Close #42837
2021-07-13 14:07:16 -07:00
Pete Bacon Darwin 4f8a7280c1 docs: move start tutorial alert for clarity (#42764)
The alert was placed in the middle of a set of steps, which
was causing some confusion. This has been moved to the
above the steps in the section and slightly reworded to
make it clearer.

Fixes #42752

PR Close #42764
2021-07-12 13:20:13 -07:00
dario-piotrowicz 12a9d2152e docs(core): edit and add docs for ng-template (#42704)
PR Close #42704
2021-07-12 09:39:30 -07:00
George Kalpakas 51fd5e3742 fix(docs-infra): fix margin of social icon on small screens (#42790)
This commit fixes the margin of the social icons on small screens. This
mainly affects screens between 420px and 480px, where only one social
icon is show (due to limited space) but not necessarily the first one
(in DOM order).

**Before:** ![social icon before][1]
**After:** ![social icon after][2]

[1]: https://user-images.githubusercontent.com/8604205/124788616-2f5f0200-df52-11eb-9ec2-9e46b90cd286.png
[2]: https://user-images.githubusercontent.com/8604205/124788623-2ff79880-df52-11eb-90ec-31b04973de68.png

PR Close #42790
2021-07-09 10:15:28 -07:00
Bastian 723342a60a docs: fix http example to show actual message in console (#42773)
Previously, the error message in the console would print `[object Object]`
and not the actual error message. With this change, the error message is
printed in the console.

PR Close #42773
2021-07-09 10:14:35 -07:00
George Kalpakas fe602c9c4e fix(docs-infra): ensure the sidenav backdrop covers the floating ToC (#42787)
Previously, on narrow pages where the sidenav was in `over` mode, the
sidenav's backdrop only covered the main docs content but not the
floating Table of Contents (ToC) on the right. This was inconsistent and
confusing to the user, because they could interact with the ToC and
scroll to different area of the main content while the sidenav and
backdrop were still covering the content.

This commit fixes it by ensuring the sidenav backdrop covers both the
main content and the floating ToC (when present).

Fixes #42778

PR Close #42787
2021-07-07 13:40:01 -07:00
George Kalpakas b9ab8b99a1 fix(docs-infra): log more SW debug info (#42776)
This commit expands the info printed to the console to help diagnose
ServiceWorker issues to include the [internal debug info][1] retrieved
from `/ngsw/state`. This will provide more useful data, such as the
activated SW's version, state, clients, recent operations and any recent
errors.

NOTE:
This temporarily increases the payload size. Removing this code and
reclaiming the payload size is being tracked in #41117.

[1]: https://angular.io/guide/service-worker-devops#locating-and-analyzing-debugging-information

PR Close #42776
2021-07-07 13:37:06 -07:00
George Kalpakas 0540a0339e refactor(docs-infra): replace deprecated Sass / division with math.div() (#42776)
This commit replaces the deprecated `/` operators used for division in
Sass files with the [recommended][1] `math.div()` function to get rid of
build warnings ([example][2]).

[1]: https://sass-lang.com/documentation/breaking-changes/slash-div
[2]: https://circleci.com/gh/angular/angular/1017640

PR Close #42776
2021-07-07 13:37:06 -07:00
George Kalpakas 89e7e52041 test(docs-infra): prevent warning due to missing expectation (#42776)
Fix a unit test warning due to Jasmine not realizing that
`httpMock.expectOne()` is an expectation.

[Example][1]:

> WARN: 'Spec 'DocumentService currentDocument should encode the request
> path to be case-insensitive' has no expectations.'

[1]: https://circleci.com/gh/angular/angular/1017640

PR Close #42776
2021-07-07 13:37:06 -07:00
George Kalpakas bdac537852 build(docs-infra): update @angular/* to 12.1.1 (#42776)
Update `@angular/*` packages to latest 12.1.x versions (mainly to take
advantage of recent ServiceWorker improvements, such as #42607
and #42622).

PR Close #42776
2021-07-07 13:37:06 -07:00
dario-piotrowicz 9619255dd5 fix(docs-infra): slightly improve top-menu responsiveness (#42753)
make sure that the top-menu links don't get overlapped by
the search input, regardless on the browser's font-size and
the window's width

make also sure that the header's logo does not overlap the search
input on narrow windows, again regardless on the browser's font-size

PR Close #42753
2021-07-07 13:36:38 -07:00
Ryan Andersen eca48016c4 docs: add missing import to CartService tutorial instructions (#42701)
PR Close #42701
2021-07-07 09:54:55 -07:00
Theoklitos Bampouris ec60d10422 docs: change misspelled function (#42742)
Change the router.navigateUrl() to the correct function router.navigate() according to code example.
PR Close #42742
2021-07-07 09:54:24 -07:00
George Kalpakas aa261e7e01 fix(docs-infra): correctly configure top-menu nav-item in the sidenav (#42747)
Previously, the condition for showing the top-menu nav-menu in the
sidenav was the same as that for switching the sidenav mode from docked
(`mode: side`) to floating (`mode: over`). Therefore, the `isWide` input
of the corresponding `NavMenuComponent` could be hard-coded to `false`
(since the component would only be shown when the sidenav was in
floating mode).

In 61f6ed2fdf, these two desicions were
decoupled, which would result in the top-menu nav-item being shown in
the sidenav while the sidenav is in docked mode (and thus the `isWide`
input should be set to `true`).

This commit fixes it by setting the `isWide` input based on the value of
the `dockSideNav` property, as happens for the rest of the nav-menus.

PR Close #42747
2021-07-02 09:23:05 -07:00
George Kalpakas ee3fe6b8a2 refactor(docs-infra): simplify condition for determining sidenav mode (#42747)
Previously, the `AppComponent#showTopMenu` property was taken into
account when determining the `MatSidenav#mode` value. However, this was
redundant, because in the only case in which the use of `showTopMenu`
would make a difference (i.e. when `dockSideNav` was true and
`isSideNavDoc` was false) the sidenav would be closed and the hamburger
menu button would not be visible (thus there would be no way to open it
manually).

This commit simplifies the condition for determining the sidenav mode by
removing `showTopMenu` from the expression.

PR Close #42747
2021-07-02 09:23:05 -07:00
dario-piotrowicz 723d21455a 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:05 -07:00
mgechev 0cf388e882 docs: add last updated date to roadmap (#42615)
PR Close #42615
2021-06-30 11:41:57 -07:00
pavlenko c380d56c6d docs: setting context value inside an interceptor (#42699)
Usage of `get`/`set` methods should be done on a context object instead of a `HttpRequest` instance.

PR Close #42699
2021-06-30 09:13:46 -07:00
George Kalpakas 78cf10b28b refactor(docs-infra): make angular.io and docs examples compatible with RxJS v7 (#42660)
This commit applies the necessary changes to make angular.io and (most)
docs examples compatible with both RxJS v6 and v7. It also adds new
steps to relevant CI jobs to test angular.io and docs examples against
RxJS v7 as well (to catch potential regressions).

NOTE:
Some of the docs examples are not compatible with RxJS v7 and are
therefore excluded from the tests. The SystemJS-based ngUpgrade
examples in particular are excluded, since they require a different
SystemJS configs to run against RxJS v6 and v7 and the extra complexity
of managing that is not worth it for the 4 affected examples.

PR Close #42660
2021-06-29 10:29:58 -07:00
George Kalpakas a0e5b85694 test(docs-infra): allow excluding certain docs examples from tests (#42660)
This commit adds support for excluding certain docs examples from the
command used to run tests. This is useful to run extra tests on CI that
might not be compatible with all examples (for example, run tests with
different versions of a dependency).

In a subsequent commit, this will be used to run tests against RxJS v7
as a quick way to catch potential regressions.

PR Close #42660
2021-06-29 10:29:58 -07:00
George Looshch ace0a50646 docs: remove duplicate link to guide/inputs-outputs.md (#42654)
When you click on `Understanding Angular > Components > Sharing data between
child and parent directives and components` in navigation sidebar, another
item gets selected: `Understanding Angular > Templates > Inputs and Outputs`
Both of them are linked to the same guide but the view cannot handle
situations when several entries point to the same guide.

This commit fixes that by removing the second entry.

Fixes #42652

PR Close #42654
2021-06-29 09:27:48 -07:00
Lars Gyrup Brink Nielsen a1e036cfd1 docs: correct literal string example (#42623)
Change literal string example `pi` to `'pi'`.

PR Close #42623
2021-06-28 10:05:10 -07:00
codebriefcase 7ea1d4720a fix(docs-infra): styling fix on error pages (#42627)
Add Center Aligment for heading texts and additional styles on 404 (not found) related pages

PR Close #42627
2021-06-28 09:50:24 -07:00