3487 Commits

Author SHA1 Message Date
George Kalpakas
5a7ac8c3b9 build(docs-infra): avoid Karma error when loading scripts from code.angularjs.org ()
In the example apps used in the `ngUpgrade` guide, the AngularJS files
are loaded in `index.html` from `https://code.angularjs.org/`. Latest
browsers prevent loading the scripts from a page running on localhost
due to CORS:

```
Access to script at 'https://code.angularjs.org/1.5.5/angular.js' from origin
'http://localhost:9876' has been blocked by CORS policy: No 'Access-Control-Allow-Origin'
header is present on the requested resource.
```

NOTE:
Loading the files from `code.angularjs.org` is not mentioned in the
guide, therefore it is not needed to mention this config change there.

PR Close 
2020-03-18 10:00:01 -07:00
George Kalpakas
21b8d6956a build(docs-infra): remove obsolete content from example-config.json files ()
The `build` and `run` properties in `example-config.json` are only used
in example projects of type `systemjs`. In CLI-type projects, `build`
and `run` are ignored.

PR Close 
2020-03-18 10:00:01 -07:00
George Kalpakas
cc238e6377 build(docs-infra): remove obsolete content from example-config.json in setup example ()
The `unittesting` property in `example-config.json` is a remnant of the
setup (before `aio/` was moved into the `angular/angular` repo) and has
no effect any more.

PR Close 
2020-03-18 10:00:01 -07:00
George Kalpakas
df7504ade1 build(docs-infra): remove unused ngmodule-faq and visual-studio-2015 examples ()
PR Close 
2020-03-18 10:00:01 -07:00
George Kalpakas
fbed0a1471 build(docs-infra): remove unused test.html file from testing example ()
This file was from back when the `testing` example was not based on the
Angular CLI and is not used any more.

PR Close 
2020-03-18 10:00:01 -07:00
George Kalpakas
4cde83188a build(docs-infra): remove unused jsconfig.json file ()
PR Close 
2020-03-18 10:00:00 -07:00
Alex Eagle
46fe8fb8b4 build: depend on bazelisk rather than directly on Bazel ()
This has a couple benefits:
- we now use a .bazelversion file rather than package.json to pin the version of bazel we want. This means even if you install bazel on your computer rather than via yarn, you'll still get a warning if your bazel version is wrong.
- you no longer end up downloading three copies of bazel due to bugs in both npm and yarn where they download all tarballs before checking the metadata to see which are usable on the local platform.
- bazelisk correctly handles the tools/bazel trick for wrapping functionality, which we want to use to instrument developer build latencies

PR Close 
2020-03-16 10:58:06 -07:00
Sonu Kapoor
6b4c5289b3 fix(docs-infra): remove routerLink from top-bar ()
Closes 

PR Close 
2020-03-13 08:25:39 -07:00
Alan Agius
4a9514ec4e docs: remove speeding update ngcc section ()
In version 9.1, this is no longer needed as in the CLI, NGCC async has been integrated which will run during `ng build/ng serve/ng test`.

Reference: TOOL-1340

PR Close 
2020-03-13 07:58:14 -07:00
Stephen Fluin
0d806c84e2 docs: add developer survey 2020 ()
PR Close 
2020-03-11 16:10:47 -07:00
Yvonne Allen
5af0e7523c fix(docs-infra): add boilerplate path and project type for elements example project ()
Fixes 

PR Close 
2020-03-11 14:52:59 -04:00
George Kalpakas
d8f9ec5291 refactor(docs-infra): merge .api-body style blocks ()
This commit merges the two `.api-body` style blocks, removing duplicate
styles and re-ordering sub-blocks (to group relevant styles together).
It should not affect styling.

PR Close 
2020-03-11 14:47:16 -04:00
George Kalpakas
7bd5368d8b refactor(docs-infra): remove duplicate .github-links styles ()
PR Close 
2020-03-11 14:47:16 -04:00
Stefanie Fluin
cffbaba914 fix(docs-infra): make API member name bold ()
- Return API member name bold font weight
- SCSS formatting cleanup

Closes 

PR Close 
2020-03-11 14:47:16 -04:00
dishanfernando
146ef48a6e docs: change grammar in architecture guide ()
grammar change for better understanding

