4889 Commits

Author SHA1 Message Date
Joe Martin (Crowdstaffing) 2050b0898b docs: update grammar (#43451)
Update grammar per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) 5af9404cba docs: update grammar (#43451)
Update grammar per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) d5c58414ab docs: update link (#43451)
Update link per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) 69035dd52d docs: update punctuation (#43451)
Update punctuation per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) 1a3a87057a docs: update grammar (#43451)
Update grammar per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) 75abf868c0 docs: update spelling (#43451)
Update spelling per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
Joe Martin (Crowdstaffing) f099d9c0ea docs: update capitalization (#43451)
Update capitalization per review.

PR Close #43451
2021-09-14 15:51:31 -07:00
David Shevitz 2f94ac374a docs: add guidelines for localizing angular documentation (#43314)
PR Close #43314
2021-09-14 08:32:51 -07:00
George Kalpakas d2bee44951 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:51 -07:00
George Kalpakas 7f23958c73 build(docs-infra): update remark-html to 13.0.2 (#43435)
NOTE:
This [version][1] includes a breaking fix ([commit b0b1ba5c5][2]), which
turns sanitization on by default. Since, we don't need sanitization (the
HTML is authored by docs authors and tooling and should be safe), this
commit restores the old behavior by setting the [sanitize][3] option to
`false`.

[1]: https://github.com/remarkjs/remark-html/releases/tag/13.0.2
[2]: https://github.com/remarkjs/remark-html/commit/b0b1ba5c55a58b26bbe1ca3b6def18e95dbbd89e
[3]: https://github.com/remarkjs/remark-html#optionssanitize

PR Close #43435
2021-09-14 08:29:50 -07:00
George Kalpakas e74eac2368 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]: https://github.com/Flet/github-slugger/commit/af59f343dc7fe88a94a79c721fb3225a275a095d
[3]: https://github.com/rehypejs/rehype-slug
[4]: https://github.com/angular/angular/blob/75a3c778b1f7be913f0287423d40fade68ee9adc/aio/tools/transforms/angular-base-package/post-processors/autolink-headings.js#L3

PR Close #43435
2021-09-14 08:29:50 -07:00
Naveed Ahmed a102b27641 fix(service-worker): clear service worker cache in safety worker (#43324)
clear angular service worker cache in safety worker to ensure stale
or broken contents are not served in future requests

Fixes #43163

PR Close #43324
2021-09-13 14:34:33 -07:00
mezhik91 baf8145ee0 docs: add Dmytro Mezhenskyi to GDE resources (#43282)
PR Close #43282
2021-09-13 12:57:00 -07:00
dario-piotrowicz 52c320fda6 docs: remove unnecessary "https://angular.io/" from aio links (#43425)
PR Close #43425
2021-09-13 09:24:07 -07:00
Bjarki 604965bdde build(docs-infra): enable tsec security checker (#43406)
tsec is a TypeScript compiler wrapper for restricting use of
security-sensitive DOM APIs, in particular those that could lead to XSS
or Trusted Types violations. Add it as a linter to aio to prevent future
Trusted Types regressions on angular.io.

Also introduces security_exemptions.json, which lists the known,
security-reviewed tsec security violations. New entries can only be
added to this file after a security review, in particular making sure
that the corresponding code does not cause XSS vulnerabilities or
Trusted Types violations.

PR Close #43406
2021-09-10 09:24:48 -07:00
Bjarki 2f47de82af build(docs-infra): send CSP reports for Trusted Types violations (#43406)
Configure Firebase to serve a CSP header on angular.io that enables
Trusted Types in report-only mode. This causes any Trusted Types
violations that may occur as users browser angular.io to generate a CSP
report that is sent to csp.withgoogle.com, where it is processed by
Google's CSP report collector.

This is a non-breaking change that allows us to evaluate whether
angular.io is fully compatible with Trusted Types, at which point we can
start enforcing Trusted Types.

PR Close #43406
2021-09-10 09:24:48 -07:00
Bjarki d86e1aba0d build(docs-infra): enable Trusted Types enforcement in angular.json (#43406)
Configure angular.json to serve a CSP header that enabled Trusted Types
in enforcement mode, both in e2e tests and when running the local
development server. This should help prevent regressions related to
Trusted Types in the angular.io app.

PR Close #43406
2021-09-10 09:24:48 -07:00
Bjarki e5ee5a26eb fix(docs-infra): pass a TrustedScriptURL to ServiceWorkerModule (#43406)
Fix a Trusted Types violation in ServiceWorkerModule that occurs when
initializing the service worker from a string URL, by passing a
TrustedScriptURL instead.

PR Close #43406
2021-09-10 09:24:48 -07:00
Bjarki 586302ab2b fix(docs-infra): make doc-viewer compatible with Trusted Types (#43406)
Change DocumentContents.contents to a TrustedHTML and update users
accordingly.

PR Close #43406
2021-09-10 09:24:48 -07:00
Bjarki 02c514e670 fix(docs-infra): make custom icon registry compatible with Trusted Types (#43406)
Change SvgIconInfo.svgSource to be a TrustedHTML and update all its
users accordingly. Also introduce the svg template tag function for
building TrustedHTML from constant SVG sources.

PR Close #43406
2021-09-10 09:24:48 -07:00
Bjarki 501cbc59cc fix(docs-infra): make pretty-printer compatible with Trusted Types (#43406)
Change the PrettyPrinter interface to accept a TrustedHTML and patch
prettify.js so that it makes use of that value without modification.
Update all users of the service to produce, and pass in a TrustedHTML.

PR Close #43406
2021-09-10 09:24:48 -07:00
Bjarki ae1387440b fix(docs-infra): fix simple Trusted Types violations (#43406)
Also introduce a dependency on the Trusted Types type definitions and a
Trusted Types polyfill, safevalues. Create a security module for common,
security-reviewed transformations into Trusted Types.

PR Close #43406
2021-09-10 09:24:48 -07:00
Bjarki 93bb2dde3e fix(docs-infra): fix Trusted Types violation in Analytics snippet (#43406)
The Google Analytics snippet loads its runtime by dynamically creating a
script element and assigning a URL to its src attribute. This causes a
Trusted Types violation.

To fix this, create an inline Trusted Types policy called 'aio#analytics'
to bless the script URL, which is a trusted constant.

PR Close #43406
2021-09-10 09:24:48 -07:00
mgechev b4a551c7f4 docs: add ngUpgrade maintenance timeline (#43379)
Add details about the maintenance timeline for ngUpgrade, reflecting
the deprecation of AngularJS.

PR Close #43379
2021-09-10 09:23:12 -07:00
dario-piotrowicz 08528e9f71 docs: amend code related to string-expressions for property binding (#43366)
resolves #43287

PR Close #43366
2021-09-10 09:22:14 -07:00
Aristeidis Bampakos cbf360ddba docs: add Architect Training to resources (#43327)
PR Close #43327
2021-09-09 14:54:00 -07:00
Aristeidis Bampakos 8cc93b723c docs: add Angular Projects book in resources (#43130)
PR Close #43130
2021-09-09 11:33:37 -07:00
David Shevitz a0f0dee25b docs: update the reviewed tag for what-is-angular topic (#43213)
PR Close #43213
2021-09-09 11:30:31 -07:00
Amadou Sall 0cc7ef658c docs: remove extraneous word in the Dependency injection in action guide (#43255)
PR Close #43255
2021-09-09 11:27:31 -07:00
Michele Stieven 565b749713 docs: add Michele Stieven to GDE resources (#43233)
PR Close #43233
2021-09-09 11:21:03 -07:00
George Kalpakas 0e14deeb92 docs(bazel): fix outdated redirect URL for /guide/bazel (#43376)
The file we are redirecting `/guide/bazel` to was moved from
`bazel/src/schematics/README.md` to `bazel/docs/BAZEL_SCHEMATICS.md` in
commit 71b8c9ab29.

Update the Firebase configuration to use the new path in the redirect
URL.

PR Close #43376
2021-09-09 09:17:40 -07:00
Charles Barnes 0bfb5b1f00 docs: remove Angular 9 from support table (#43350)
PR Close #43350
2021-09-07 21:29:32 +00:00
dario-piotrowicz 1bc1971d15 docs: fix app-hero-detaill typo (#43349)
PR Close #43349
2021-09-07 21:25:03 +00:00
Enea Jahollari aa1782cee6 docs: enhance spacings in dynamic component loader section examples (#43241)
PR Close #43241
2021-09-02 16:45:10 +00:00
Enea Jahollari 4e4a198b3f docs: enhance spacings in content projection section examples (#43241)
PR Close #43241
2021-09-02 16:45:10 +00:00
Enea Jahollari 5af952491a docs: enhance spacings in inputs outputs section examples (#43241)
PR Close #43241
2021-09-02 16:45:10 +00:00
Enea Jahollari d7711d0510 docs: enhance spacings in component interaction section examples (#43241)
PR Close #43241
2021-09-02 16:45:10 +00:00
Enea Jahollari f5d0c889ab docs: enhance spacings in component lifecycle section examples (#43241)
PR Close #43241
2021-09-02 16:45:09 +00:00
Enea Jahollari dc46cc4b37 docs: enhance spacings in component overview section examples (#43241)
PR Close #43241
2021-09-02 16:45:09 +00:00
Enea Jahollari 39c50b577e docs: enhance spacings in try it section examples (#43241)
PR Close #43241
2021-09-02 16:45:09 +00:00
Enea Jahollari 8e1c309e52 docs: enhance what is angular section spacing (#43241)
PR Close #43241
2021-09-02 16:45:09 +00:00
Pete Bacon Darwin a6e22c4b8e build(docs-infra): update dgeni-packages to improve checkLinks messages (#43317)
This update should make the list of files with broken links more readable.

Fixes #43214

PR Close #43317
2021-09-02 16:44:47 +00:00
George Kalpakas d8f637ab43 docs: add step to declare ProductAlertsComponent in tutorial (#43229)
The getting-started tutorial at angular.io/start instructs users to
generate a `ProductAlertsComponent` using the "Angular generator"
feature in [StackBlitz](https://stackblitz.com/). However, unlike the
Angular CLI, generating a component in StackBlitz does not automatically
declare it in `AppModule`, which is a requirement for the component to
be used in the application. This resulted in a compile error when
following the tutorial instructions.

This commit fixes this by adding a step to manually import and declare
the newly generated component in `app.module.ts`.

Fixes #43020
Closes #43212

PR Close #43229
2021-08-30 13:37:46 -07:00
Joey Perrott d84a4eb90f docs: remove recent departures from contributors page (#43230)
PR Close #43230
2021-08-30 08:23:40 -07:00
segunb fb64f711f8 docs: Close #View tag to avoid confusion (#43256)
PR Close #43256
2021-08-26 09:44:08 -07:00
George Kalpakas b46ce7d42f build(docs-infra): upgrade cli command docs sources to 56c5962df (#43239)
Updating [angular#12.2.x](https://github.com/angular/angular/tree/12.2.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/7c2d76d9e...56c5962df):

**Modified**
- help/lint.json

PR Close #43239
2021-08-25 10:48:04 -07:00
dario-piotrowicz d7b6416fcf refactor(common): fix emiting typos (#43221)
fix some of the aio examples which log strings containing "emiting" instead of "emitting"

PR Close #43221
2021-08-23 13:30:29 -07:00
dario-piotrowicz 19fa033f79 refactor(docs-infra): use tslint in aio's tools-lint script (#43010)
Instead of the deprecated tslint use eslint in the aio's tools-lint
script

PR Close #43010
2021-08-19 11:20:06 -07:00
Erik Slack 513b17043e docs: fix typo (#43190)
Fix typo in description of ngxp and link for angular community meetup

PR Close #43190
2021-08-18 10:52:19 -07:00
Joe Martin (Crowdstaffing) e31ed3d0dc docs: update links and formatting (#43066)
Update links and formatting prior to creating sub-topics.

Update links to reference links for consistency.  Update formatting for code sections.  Updated list alignment for consistent formatting.

PR Close #43066
2021-08-17 20:00:58 -07:00