Commit graph

149 commits

Author SHA1 Message Date
mgechev
52970e3f23 docs: add updating to v17 guide (#52410)
PR Close #52410
2024-02-28 14:19:45 +01:00
Matthieu Riegler
bc81440b25 docs(docs-infra): Remove the edit button from AIO (#54204)
As a move to reduce PRs toward AIO we drop the edit button and recommend users to use ADEV instead and make suggestions there.

PR Close #54204
2024-02-01 18:54:55 +00:00
Joey Perrott
c4b880a025 refactor: migrate docs, examples, private, service worker and upgrade to prettier formatting (#54163)
Migrate formatting to prettier for docs, examples, private, service worker and upgrade from clang-format

PR Close #54163
2024-01-30 20:08:40 +00:00
Alan Agius
cb8a741f14 docs: update SSR doc to reflect version 17 (#52398)
Changes to SSR doc

PR Close #52398
2023-10-26 12:30:59 -07:00
Joey Perrott
ba64e9c247 docs: update to latest version of material (#51785)
Update to the latest version of material

PR Close #51785
2023-09-19 18:39:10 +02:00
Kristiyan Kostadinov
52cc7f839b build: align with internal tsconfig options (#51728)
Currently internally Angular has some customized tsconfig files, because we don't align with the tsconfig of the rest of g3. These changes enable `noImplicitReturns` and `noPropertyAccessFromIndexSignature` to align better with the internal config.

PR Close #51728
2023-09-12 11:39:42 -07:00
Matthieu Riegler
525acbb165 docs: remove NG6999 error page. (#51588)
`NGMODULE_VE_DEPENDENCY_ON_IVY_LIB` was a ViewEngine related error. This commit removes the doc page but keeps a redirection for older versions still throwing this error.

PR Close #51588
2023-08-31 17:30:57 +00:00
mgechev
9f2fb7c6dc docs: update invalid links to the new http guides (#49456)
We don't have `guide/http` anymore, so this PR updates the invalid links

PR Close #49456
2023-06-22 17:06:59 -07:00
Matthieu Riegler
a631b1fe63 docs(docs-infra): remove remainings of the webworker platform. (#50059)
The webworker platform was droped in v11.

PR Close #50059
2023-05-04 09:06:55 +02:00
Jeremy Elbourn
109eb88c6a docs: add v16 update guide (#50073)
PR Close #50073
2023-05-01 07:38:11 -07:00
Paul Gschwendtner
3ec2e2da0c build: never cache monitoring bazel test target (#49039)
We recently switched some of the monitoring e2e tests to Bazel. These
tests should never be cached because they rely on an external URL and
on network access. The URL itself might stay the same for quite a while,
but the underlying site might change based on new deployments. Bazel
only sees the URL and caches the test then. We want to avoid this.

PR Close #49039
2023-02-13 20:04:47 +01:00
Paul Gschwendtner
42619bd670 build: remove puppeteer, remaining usages of webdriver-manager and migrate AIO production test to Bazel (#49025)
This commit does three things that all related and required to get
rid of `webdriver-manager`:

* Our puppeteer protractor setup in AIO relies on webdriver-manager
because we install a corresponding chromedriver based on the puppeteer
chromium version. We would like to get rid of this brittle setup.

* We don't use `puppeteer` in many places because we manage chromium and
the driver through Bazel. This commit removes the remaining puppeteer
usage and replaces it with the Bazel-managed canonical browser

* We need to migrate the AIO production URL tests to Bazel. These
weren't part of Aspect's migration. This is needed so that we can drop
puppeteer and use the Bazel browser setup.

* Migrates some at-runtime TS `ts-node` test setup to proper idiomatic
Bazel code. Needed because it depends on code that also had to be
migrated to Bazel given the production e2e test Bazel migration (above
points).

Note: The xregexp dependency had to be added to the root project because
`ts_library` does not support compilation deps from `@aio_npm`. This is
something we will fix anyway when we have a more modern toolchain!

PR Close #49025
2023-02-10 19:22:18 +00:00
Paul Gschwendtner
111e2c7876 test(docs-infra): increase jasmine default timeout for e2e specs (#48671)
Similar to the Saucelabs job, the jasmine default timeout can be
increased to avoid the common jasmine timeouts. We cannot control
how fast Selenium e.g. loads a page or not.

PR Close #48671
2023-01-10 08:10:23 -08:00
Bob Watson
a6d953e145 docs: move tour of heroes tutorial to a subdirectory (#48162)
This commit prepares the documentation directories for future tutorials organized by directory.

Also, it moves the Angular Libraries topic from the Tutorials section to Developer Guides in TOC

PR Close #48162
2022-12-12 12:07:46 -08:00
Bob Watson
b5bb4c17d0 docs: update of landing page and backup pages (#47047)
Updates the angular.io landing page with new messaging
and new images. The Quick-start app has been updated
to demonstrate a minimalist Angular app and the value
proposition content has been updated.

PR Close #47047
2022-12-09 16:04:34 -08:00
Derek Cormier
a61397f2f8 build(bazel): consolidate windows chromium path workaround
Add the hack to a central location so that it's easier to fix later.
2022-11-22 13:51:16 -07:00
Derek Cormier
19397c2214 build(bazel): fix some regressions
Caused by some incompatible changes that were merged in.
2022-11-22 13:51:16 -07:00
Derek Cormier
b4c40c5d55 build(bazel): merge aio/tools/defaults.bzl and tools/defaults.bzl
Detect the correct workspace for the source maps dep.
2022-11-22 13:51:16 -07:00
Derek Cormier
944d107826 build(bazel): fix a bug where aio firebase utils tests could not link
deps

ts-node doesn't appear to use the require patch
2022-11-22 13:51:16 -07:00
Derek Cormier
3288868217 build(bazel): run aio firebase redirect tests under bazel
Adjust to run under ci.
2022-11-22 13:51:16 -07:00
Derek Cormier
7642abfb7a build(bazel): fix bazel aio regressions after rebase
The aio-bazel-migration branch was rebased onto main to include runfiles
support on windows.
2022-11-22 13:51:16 -07:00
Derek Cormier
b5ebe9ae6e build(bazel): run aio application e2e tests under bazel
Includes a postinstall fix for puppeteer so that chromium
can be run with protractor on osx under bazel
2022-11-22 13:51:16 -07:00
Bob Watson
032a488d02 docs: add info about v15 changes and update process (#47951)
PR Close #47951
2022-11-16 16:13:30 -08:00
Alan Agius
760cd78e94 docs: remove redirects to no longer existing page (#47929)
This redirect is broken as this page no longer exists.

PR Close #47929
2022-11-03 17:47:53 -07:00
Alan Agius
c9a6f95c9d docs: update analytics gathering documentation (#47840)
Currently there are 3 pages for analytics gathering information. Most of the information is duplicate.

With this change we remove the duplicate pages and outdated content to reflect the changes in version 15.

PR Close #47840
2022-11-03 17:45:35 -07:00
Andrew Kushnir
120555a626 feat(core): support object-based DI flags in TestBed.inject() (#46761)
This commit applies the changes similar to the ones performed for the `inject()` function in df246bb235.

The `TestBed.inject` function is updated to use previously added object-based API for options: now the flags argument supports passing an object which configures injection flags.

DEPRECATED:

The bit field signature of `TestBed.inject()` has been deprecated, in favor of the new options object.

PR Close #46761
2022-09-27 10:09:53 -07:00
George Kalpakas
df87f4afb5 docs: redirect /guide/ivy to the v12 guide (#46820)
Since Ivy is the default since v13, the Ivy guide (that used to live at
https://angular.io/guide/ivy) has been removed (see #43860). However,
there are certain error messages emitted by the CLI that still point to
it.

This commit address the problem by adding a redirect from
https://angular.io/guide/ivy to https://v12.angular.io/guide/ivy (which
is the last version that includes the guide).

Fixes #46717

PR Close #46820
2022-07-13 21:59:18 +00:00
Andrew Kushnir
8ab79aa7e6 refactor(core): drop r3_ prefix from TestBed filenames and merge files (#46635)
This commit updates TestBed-related files to drop the `r3_` prefix.

PR Close #46635
2022-07-13 20:09:59 +00:00
Paul Gschwendtner
dc684dbea0 refactor: move error reporting for analytics to service (#46716)
This is acceptable because `gtag.js` is also only loaded as part of the
service, similary `ga` is only registered in the service (so the
reporting was a noop if errors are thrown before -- no change here)

We can benefit from downleveling etc. and do not need to be careful
with the inline script in the `index.html`

PR Close #46716
2022-07-12 15:53:23 +00:00
Bob Watson
8271da9dbb docs: Remove content lint errors from tutorial topics (#46652)
Contains revisions to the Tour of Heroes tutorial that remove the text and formatting errors identified by the content lint tool.

PR Close #46652
2022-07-11 21:44:58 +00:00
Andrew Scott
e4538e03d6 refactor(docs-infra): Redirect old document title guide to new router feature (#45857)
The "set-document-title" guide was in place to direct developers to the
`Title` service for managing page titles. Managing the title is now
available in the `Router` package and is much easier. This change
deletes the old guide and redirects it to the section in the router
guide about setting the page title.

PR Close #45857
2022-05-04 16:30:52 -07:00
Paul Gschwendtner
68a6a075f4 build: clean up references to old master branch (#45856)
Cleans up all references to the `master` branch we renamed to
`main` across Angular.

PR Close #45856
2022-05-04 16:23:33 -07:00
Paul Gschwendtner
3a60063a54 build: updates to account for github primary branch rename
This is the commit accounting for the Github primary branch
rename when we actually perform the update.

We have three change phases: Prepare, Direct, Cleanup. This commit
is for the `direct` phase.
2022-04-28 11:17:01 -06:00
Alex Rickabaugh
d5a6cd1111 feat(core): implement EnvironmentInjector with adapter to NgModuleRef (#45626)
This commit exposes a new `EnvironmentInjector` abstraction, which
generalizes the "module injector" concept to injectors that are not based on
NgModules.

An EnvironmentInjector is a conceptual analogue of an `NgModuleRef` - it
represents an injector on the former "module" DI hierarchy in Angular (now
renamed to the "environment injector hierarchy"). Environment injectors are
created via the `createEnvironmentInjector` function from a list of
`Provider`s.

For backwards compatibility with current code using `NgModuleRef`,
`EnvironmentInjector`s are wrapped by an adapter `NgModuleRef`
implementation, so injecting `NgModuleRef` always returns the latest
`EnvironmentInjector`, even if that injector was not based on an NgModule.
Conversely, NgModule-based `NgModuleRef`s created via `createNgModuleRef`
are _also_ `EnvironmentInjector`s.

PR Close #45626
2022-04-18 09:28:42 -07:00
Andrew Kushnir
9add714b13 refactor(core): remove deprecated aotSummaries fields in TestBed config (#45487)
BREAKING CHANGE:

Since Ivy, TestBed doesn't use AOT summaries. The `aotSummaries` fields in TestBed APIs were present, but unused. The fields were deprecated in previous major version and in v14 those fields are removed. The `aotSummaries` fields were completely unused, so you can just drop them from the TestBed APIs usage.

PR Close #45487
2022-04-12 23:29:38 +00:00
George Kalpakas
b57f8bea61 test(docs-infra): ufix e2e test for {@example} dgeni tags (#45551)
Previously, the `guide/compoent-style` page was used in e2e tests to
verify the behavior of `{@example}` dgeni tags. However, this guide has
been updated and no longer contains an `{@example}` tag.

This commit switches to using a different page (`api/common/NgIf`) that
does currently contain an `{@example}` tag.

(NOTE: This will also fix the [CI failures][1] in #45501.)

[1]: https://circleci.com/gh/angular/angular/1145424

PR Close #45551
2022-04-07 20:59:19 +00:00
Derek Cormier
22d1dc0acb build(bazel): add bazel build and test targets for aio build (#45022)
First step towards a migration of aio to bazel. Not yet built by ci.

PR Close #45022
2022-03-14 09:25:34 -07:00
Dylan Hunn
4aa6965d41 test(docs-infra): Correct an invalid assumption in aio tests. (#44479)
The aio application expects `FormControl` to have no properties for the purposes of its own internal tests, but this is no longer true after #44434.

PR Close #44479
2021-12-14 16:14:47 -05:00
Alex Rickabaugh
509b14536a docs: initial commit of Angular Package Format documentation (#43987)
This commit adds the Angular Package Format to AIO. Previously this document
was updated and versioned in Google Docs.

The document is also updated for the Angular Package Format version 13.

PR Close #43987
2021-11-01 18:24:21 -07:00
Joe Martin (Crowdstaffing)
9316254062 docs: add redirect test (#43964)
Add redirect test for new latest version topic.

PR Close #43964
2021-10-29 16:51:32 -07:00
David Shevitz
a82c55ff2f docs: add redirect from angular.io/guide to angular.io/docs (#43341)
PR Close #43341
2021-10-12 17:41:48 +00:00
Pete Bacon Darwin
fa6aa1be55 build(docs-infra): ensure all overloads are shown in interfaces (#43734)
In the API docs, concrete classes do not list the "implementation" overload on a method, since this is not strictly part of its API.

We recently fixed the rendering of interfaces to display all the overloads, since there is no "implementation" overload.

This commit also fixes the rendering of "pseudo-classes", which are a combination of an interface
and a constant.

Fixes #43001

PR Close #43734
2021-10-06 09:21:08 -07:00
Pete Bacon Darwin
d1589604a8 build(docs-infra): ensure all overloads are shown in interfaces (#43614)
In the API docs, concrete classes do not list the "implementation" overload on a method, since this is not strictly part of its API.
There is already a special case for abstract methods that do not have such an implementation overload.

But we were missing the case where the method was part of an interface. In interfaces none of the methods have implementation overloads.

Fixes #43001

PR Close #43614
2021-09-29 09:58:48 -07:00
Joe Martin (Crowdstaffing)
644e3d2765 docs: add redirect for internationalization (#43245)
Add redirect for internationalization guide. Add test for redirect.

PR Close #43245
2021-09-23 15:40:33 -07:00
dario-piotrowicz
66c6dbdc79 refactor(docs-infra): introduce max-len 120 eslint rule (#43439)
add the max-len rule to the aio eslintrc and fix what code
breaks such rule

PR Close #43439
2021-09-15 10:47:35 -07:00
George Kalpakas
e064509613 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
dario-piotrowicz
ca7d4c3403 refactor(docs-infra): migrate aio from tslint to eslint (#42820)
migrate aio to eslint as tslint has been deprecated, the migration is restricted to the aio app and
its e2e tests and does not include the other tools, for such reason both tslint and codelyzer have not
been removed (to be done in a next PR)

some minor tweaks needed to be applied to the code so that it would adhere to the new ESLinting behaviour

most TSLint rules have been substituted with their ESLint equivalent, with some exceptions:
  * [whitespace] does not have an ESLint equivalent (suggested to be handled by prettier)
  * [import-spacing] does not have an ESLint equivalent (suggested to be handled by prettier)
  * [ban] replaced with [no-restricted-syntax] as there is no (official/included) ESLint equivalent

some rules have minor different behaviours compared to their TSLint counterparts:
  * @typescript-eslint/naming-convention:
    - typescript-eslint does not enforce uppercase for const only.
  * @typescript-eslint/no-unused-expressions:
    - The TSLint optional config "allow-new" is the default ESLint behavior and will no longer be ignored.
  * arrow-body-style:
    - ESLint will throw an error if the function body is multiline yet has a one-line return on it.
  * eqeqeq:
    - Option "smart" allows for comparing two literal values, evaluating the value of typeof and null comparisons.
  * no-console:
    - Custom console methods, if they exist, will no longer be allowed.
  * no-invalid-this:
    - Functions in methods will no longer be ignored.
  * no-underscore-dangle:
    - Leading and trailing underscores (_) on identifiers will now be ignored.
  * prefer-arrow/prefer-arrow-functions:
    - ESLint does not support allowing standalone function declarations.
    - ESLint does not support allowing named functions defined with the function keyword.
  * space-before-function-paren:
    - Option "constructor" is not supported by ESLint.
    - Option "method" is not supported by ESLint.

additional notes:
  * the current typescript version used by the aio app is 4.3.5, which is not supported by typescript-eslint (the supported
    versions are >=3.3.1 and <4.3.0). this causes a warning message to appear during linting, this issue should
    likely/hopefully disappear in the future as typescript-eslint catches up
  * The new "no-console" rule is not completely equivalent to what we had prior the migration, this is because TSLint's "no-console"
    rule let you specify the methods you did not want to allow, whilst ESLint's "no-console" lets you specify the methods that you do
    want to allow, so and in order not to have a very long list of methods in the ESLint rule it's been decided for the time being
    to simply only allow the "log", "warn" and "error" methods
  * 4 dependencies have been added as they have been considered necessary (see: https://github.com/angular/angular/pull/42820#discussion_r669978232)

extra:
  * the migration has been performed by following: https://github.com/angular-eslint/angular-eslint#migrating-an-angular-cli-project-from-codelyzer-and-tslin
  * more on typescript-eslint at: https://github.com/typescript-eslint/typescript-eslint

PR Close #42820
2021-07-20 11:55:28 -07:00
dario-piotrowicz
24ac37891c fix(docs-infra): slightly improve top-menu responsiveness (#42753)
make sure that the top-menu links don't get overlapped by
the search input, regardless on the browser's font-size and
the window's width

make also sure that the header's logo does not overlap the search
input on narrow windows, again regardless on the browser's font-size

PR Close #42753
2021-07-07 13:36:38 -07:00
George Kalpakas
2203217c40 build(docs-infra): disambiguate doc paths for global APIs (#42648)
In #41788, the `disambiguateDocsPathsProcessor` was introduced to fix
an issue with case-insensitively equal paths. This processor may alter
the output paths of some docs. Due to its nature, the
`disambiguateDocPathsProcessor` must be the last processor in the
pipeline that updates a doc's output path. However, the
`updateGlobalApiPathProcess` (which also alters the output paths of some
docs) was not configured to run before `disambiguateDocPathsProcessor`.
As a result, the changes made by `disambiguateDocPathsProcessor` were
overridden by `updateGlobalApiPathProcess`, resulting in the app's
failing to load such global API docs pages. An example of such an API
page is: https://angular.io/api/core/global/ngApplyChanges

This commit fixes it by ensuring that the `updateGlobalApiPathProcess`
is explicitly run before the `disambiguateDocPathsProcessor`, so that
the former does not override the changes made by the latter.

PR Close #42648
2021-06-24 12:28:21 -07:00
George Kalpakas
d07e736f17 build(docs-infra): auto-generate SW navigationUrls from Firebase config (#42452)
Previously, redirects had to be configured in both the Firebase config
(`firebase.json`) and the ServiceWorker config (`ngsw-config.json`).
This made it challenging to correctly configure redirects, since one had
to understand the different formats of the two configs, and was also
prone to getting out-of-sync configs.

This commit simplifies the process of adding redirects by removing the
need to update the ServiceWorker config (`ngsw-config.json`) and keep it
in sync with the Firebase config (`firebase.json`). Instead the
ServiceWorker `navigationUrls` are automatically generated from the list
of redirects in the Firebase config.

NOTE:
Currently, the automatic generation only supports the limited set of
patterns that are necessary to translate the existing redirects. It can
be made more sophisticated in the future, should the need arise.

PR Close #42452
2021-06-18 17:32:58 +00:00