PR Close 
2020-03-11 14:46:45 -04:00
jornare
49478f5e19 docs: Added ngVikings 2020 on angular.io events ()
PR Close 
2020-03-11 14:43:47 -04:00
tresor616
99ce015f42 refactor: export silentLogger not SilentLoggerFn ()
Export SilentLogger object instead of the SilentLoggerFn and capitalise silentLoggerFn instead of the SilentLoggerFn
PR Close 
2020-03-06 17:37:12 -05:00
George Kalpakas
82a6fc5ef9 build(docs-infra): use local version of Zone.js when testing against local packages ()
In some cases, we want to test the AIO app or docs examples against the
locally built Angular packages (for example to ensure that the changes
in a commit do not introduce a breaking change). In order to achieve
this, we have the `ng-packages-installer` script that handles updating
a project's `package.json` file to use the locally built Angular
packages (and appropriate versions for their (dev-/peer-)dependencies).

Previously, `ng-packages-installer` would only consider the locally
built Angular packages (from `dist/packages-dist/`). However, given that
Zone.js is now part of the `angular/angular` repo, it makes sense to
also use the locally built Zone.js package (from `dist/zone.js-dist/`).
Otherwise, the tests might fail for commits that update both the Angular
packages (and related docs examples) and the Zone.js package. An example
of such a simultaneous change (that would have broken tests) is .

This commit updates the script to install the locally built Zone.js
package (in addition to the Angular ones). The commit ensures that the
Zone.js package will always be available alongside the Angular packages
(i.e. that the Zone.js package will be built by the same script that
builds the Angular packages and that the `dist/zone.js-dist/` directory
will be cached on CI).

Note: This problem was discovered while enabling docs examples unit
tests in .

PR Close 
2020-03-06 17:30:20 -05:00
JiaLiPassion
c06f9a1ce3 docs(zone.js): update comment and chapter format of ngzone doc. ()
PR Close 
2020-03-06 16:51:43 -05:00
Daniil Gorbunov
d912d4f34c docs: markup mini fix ()
PR Close 
2020-03-06 16:50:10 -05:00
Ajit Singh
59078c444c docs: move ngIndia 2020 to past events on events page ()
ng india was an outdated event removed it from upcoming events on the events page and added to already presented events

PR Close 
2020-03-06 12:39:24 -05:00
Sonu Kapoor
44f9fa6ce5 docs: add missing closing bracket ()
Closes 
PR Close 
2020-03-06 12:38:30 -05:00
Ajit Singh
876aa5a78a fix(docs-infra): in 404 page some text is not visible ()
In pr  colors were not properly set, if we type wrong url in the browser and we are directed to the 404 page there some text is set to white color which as not visible set it to dark gray for visibility

PR Close 
2020-03-05 16:00:52 -05:00
Andrew Scott
1b8a66893e Revert "build(docs-infra): use local version of Zone.js when testing against local packages ()" ()
This reverts commit 7d832ae1001b6264bb7124086089e9e69c10c9b6; breaks CI
with error `Concurrent upstream jobs persisted the same file(s) into the workspace:`

PR Close 
2020-03-04 10:57:36 -08:00
Andrew Scott
25ab4647c5 Revert "fix(animations): process shorthand margin and padding styles correctly ()" ()
This reverts commit 35c9f0dc2f3665d4f9d9ece328cee4559bbec9c6, breaks
internal tests

PR Close 
2020-03-04 18:22:09 +00:00
Pete Bacon Darwin
603ab40e85 build(docs-infra): ensure that CLI options are included in search ()
PR Close 
2020-03-04 08:48:58 -08:00
Pete Bacon Darwin
c1b5daf5a8 style(docs-infra): format files ()
PR Close 
2020-03-04 08:48:58 -08:00
George Kalpakas
7d832ae100 build(docs-infra): use local version of Zone.js when testing against local packages ()
In some cases, we want to test the AIO app or docs examples against the
locally built Angular packages (for example to ensure that the changes
in a commit do not introduce a breaking change). In order to achieve
this, we have the `ng-packages-installer` script that handles updating
a project's `package.json` file to use the locally built Angular
packages (and appropriate versions for their (dev-/peer-)dependencies).

Previously, `ng-packages-installer` would only consider the locally
built Angular packages (from `dist/packages-dist/`). However, given that
Zone.js is now part of the `angular/angular` repo, it makes sense to
also use the locally built Zone.js package (from `dist/zone.js-dist/`).
Otherwise, the tests might fail for commits that update both the Angular
packages (and related docs examples) and the Zone.js package. An example
of such a simultaneous change (that would have broken tests) is .

