Commit Graph

3831 Commits

Author SHA1 Message Date
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
Sonu Kapoor 44074499dc test(docs-infra): improve typeahead example and add unit test (#34190)
This commit improves the typeahead example, by using the emitted input
value. It also adds a unit test to ensure that the example is working
as intended.

PR Close #34190
2020-09-16 15:13:05 -07:00
Sonu Kapoor ba54671993 test(docs-infra): add unit tests for rxjs examples (#34190)
This commit adds missing unit tests for all rxjs examples from the docs.

Closes #28017

PR Close #34190
2020-09-16 15:13:02 -07:00
Ajit Singh 171a0d0696 docs: add ngc to glossary (#36781)
ngc angular compiler was not mentioned in the glossary.
Glossary should contain the relevant terms in angular
which are hard to get. So, added a small defination of
ngc to the glossary

PR Close #36781
2020-09-15 11:29:50 -07:00
santoshyadavdev 3934f0a833 docs(elements): convert the `ng add` command to code-example (#38834)
the command was hardly visible currently
changing it to shell for visibility

PR Close #38834
2020-09-14 14:31:05 -07:00
George Kalpakas 354138eba9 build(docs-infra): upgrade cli command docs sources to 800ba9271 (#38827)
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](32391604b...800ba9271):

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

PR Close #38827
2020-09-14 08:33:39 -07:00
Pete Bacon Darwin 66129f8ea6 docs: clarify what fixes are merged to LTS versions (#38788)
PR Close #38788
2020-09-11 08:45:42 -07:00
David Shevitz 03447ba52f docs: Move Displaying data topic and ToH tutorial (#38774)
Move the "Displaying data topic" into the Tutorials section.
Move the ToH tutorial to the top of the tutorials section.

PR Close #38774
2020-09-10 14:32:25 -07:00
Kapunahele Wong 3c4b8b97c1 docs: put docs style guide back in left nav (#38683)
PR Close #38683
2020-09-09 16:22:58 -07:00
thekiba 3d77b64fc3 docs: add Andrew Grekov to GDE resources (#36690)
This commit adds Andrew Grekov to the GDE
resources page and describes his work as a software
engineer using angular and .NET.

PR Close #36690
2020-09-09 09:44:47 -07:00
Lars Gyrup Brink Nielsen f645d26e3f docs(docs-infra): add The Deep Dive podcast, update Angular inDepth URL (#37621)
Add the new podcast called The Deep Dive to the list of Podcast resources.

Also replace the name and URL for Angular inDepth as the old URL is deprecated.

PR Close #37621
2020-09-09 09:11:11 -07:00
Alain Chautard 7997fc5f97 docs: mark the `entryComponents` array as deprecated (#38616)
The `entryComponents` array is now deprecated (per https://angular.io/api/core/NgModule#entryComponents
and https://angular.io/guide/deprecations#entryComponents).

PR Close #38616
2020-09-09 09:07:18 -07:00
Pete Bacon Darwin 3cb2a79399 docs: update v9 support status to LTS (#38744)
PR Close #38744
2020-09-09 09:06:56 -07:00
Kuzivakwashe 19a484302d docs: Fix component decorator closing brackets (#38754)
PR Close #38754
2020-09-09 09:06:10 -07:00
Sonu Kapoor ded075a79c docs: add missing space (#38759)
This commit adds a missing space after the comma in listing the rxjs
operators section.

PR Close #38759
2020-09-09 09:05:47 -07:00
Dan Manastireanu b0c79f2373 docs: Describe a scenario in which ngOnChanges is not called before ngOnInit. (#38625)
Closes #38613

PR Close #38625
2020-09-08 14:06:48 -07:00
George Kalpakas 97475d7408 build: upgrade all preview-server JS dependencies to latest versions (#38736)
This commit upgrades all dependencies in `aio/aio-builds-setup/scripts-js/`
to latest versions and also includes all necessary code changes to
ensure the tests are passing with the new dependency versions.

In particular:
- We ensure `nock`'s `Scope#done()` is not called before receiving a
  response to account for a breaking change introduced in
  nock/nock#1960.
- The use of `nock`'s `Scope#log()` method was removed, because the
  method is no longer available since nock/nock#1966. See
  https://github.com/nock/nock#debugging for more info on debugging
  failed matches.

See also
e23ba31b13/migration_guides/migrating_to_13.md
for more info on migrating from `nock` v12 to v13.

PR Close #38736
2020-09-08 10:07:25 -07:00
Alan Cohen 261f689e9b docs: remove duplicate trans-unit element closing tag (#38715)
PR Close #38715
2020-09-08 10:06:03 -07:00