Commit Graph

3350 Commits

Author SHA1 Message Date
Sonu Kapoor de4e17b76e fix(docs-infra): fix redirect in angular version selector (#35632)
Closes #35630

PR Close #35632
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 (#34978)
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 #31532

PR Close #34978
2020-02-27 11:01:59 -08:00
George Kalpakas aec463c606 ci(docs-infra): increase AIO ViewEngine payload size limit (#34978)
In #35702, 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 #35702,
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 #35702) will most likely also apply to ViewEngine, since the size was
increased by the same amount.

PR Close #34978
2020-02-27 11:01:59 -08:00
Benjamin Kindle 30f29ee8e7 docs: correct spelling of 'detection' (#35723)
PR Close #35723
2020-02-27 10:49:15 -08:00
Sonu Kapoor 0b97d07ad6 test(docs-infra): fix tests with new `topics` property (#35539)
PR Close #35539
2020-02-27 10:47:52 -08:00
Sonu Kapoor 7ca2a2a863 feat(docs-infra): add `searchKeywords` preprocessor (#35539)
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 #35449

PR Close #35539
2020-02-27 10:47:52 -08:00
Andrew Kushnir 91934ebb5c ci: increase AIO payload size limit (#35702)
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 (#34574), 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 #35702
2020-02-26 16:31:55 -08:00
George Kalpakas 975a11b37f fix(docs-infra): do not break when cookies are disabled in the browser (#35557)
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 #33829, but for `localStorage` instead of
`sessionStorage`.)

Fixes #35555

PR Close #35557
2020-02-26 12:54:54 -08:00
ajitsinghkaler 9c01ca42d3 feat(docs-infra): add entry-point label on api endpoint docs (#35427)
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 #34081

PR Close #35427
2020-02-26 12:54:22 -08:00
Georgii Dolzhykov 6f68eae9dd docs: more precise docs for template statement syntax (#34348)
PR Close #34348
2020-02-26 12:44:53 -08:00
JiaLiPassion bde4cd7982 docs: add documentation of NgZone with zone.js (#34295)
PR Close #34295
2020-02-26 12:42:59 -08:00
David Shevitz c414f45ddf docs: update getting started topics to avoid duplicate topic names (#35457)
PR Close #35457
2020-02-25 13:10:30 -08:00
JiaLiPassion f9d483e76e feat: add a temp solution to support passive event listeners. (#34503)
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 #34503
2020-02-24 17:30:04 -08:00
Stephen Fluin 737ec52e9d docs: add more relevant statistic for page load (#35649)
PR Close #35649
2020-02-24 17:26:40 -08:00
Jeffrey Bosch 3893799183 docs: add amazon s3 builder package (#34783)
PR Close #34783
2020-02-24 09:13:58 -08:00
Sonu Kapoor a7d5c55926 docs: fix routing code to use `navigate` (#35176)
Previously, the example in the `router` guide was not
preserving the query params after logging in.

This commit fixes this by using `navigate` instead of
using `navigateByUrl`, which ignores any properties in
the `NavigationExtras` that would change the provided URL.

Fixes 34917

PR Close #35176
2020-02-24 09:00:03 -08:00
Miško Hevery e084835fb1 Revert "feat: support passive event options by defining global variables in zone.js config file (#34503)"
This reverts commit d7d359e3ee.
2020-02-21 22:16:34 +00:00
Alex Rickabaugh 4253662231 fix(ivy): add strictLiteralTypes to align Ivy + VE checking of literals (#35462)
Under View Engine's default (non-fullTemplateTypeCheck) checking, object and
array literals which appear in templates are treated as having type `any`.
This allows a number of patterns which would not otherwise compile, such as
indexing an object literal by a string:

```html
{{ {'a': 1, 'b': 2}[value] }}
```

(where `value` is `string`)

Ivy, meanwhile, has always inferred strong types for object literals, even
in its compatibility mode. This commit fixes the bug, and adds the
`strictLiteralTypes` flag to specifically control this inference. When the
flag is `false` (in compatibility mode), object and array literals receive
the `any` type.

PR Close #35462
2020-02-21 12:36:11 -08:00
JiaLiPassion d7d359e3ee feat: support passive event options by defining global variables in zone.js config file (#34503)
PR Close #34503
2020-02-21 09:06:26 -08:00
JiaLiPassion 17b862cf82 feat: add an tickOptions parameter with property processNewMacroTasksSynchronously. (#33838)
This option will control whether to invoke the new macro tasks when ticking.

Close #33799

PR Close #33838
2020-02-20 15:14:59 -08:00
Sonu Kapoor d2a112fa72 docs: clarify getting started deployment guide (#35510)
PR Close #35510
2020-02-20 15:12:28 -08:00
Esteban Gehring c91304f191 docs: add downgraded output kebab-case example (#35581)
PR Close #35581
2020-02-20 10:55:34 -08:00
George Kalpakas 2aa940f55c fix(docs-infra): highlight the currently active node in top-bar (#33351)
Related to #33239 and #33255.

PR Close #33351
2020-02-20 10:52:54 -08:00
George Kalpakas 34b84f61e0 fix(docs-infra): use `.tooltip` in `aio-top-menu` items (#33351)
The top-menu items have both a `title` and a `tooltip` property. The
`title` is used as text content, so there is little point in using it as
"tooltip" (via the HTMLElement's `title` property) too.

This commit switches to using the `tooltip` property to populate the
`title`. Note that in many cases, the `tooltip` property is derived from
`title` anyway (so there is no practical change in behavior in these
cases).

PR Close #33351
2020-02-20 10:52:53 -08:00
Judy Bogart 1b72fc10eb docs: edit displaying-data page to introduce section (#35507)
PR Close #35507
2020-02-20 10:50:05 -08:00
George Kalpakas 4c693ea817 build(docs-infra): upgrade cli command docs sources to 6aa3c134c (#35578)
Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in [commit range](d452f0873...6aa3c134c):

**Modified**
- help/e2e.json

PR Close #35578
2020-02-20 10:47:26 -08:00
Stefanie Fluin 1997b86a00 fix(docs-infra): improve focus styles in topnav and footer (#33255)
Fixes #33239

PR Close #33255
2020-02-19 12:51:27 -08:00
Andrew Kushnir d0d36a5ebf ci: increase AIO payload size limit (#35538)
This commit updates AIO payload size limit that is triggering a problem after merging f95b8ce07e. That commit added some payload size, but all checks were "green" for the PR (https://github.com/angular/angular/pull/34481) after rebase that happened a couple hours before the merge, so this is an accumulated payload size increase from multiple changes. The goal of this commit is to bring the master and patch branches back to "green" state.

PR Close #35538
2020-02-19 09:07:20 -08:00
Pawel Kozlowski 3f4e02b8c7 fix(ivy): queries should match elements inside ng-container with the descendants: false option (#35384)
Before this change content queries with the `descendants: false` option, as implemented in ivy,
would not descendinto `<ng-container>` elements. This behaviour was different from the way the
View Engine worked. This change alligns ngIvy and VE behaviours when it comes to queries and the
`<ng-container>` elements and fixes a common bugs where a query target was placed inside the
`<ng-container>` element with a * directive on it.

Before:

```html
<needs-target>
  <ng-container *ngIf="condition">
    <div #target>...</div>  <!-- this node would NOT match -->
  </ng-container>
</needs-target>
```

After:

```html
<needs-target>
  <ng-container *ngIf="condition">
    <div #target>...</div>  <!-- this node WILL match -->
  </ng-container>
</needs-target>
```

Fixes #34768

PR Close #35384
2020-02-18 17:17:46 -08:00
Sonu Kapoor 183a8629a4 fix(docs-infra): set `th`/`td` to proper width (#35437)
Previously, the tables on the event page were misaligned. This commit
fixes this by setting the width of all `td`'s and `th`'s.

PR Close #35437
2020-02-18 12:48:31 -08:00
Sonu Kapoor 2f18e8565e style(docs-infra): properly format files (#35318)
PR Close #35318
2020-02-18 12:45:07 -08:00
Sonu Kapoor a788d585f8 fix(docs-infra): preserves query and hash when switching angular versions (#35318)
Previously, when switching angular versions through the
version selector in the sidenav, the query and hash is lost.
The user has to manually navigate to the original location again.

This commit fixes this issue and preserves the query and hash
when navigating between different versions.

Closes #24495

PR Close #35318
2020-02-18 12:45:07 -08:00
ajitsinghkaler 7b56daffe6 fix(docs-infra): add fallback to web fonts so downloading does not block rendering (#35352)
Light house was reporting that 'Ensure text remains visible during webfont load' solution to this problem was adding &swap to the end of web fonts this leads to our first text showing before web-font download and improves the performance of site link to article: https://web.dev/font-display/\?utm_source\=lighthouse\&utm_medium\=lr

PR Close #35352
2020-02-18 12:43:16 -08:00
George Kalpakas bdfe71ae93 build(docs-infra): use `puppeteer` to get a browser for docs examples tests (#35381)
In #35049, integration and AIO tests were changed to use the browser
provided by `puppeteer` in tests. This commit switches the docs examples
tests to use the same setup.

IMPLEMENTATION NOTE:
The examples are used to create ZIP archives that docs users can
download to experiment with. Since we want the downloaded projects to
resemble an `@angular/cli` generated project, we do not want to affect
the project's Protractor configuration in order to use `puppeteer`.

To achieve this, a second Protractor configuration is created (which is
ignored when creating the ZIP archives) that extends the original one
and passes the approperiate arguments to use the browser provided by
`puppeteer`. This new configuration (`protractor-puppeteer.conf.js`) is
used when running the docs examples tests (on CI or locally during
development).

PR Close #35381
2020-02-18 12:42:47 -08:00
George Kalpakas ab8199f7c9 build: several minor fixes related to using `puppeteer` (#35381)
This is a follow-up to #35049 with a few minor fixes related to using
the browser provided by `puppeteer` to run tests. Included fixes:

- Make the `webdriver-manager-update.js` really portable. (Previously,
  it needed to be run from the directory that contained the
  `node_modules/` directory. Now, it can be executed from a subdirectory
  and will correctly resolve dependencies.)

- Use the `puppeteer`-based setup in AIO unit and e2e tests to ensure
  that the downloaded ChromeDriver version matches the browser version
  used in tests.

- Use the `puppeteer`-based setup in the `aio_monitoring_stable` CI job
  (as happens with `aio_monitoring_next`).

- Use the [recommended way][1] of getting the browser port when using
  `puppeteer` with `lighthouse` and avoid hard-coding the remote
  debugging port (to be able to handle multiple instances running
  concurrently).

[1]: https://github.com/GoogleChrome/lighthouse/blame/51df179a0/docs/puppeteer.md#L49

PR Close #35381
2020-02-18 12:42:47 -08:00
Chives d7c4f40171 docs(upgrade): separate AngularJS Material typings to its own block (#35514)
PR Close #35514
2020-02-18 12:42:19 -08:00
Chives 99fdba0165 docs(upgrade): add instructions for more AngularJS related typings (#35514)
angular-aria is a core AngularJS module packaged separately, and
angular-material is its own thing entirely.

PR Close #35514
2020-02-18 12:42:19 -08:00
Sonu Kapoor be5e75c804 docs: change `item` to `items` to match the code (#35433)
Closes #35368

PR Close #35433
2020-02-14 11:15:07 -08:00
Aristeidis Bampakos 9ca1faf865 docs: Fix minor typos and coding styles (#35325)
- Fix minor typos in the Getting Started, Forms and AOT Compiler guide.
- Fix minor typo in the Tour of Heroes app.
- Fix coding styles in the Getting Started guide and the Tour of Heroes app

PR Close #35325
2020-02-13 13:31:30 -08:00
Pete Bacon Darwin e09abc5b5a ci(docs-infra): update payload limits (#35379)
The update to Angular 9.0.0 appears to have lowered the main.js
file slightly, while the current master build of Angular appears
to have gone up slightly.

PR Close #35379
2020-02-13 10:07:56 -08:00
Pete Bacon Darwin a7ee2bcaba build(docs-infra): update to latest Angular Material (#35379)
PR Close #35379
2020-02-13 10:07:56 -08:00
Pete Bacon Darwin 417ed3aa85 build(docs-infra): pin @webcomponents/custom-elements to 1.2.1 (#35379)
The previous range (^1.2.0) allowed the version 1.3.2 to be
installed which caused the ES2015 polyfills.js file to increase
in size unwantedly.

PR Close #35379
2020-02-13 10:07:56 -08:00
Pete Bacon Darwin e34c7da830 build(docs-infra): update AIO to Angular 9.0.0 (#35379)
PR Close #35379
2020-02-13 10:07:55 -08:00
Pete Bacon Darwin e2b8b7c0be build(docs-infra): update to latest dgeni-packages (#35379)
After the previous update to yarn.lock a problem surfaced
with the `mkdir-promise` package. The latest version of
dgeni-packages (0.28.3) fixes this problem.

PR Close #35379
2020-02-13 10:07:55 -08:00
Pete Bacon Darwin 5a219e2588 build(docs-infra): refresh yarn.lock (#35379)
This file had not been updated for some time and lots of
the dependencies have new versions.

This is actually necessary because (at least on OS/X) there
is a problem with `chokidar` and `fsevent` that is solved by
bumping the versions here.

PR Close #35379
2020-02-13 10:07:55 -08:00
Sonu Kapoor f015d99117 docs: Update doc to use `ng` firebase schematics for deployment (#35355)
Previously, the `deployment` section, was using the `firebase`
CLI to deploy the angular project into firebase. With the better
integration through the `fire` schematics, it is now easier to
deploy angular applications into firebase. This commit takes
care of this, by outlined the required steps for deployment.

Closes #35274

PR Close #35355
2020-02-13 10:07:26 -08:00
Igor Minar dc63ceb5a3 docs: update release.md and rename 'beta' releases to 'next' (#35276)
also clarify what 'next' releases are.

PR Close #35276
2020-02-13 10:00:50 -08:00
ajitsinghkaler e8ea3be843 docs: remove service from region where it was added before it was created (#35354)
The message service was added in a section create message service but was impoted much before it removed those imports because they can be confusing

Fixes #35259

PR Close #35354
2020-02-12 16:46:22 -08:00
Sonu Kapoor 6091039223 docs: Rename FAQ to Useful Tips (#35316)
Previously, a section in the FAQ was not clear when discussing a
simple unit test. We also want to move away from question-based
sections. This commit clarified the confusing section and
changed all question-based sections.

Closes #35056

PR Close #35316
2020-02-12 16:40:17 -08:00
Santosh Yadav b9b38f0ad2 docs: Repetition on getting started tutorial (#35290)
Fixes #35286
PR Close #35290
2020-02-11 13:20:16 -08:00