This commit updates the script to install the locally built Zone.js
package (in addition to the Angular ones). The commit ensures that the
Zone.js package will always be available alongside the Angular packages
(i.e. that the Zone.js package will be built by the same script that
builds the Angular packages and that the `dist/zone.js-dist/` directory
will be cached on CI).

Note: This problem was discovered while enabling docs examples unit
tests in .

PR Close 
2020-03-04 08:35:26 -08:00
George Kalpakas
4c7d833233 refactor(docs-infra): simplify NgPackagesInstaller and speed up local package detection ()
Previously, `NgPackagesInstaller` would only look for Angular local
packages and do so by listing all (deeply nested) files in
`dist/packages-dist/` and looking for `package.json` files nested two
levels deep (i.e. `dist/packages-dist/*/package.json`). Thus, it would
unnecessarily check a large number of files.

This commit changes the package detection logic to instead look for
a `package.json` file directly inside each subdirectory of
`dist/packages-dist/`, which speeds up the operation.
It also refactors the code to make it easier to look for packages in
other directories (besides `dist/packages-dist/`). This will be useful
in a subsequent commit to look for and use the locally built `zone.js`
package (from `dist/zone.js-dist/`).

PR Close 
2020-03-04 08:35:26 -08:00
George Kalpakas
3f88de9407 build: move build scripts to dedicated directory ()
This commit moves the build-related scripts
(`build-ivy-npm-packages.js`, `build-packages-dist.js` and
`package-builder.js`) to a dedicated directory to keep the `scripts/`
directory cleaner.

It also moves the logic for building the `zone.js` package to a separate
script, `zone-js-builder.js`, to make it re-usable. A subsequent commit
will use it to build the `zone.js` package when building the Ivy Angular
packages as well.

PR Close 
2020-03-04 08:35:26 -08:00
Sonu Kapoor
3b0b90527e fix(docs-infra): add top level folders into topLevelFolders ()
Closes 

PR Close 
2020-03-03 08:59:10 -08:00
George Kalpakas
bf42807aa6 docs(common): switch HTTP guide examples to TestBed.inject() ()
`TestBed.get()` has been [deprecated in v9][1], in favor of
`TestBed.inject()`. In ##32382, the HTTP guide wording has been updated
to mention `TestBed.inject()` instead of `TestBed.get()`, but the
associated code snippets (extracted from the `http` example) were not.

This commit updates the HTTP guide examples to also use
`TestBed.inject()`.

[1]: https://v9.angular.io/guide/deprecations#testing

Fixes 

PR Close 
2020-03-03 08:57:18 -08:00
George Kalpakas
8eb4a9d395 docs: fix docs and associated code snippets for enabling more macro tasks in fakeAsync() ()
In the `testing` guide, there is a section discussing configuring
`fakeAsync()` to handle more macro tasks (e.g.
`HTMLCanvasElement#toBlob()`).

Previously, the corresponding code snippets (some of which were
hard-coded in the guide) were incorrect/incomplete and the associated
tests were broken. This was discovered while enabling docs examples unit
tests in .

This commit fixes the code snippets and associated tests and ensures the
examples used in the guide come from an example app (i.e. are not
hard-coded).

Note: The docs examples unit tests are currently not run on CI. This
will be fixed in .

PR Close 
2020-03-02 13:30:25 -08:00
John Ralph Umandal
44e47da4cf docs: reword explanation for using singleton services decorative to be more understandable ()
To understand the current sentence it requires to read it multiple times.
This fix should help developers to understand the sentence in a quicker way.

PR Close 
2020-03-02 09:30:54 -08:00
Matias Niemelä
35c9f0dc2f fix(animations): process shorthand margin and padding styles correctly ()
Prior to this patch, the `margin` and `padding` properties were not
detected properly by Firefox due to them being shorthand properties.
This patch ensures that both `margin` and `padding` are converted
read as `top right bottom left` in the event that the shorthand
property detection fails for auto-styling in Angular animations.

Fix  (FW-1886)

PR Close 
2020-03-02 08:17:38 -08:00
Sonu Kapoor
0a5a841994 test(docs-infra): add proxy to fake images in tests ()
Previously, when running the unit tests for aio on Windows, many 404s
are logged for images, resulting in progress logs being spread over
multiple lines. This commit fixes this by adding a `proxy` to point
the fake image to a real image within the `src` folder.

Closes 

PR Close 
2020-03-02 08:16:34 -08:00
Aristeidis Bampakos
746e313a76 docs: Fix typo in template syntax ()
Remove unnecessary article from styling precedence

