Commit Graph

3848 Commits

Author SHA1 Message Date
George Kalpakas 2cc3ac0299 build(docs-infra): remove the `no-string-literal` tslint rule to align with CLI (#39018)
This commit removes the `no-string-literal: false` tslint rule to
more closely align `tslint.json` with the one generated by the latest
Angular CLI for new apps.

PR Close #39018
2020-10-01 09:32:57 -07:00
George Kalpakas be98a45dd9 build(docs-infra): enable the `no-redundant-jsdoc` tslint rule to align with CLI (#39018)
This commit enables the `no-redundant-jsdoc` tslint rule to more closely
align `tslint.json` with the one generated by the latest Angular CLI for
new apps.

PR Close #39018
2020-10-01 09:32:57 -07:00
George Kalpakas 555ae7431d refactor(docs-infra): more closely align `tslint.json` with CLI (#39018)
This commit re-organizes the `tslint.json` configuration file to more
closely align with the one generated by the latest Angular CLI for new
apps. This makes it easier to see the difference with new CLI versions
in the future and keep our `tslint.json` up-to-date (while keeping our
own rules).

NOTE:
This commit only re-orders rules and removes redundant ones. It does not
change the linting behavior.

PR Close #39018
2020-10-01 09:32:57 -07:00
Alan Agius bd5e425c14 docs: update CLI strict mode documentation (#39054)
With this change we update the strict mode documentation to reflect the
changes done in the CLI. (https://github.com/angular/angular-cli/pull/18931)

Changes effect
- Removing `no-any` tslint rule
- The special sideEffects  package.json
- Added `strictTemplates` NGC option

PR Close #39054
2020-09-30 12:51:26 -07:00
George Kalpakas 8e3710349d build(docs-infra): upgrade cli command docs sources to e526da605 (#39059)
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](568d34cdb...e526da605):

**Modified**
- help/test.json

PR Close #39059
2020-09-30 12:47:39 -07:00
Aleksandr Maniunin d1f5654f0c docs: fix typo in Pipes guide (aynchronous --> asynchronous) (#38996)
PR Close #38996
2020-09-30 12:46:26 -07:00
George Kalpakas e8084ff906 build(docs-infra): upgrade cli command docs sources to 568d34cdb (#39045)
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](bc6369c68...568d34cdb):

**Modified**
- help/xi18n.json

PR Close #39045
2020-09-30 09:33:35 -04:00
Daniel 2aeaedc519 docs(docs-infra): replace a comma with a period at the end of a sentence (#39034)
In order to keep document consistency this commit replaces a comma with a period at the end of a sentence
PR Close #39034
2020-09-30 09:27:30 -04:00
George Kalpakas c8958d76db build(docs-infra): simplify updating dependencies in docs examples boilerplate (#38992)
Previously, when updating the dependency versions in
`aio/tools/examples/shared/package.json` (which contains all
dependencies used in docs examples projects), one had to manually go
through all boilerplate directories and update the `package.json` files
with the same versions.

This commit simplifies this task by automating it via a Node.js script.

PR Close #38992
2020-09-30 09:20:00 -04:00
George Kalpakas f6052a915d build(docs-infra): simplify update workflow for CLI-based docs examples boilerplate (#38992)
When updating the boilerplate for CLI-based docs examples, one needed to
install dependencies inside the
`aio/tools/examples/shared/boilerplate/cli/` directory, which resulted
in a `node_modules/` directory and a `yarn.lock` file. These were not
supposed to be part of the boilerplate, so they had to be manually
removed after the boilerplate was updated.

This commit simplifies the workflow by allowing boilerplate files to be
ignored (both by git and the `example-boilerplate.js` script) via a
`.gitignore` file. This way, it is no longer necessary to manually
remove the unneeded directories/files.

PR Close #38992
2020-09-30 09:20:00 -04:00
George Kalpakas 37ed4bd9ff docs(docs-infra): update instructions for updating docs examples dependencies (#38992)
PR Close #38992
2020-09-30 09:20:00 -04:00
George Kalpakas efe0e03fe1 docs(docs-infra): apply the one-sentence-per-line rule to Markdown files in `aio/tools/` (#38992)
This commit updates the Markdown files inside the `aio/tools/` directory
to contain one sentence per line in order to be consistent with how
Markdown files are formatted in the rest of the repo.

PR Close #38992
2020-09-30 09:20:00 -04:00
Daniel Kreider b16a69c7a4 docs: fix two broken commands (#38960)
PR Close #38960
2020-09-30 09:17:18 -04:00
Joey Perrott 93c3d8f9fd fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846)
Remove @angular/platform-webworker and @angular/platform-webworker-dynamic
as they were deprecated in v8

BREAKING CHANGE: @angular/platform-webworker and @angular/platform-webworker-dynamic
have been removed as they were deprecated in v8

PR Close #38846
2020-09-30 09:13:59 -04:00
Kapunahele Wong 1b70dc931d docs: edit template-statements doc (#38742)
This commit updates the copy and headers to bring in line with
style guide and clarify content.

PR Close #38742
2020-09-30 09:13:22 -04:00
George Kalpakas e2997ed5ee build(docs-infra): update TypeScript and other deps to align with latest CLI (#39017)
This commit updates TypeScript and other dependencies used in angular.io
to more closely align with new apps created with the latest Angular CLI.
It also updates `tsconfig.json`, re-ordering some properties around and
introducing some more checks (again to more closely match new CLI apps).

NOTE:
I skipped updating RxJS from 6.5.4 to 6.6.3, because it increased the
main bundle by ~500B.

NOTE:
`tslint.json` will be updated in a subsequent PR, because it requires
more extensive changes.

PR Close #39017
2020-09-28 16:28:04 -04:00
George Kalpakas bf010b9a07 build(docs-infra): update @angular/material to 10.2.2 (#39017)
This commit updates the version of Angular Components used in angular.io
to version 10.2.2.

NOTE:
The actual size increase for the main bundle in ViewEngine mode is 1.3KB
(because the actual size before this commit was 430423B, not 430008B as
seen in `aio-payloads.json`).

PR Close #39017
2020-09-28 16:28:04 -04:00
George Kalpakas 387fd89b3f build(docs-infra): update @angular/* to 10.1.3 (#39017)
This commit updates the version of Angular framework used in angular.io
to version 10.1.3.

NOTE:
The actual size decrease for the main bundle is 3KB (because the actual
size before this commit was 451226B, not 450952B as seen in
`aio-payloads.json`).

PR Close #39017
2020-09-28 16:28:04 -04:00
George Kalpakas e991fee6bf build(docs-infra): update @angular/cli to 10.1.3 (#39017)
This commit updates the version of Angular CLI used in angular.io to
version 10.1.3.

PR Close #39017
2020-09-28 16:28:04 -04:00
George Kalpakas 4fd635a03a build(docs-infra): enable AOT in development mode for all docs examples (#39001)
In the past, the docs examples were configured to not use AOT
compilation in development mode (only in production mode). This was an
artifact of when JIT was the default in development mode.

Now that AOT is the default (even in development mode) for new CLI apps,
this commit configures all docs examples to always use AOT compilation.
(This has been made possible by fixing the `component-interaction` docs
example to correctly run in AOT mode in an earlier commit.)

PR Close #39001
2020-09-28 16:26:32 -04:00
George Kalpakas 53a7ed4317 test(docs-infra): fix and enable remaining `component-interaction` e2e tests (#39001)
Previously, some of the e2e tests of the `component-interaction` docs
example were disabled because they were failing.

This commit fixes and re-enables them.

PR Close #39001
2020-09-28 16:26:32 -04:00
George Kalpakas 2df39ee338 refactor(docs-infra): minor refactoring of the `component-interaction` e2e tests (#39001)
This commit refactors the e2e tests of the `component-interaction` docs
example to improve readability and make them easier to maintain.

Changes include:
- Switch from `element.all().get(0)` to `element()` when there is only
  one such element on the page.
- Switch from `Promise#then()` to `async/await`.
- Move `ElementFinder`s at the top of the test (instead of having them
  interleaved with expectations).
- Load the page before every test (i.e. in a `beforeEach()` instead of
  `beforeAll()`) to prevent state from each test leaking into the
  subsequent tests.
- Order imports alphabetically.

PR Close #39001
2020-09-28 16:26:32 -04:00
George Kalpakas 2b6b9c95f9 fix(docs-infra): fix the `component-interaction` example e2e tests to run in prod mode (#39001)
Previously, the `component-interaction` docs example was configured to
run e2e tests on CI in development mode (in contrast to the default for
all docs examples, which is to run e2e tests in production mode). This
was necessary due to the following reasons:
- One of the components, `CountdownTimerComponent`, which is used by
  `CountdownLocalVarParentComponent` and
  `CountdownViewChildParentComponent`, was triggering a periodic
  asynchronous task (via `setInterval()`), which prevented the app from
  stabilizing and caused tests to fail.
- In order to prevent this from happening, the example's `AppModule` had
  special provisioning to not include the problematic components in its
  declarations when testing.
- Since this had to be determined dynamically at runtime (via inspecting
  the URL query params), the `AppModule`'s config could not be
  statically evaluated in AOT compilation.

This commit fixes the example to make it compatible with AOT compilation
and removes the custom test command from its `example-config.json`
(allowing it to be run with the default e2e test command, i.e. in
production mode).

PR Close #39001
2020-09-28 16:26:32 -04:00
George Kalpakas c5e178997c build(docs-infra): update docs examples to Angular v10 (#38993)
This commit updates the docs examples to Angular v10.1.3. In addition to
updating the dependencies versions, it also updates the project's
structure and config to more closely match what a new v10 CLI app would
look like. See, also, the [diff][1] between a basic v9.1.4 CLI app and a
v10.1.3 one.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/9.1.4..10.1.3

PR Close #38993
2020-09-28 16:24:59 -04:00
Joey Perrott 4a9f4520ce docs: remove usage of whitelist in cli analytics docs (#38963)
Removes the usage of the term whitelist in the analytics docs for cli.

PR Close #38963
2020-09-28 16:23:06 -04:00
George Kalpakas e459dc7c42 test(docs-infra): add missing test for the `rx-library` docs example (#38905)
This commit adds an extra test for the `retry-on-error` snippet of the
`rx-library` docs example to ensure it can successfully recover after a
couple of failed attempts.

This commit addresses comment
https://github.com/angular/angular/pull/38905#discussion_r491494196.

PR Close #38905
2020-09-28 16:20:11 -04:00
Sonu Kapoor fd7146cc71 test(docs-infra): add unit tests for rx-library examples (#38905)
This commit adds missing unit tests for all rx-library examples from the docs.

Closes #28017

PR Close #38905
2020-09-28 16:20:11 -04:00
Sonu Kapoor 5ef2c983b9 fix(docs-infra): fix the retry-on-error example (#38905)
Previously, the `retry` example did not work as intended. The `retry`
operator was called before the exception occured, thus not retrying the
`ajax` request.

This commit moves the `retry` operator into the correct order to ensure
that the failed request is retried.

PR Close #38905
2020-09-28 16:20:11 -04:00
George Kalpakas 0dd859757a build(docs-infra): upgrade cli command docs sources to bc6369c68 (#38973)
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](800ba9271...bc6369c68):

**Modified**
- help/build.json
- help/serve.json

PR Close #38973
2020-09-25 14:33:10 -04:00
Joey Perrott cf9176eb46 docs(docs-infra): remove usage of whitelist in aio-builds-setup docs (#38964)
Removes the usage of the term whitelist in the aio-builds-setup docs.

PR Close #38964
2020-09-25 14:31:57 -04:00
Alyssa Nicoll 2f6777df18 docs(docs-infra): add upcoming conference (#38956)
PR Close #38956
2020-09-25 14:31:34 -04:00
Andrew Kushnir 9aff09b827 docs: remove deprecated IE 9, 10, and IE mobile from docs (#38931)
In v10, framework support for IE 9, 10, and IE mobile was deprecated. In v11 we remove support
for these browsers.

This commit updates angular.io docs to exclude references to IE 9, 10, and IE mobile as well as
polyfills that were needed to run Angular-based apps in these browsers.

PR Close #38931
2020-09-25 14:31:09 -04:00
Keen Yee Liau 7f6f8bbffb docs: Delete repeated section "Removed APIs" (#38858)
The section "Removed APIs" is repeated twice, probably due to a mistake
in resolving merge conflicts.

PR Close #38858
2020-09-25 14:28:26 -04:00
Andrew Scott e4f4d18e7e refactor(router): Adjust type of parameter in navigateByUrl and createUrlTree to be more accurate (#38227)
`router.navigateByUrl` and `router.createUrlTree` only use a subset of the `NavigationExtras`. This commit
changes the parameter type to use new interfaces that only specify the properties used by
those function implementations. `NavigationExtras` extends both of those interfaces.

Fixes #18798

BREAKING CHANGE: While the new parameter types allow a variable of type
`NavigationExtras` to be passed in, they will not allow object literals,
as they may only specify known properties. They will also not accept
types that do not have properties in common with the ones in the `Pick`.
To fix this error, only specify properties from the `NavigationExtras` which are
actually used in the respective function calls or use a type assertion
on the object or variable: `as NavigationExtras`.

PR Close #38227
2020-09-25 10:36:13 -04:00
Sonu Kapoor 8422633b8a test(docs-infra): add missing unit tests for backoff example (#38896)
This commit adds the missing unit test for the backoff example.

PR Close #38896
2020-09-24 11:33:20 -04:00
Sonu Kapoor 37297cfed7 fix(docs-infra): fix the backoff example (#38896)
Previously, the `backoff()` example did not work as intended. More
specifically, the `range(1, maxTries)` observable would complete
immediately after emitting the `maxTries`th value, causing the overall
observable to also complete. As a result, it would only make
`maxTries - 1` attempts to recover from an error. More importantly, the
outer observable would complete successfully instead of erroring.

This commit fixes the `backoff()` operator by ensuring it makes exactly
`maxTries` attempts to recover and it propagates the actual error to the
outer observable.

The test for this change is added in the next commit.

PR Close #38896
2020-09-24 11:33:20 -04:00
Joey Perrott ffe89fb07d test(docs-infra): remove usage of blacklist in test naming (#38927)
Remove usage of blacklist in test naming of processor tranform tests.

PR Close #38927
2020-09-23 15:46:02 -04:00
klemenoslaj a2068523fd feat(service-worker): add the option to prefer network for navigation requests (#38565)
This commit introduces a new option for the service worker, called
`navigationRequestStrategy`, which adds the possibility to force the service worker
to always create a network request for navigation requests.
This enables the server redirects while retaining the offline behavior.

Fixes #38194

PR Close #38565
2020-09-22 09:29:20 -07:00
David Shevitz 145ab3d7e0 docs: Update titles to getting started topics (#38887)
The topics for our getting started tutorial are inconsistent.
This change makes the titles consistent and easier to read.

PR Close #38887
2020-09-21 16:30:35 -07:00
Ajit Singh fdd4fa0009 docs: change wrong default app module by ng new (#38549)
In bootstrapping.md the default AppModule has some extra imports which are not generated
by default in ng new removed those extra imports and add them at appropriate place.

PR Close #38549
2020-09-21 12:25:28 -07:00
Kapunahele Wong dfbfabc052 fix(docs-infra): remove scrollbar styles for accessibility (#38852)
This commit removes the scrollbar styles so that the default
styles in the browser render. This widens the webkit scroll bar.
This makes it easier to grab the scrollbar using assistive
technology and devices, and provides a wider target for
those who have dexterity issues. By removing these styles,
We will no longer have to maintain custom scrollbars specific to WebKit
and they will be accessible by default.

PR Close #38852
2020-09-21 12:22:07 -07:00
Sonu Kapoor f3f6a42342 test(docs-infra): replace deprecated `ReflectiveInjector` with `Injector` (#38897)
This commit replaces the old and slow ReflectiveInjector that was
deprecated in v5 with the new Injector.

PR Close #38897
2020-09-21 12:21:27 -07:00
Andrew d5ddb9f340 docs: Grammar fixes (#38900)
Changed several period into colons to be consistent throughout the doc.

Changed "If don't add the interface..." to "If _you_ don't add the interface..."

PR Close #38900
2020-09-18 16:52:52 -07:00
Maksymilian Sielicki 7fb388f929 docs: updating the text of user input page to reflect real location of the forms page (#38802)
PR Close #38802
2020-09-18 08:00:40 -07:00
Minko Gechev 02c6bff9cf Update aio/content/marketing/events.json (#38874)
Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>
PR Close #38874
2020-09-18 07:59:53 -07:00
Minko Gechev ef28e15884 docs: add upcoming angular conferences (#38874)
PR Close #38874
2020-09-18 07:59:49 -07:00
Adrien Crivelli c4b8964424 docs: drop `newEvent()` compatibility function (#37251)
Because PhantomJS has been deprecated since March 2018, and `newEvent`
is very confusing for newcomers that read the testing documentation,
we remove it entirely, and instead assume most, if not all, newcomers
will run tests in Chrome as it is the default.

Fixes #23370

PR Close #37251
2020-09-17 09:31:17 -07:00
George Kalpakas 41bc2701c4 test(docs-infra): simplify `EventsComponent` tests and add more test cases (#36517)
This commit simplifies the tests of `EventsComponent` (by introducing a
`createMockEvent()` helper and getting rid of the irrelevant `Event`
fields) and adds tests for some more usecases. It also makes the tests
more robust by using Jasmine's `Clock` to mock the current date.

PR Close #36517
2020-09-16 15:14:24 -07:00
Ajit Singh a765530277 refactor(docs-infra): remove tooltip from links same as name (#36517)
In the events.json file most of tooltips are same as name so there
were of no use, as they were providing no extra information. So,
removed them from the events.json file

PR Close #36517
2020-09-16 15:14:21 -07:00
ajitsinghkaler 5b33798796 feat(docs-infra): created new widget for events page (#36517)
Data in events page was hardcoded and it is manually moved in the table.

Created a new events widget which will automatically move past and upcoming
events from events.json (`aio/content/marketing/events.json`) file to the
relevant table in the events tab

PR Close #36517
2020-09-16 15:14:18 -07:00