PR Close 
2020-03-02 08:16:06 -08:00
Sonu Kapoor
de4e17b76e fix(docs-infra): fix redirect in angular version selector ()
Closes 

PR Close 
2020-02-28 07:11:33 -08:00
ajitsinghkaler
01ab168774 feat(docs-infra): add useful links if landed on 404 page and no search results found ()
Added additional links which can help user find the things they are
looking for when there are no search results (when searching or on a 404
page).

Note:
This commit increases the main bundle's payload size due to the extra
content of the `aio-search-results` component.

Fixes 

PR Close 
2020-02-27 11:01:59 -08:00
George Kalpakas
aec463c606 ci(docs-infra): increase AIO ViewEngine payload size limit ()
In , the payload size limit for Ivy builds was bumped to account
for small incremental increases in recent PRs. The ViewEngine size has
also increased similarly (~500B), but it was not updated in ,
because its total increase was just below the 500B error threshold (by
6B).

This commit bumps the ViewEngine size limit too.

Note: Any investigation for the Ivy size increase (as a follow-up
to ) will most likely also apply to ViewEngine, since the size was
increased by the same amount.

PR Close 
2020-02-27 11:01:59 -08:00
Benjamin Kindle
30f29ee8e7 docs: correct spelling of 'detection' ()
PR Close 
2020-02-27 10:49:15 -08:00
Sonu Kapoor
0b97d07ad6 test(docs-infra): fix tests with new topics property ()
PR Close 
2020-02-27 10:47:52 -08:00
Sonu Kapoor
7ca2a2a863 feat(docs-infra): add searchKeywords preprocessor ()
This commit adds a new preprocessor to use `${@searchKeywords}`, allowing
the docs to use a list of custom search phrases that will be
prioritized over the keywords found in the content.

Closes 

PR Close 
2020-02-27 10:47:52 -08:00
Andrew Kushnir
91934ebb5c ci: increase AIO payload size limit ()
This commit updates AIO payload size limit that is triggering a problem after merging 0bc35a71e2. That commit added some payload size, but all checks were "green" for the original PR (), so it looks like it's an accumulated payload size increase from multiple changes. The goal of this commit is to bring the master branch back to "green" state.

PR Close 
2020-02-26 16:31:55 -08:00
George Kalpakas
975a11b37f fix(docs-infra): do not break when cookies are disabled in the browser ()
Whenever cookies are disabled in the browser, `window.localStorage` is
not avaialable to the app (i.e. even trying to access
`window.localStorage` throws an error).

To avoid breaking the app, we use a no-op `Storage` implementation if
`window.localStorage` is not available.

(This is similar to , but for `localStorage` instead of
`sessionStorage`.)

Fixes 

PR Close 
2020-02-26 12:54:54 -08:00
ajitsinghkaler
9c01ca42d3 feat(docs-infra): add entry-point label on api endpoint docs ()
On API docs pages for Angular packages (e.g. https://angular.io/api/common), we show all primary and secondary entry-points. Following a link to one of the secondary entry-points (e.g. https://angular.io/api/common/http), navigates the docs page for the secondary entry-point, where it is incorrectly (and misleadingly) labelled as PACKAGE and not as an entry-point.

Implemented a new ENTRY-POINT label and add support for correctly differentiating between entry-points and packages.

Fixes 

PR Close 
2020-02-26 12:54:22 -08:00
Georgii Dolzhykov
6f68eae9dd docs: more precise docs for template statement syntax ()
PR Close 
2020-02-26 12:44:53 -08:00
JiaLiPassion
bde4cd7982 docs: add documentation of NgZone with zone.js ()
PR Close 
2020-02-26 12:42:59 -08:00
David Shevitz
c414f45ddf docs: update getting started topics to avoid duplicate topic names ()
PR Close 
2020-02-25 13:10:30 -08:00
JiaLiPassion
f9d483e76e feat: add a temp solution to support passive event listeners. ()
Now Angular doesn't support add event listeners as passive very easily.
User needs to use `elem.addEventListener('scroll', listener, {passive: true});`
or implements their own EventManagerPlugin to do that.
Angular may finally support new template syntax to support passive event, for now,
this commit introduces a temp solution to allow user to define the passive event names
in zone.js configurations.

User can define a global varibale like this.

```
(window as any)['__zone_symbol__PASSIVE_EVENTS'] = ['scroll'];
```

to let all `scroll` event listeners passive.

PR Close 
2020-02-24 17:30:04 -08:00