Commit Graph

21418 Commits

Author SHA1 Message Date
anups1 5c0541f351 docs: fix issue 24571 in ngOnChanges (#42517)
fix issue #24571 in ngOnChanges doc

PR Close #42517
2021-06-08 12:44:30 -07:00
Kapunahele Wong f33fa04fb8 docs: improve accessibility of animations example (#41385)
PR Close #41385
2021-06-08 12:43:32 -07:00
Kapunahele Wong 386550cdf3 docs: improve accessibility of reactive-forms example (#41252)
PR Close #41252
2021-06-08 12:42:20 -07:00
Kapunahele Wong 0031c8cf41 docs: improve accessibility of attribute-binding example (#41432)
PR Close #41432
2021-06-08 12:16:54 -07:00
Kapunahele Wong 4ff636d24d docs: improve accessibility of pipes example (#41317)
PR Close #41317
2021-06-08 12:16:08 -07:00
Chris 8fe40026c1 docs: clarify documentation regarding passing multiple configurations to ng build (#41333)
Fixes #40923

PR Close #41333
2021-06-08 11:49:24 -07:00
Tiago Temporin 08628b45d3 docs: add components to material community components description (#41987)
PR Close #41987
2021-06-08 11:48:40 -07:00
Pete Bacon Darwin f788e6b8a6 refactor(docs-infra): prepare DocumentService to handle new disambiguated URLs (#42509)
A subsequent commit is going to change disambiguated URLs.
This commit prepares the AIO application to attempt the new URLs
if the old URLs fail. This will help to mitigate problems that may occur
during the period between deployment of the new version and the
service-worker not being updated.

PR Close #42509
2021-06-08 11:45:53 -07:00
Sam Severance c44ab4f6da fix(router): fix `serializeQueryParams` logic (#42481)
corrects a bug that resulted in query params such as
`[queryParams]={a: 1, b:[]}` being serialized as 'a=1&'
instead of 'a=1'

resolves #42445

PR Close #42481
2021-06-08 10:43:00 -07:00
Andrew Scott 171428ec98 docs: add selector documentation for `ViewChildren`, `ContentChildren`, and `ContentChild` (#42366)
These notes are copied from `ViewChild`. In addition, `ContentChildren` and `ViewChildren`
can specify multiple string selectors by separating each selector by a
comma.

fixes #21734

PR Close #42366
2021-06-08 10:42:21 -07:00
MrJithil 4cf442c879 docs: add links to examples for ComponentFactoryResolver (#42496)
Fixes #21705

PR Close #42496
2021-06-08 10:41:33 -07:00
Pete Bacon Darwin 645cad5614 docs(core): describe interactions between view-encapsulated components (#42397)
This commit adds information to the view encapsulation guide that
describes the styling interactions between components that use differing
view encapsulation modes.

Closes #40715

PR Close #42397
2021-06-08 10:39:52 -07:00
MarsiBarsi d10c38a8f8 docs: add Roman Sedov to contributors page (#42515)
PR Close #42515
2021-06-08 10:37:51 -07:00
iRealNirmal 751f68dcf8 docs: updated collaborators and add angular dev's link (#42516)
Existing trusted collaborators link is not working and now link is updated to one of angular.io page also it was missing angular dev's link so added it.

Closes #42513.

PR Close #42516
2021-06-08 10:37:16 -07:00
Jessica Janiuk 66f49c2497 Revert "refactor: remove checked-in locale files" (#42521)
This reverts commit 3a83ec8020f96c293fdc316854e199281d329111.

PR Close #42521
2021-06-08 10:06:24 -07:00
Jessica Janiuk e3b709314f Revert "build: convert CLDR locale extraction from Gulp to Bazel tool" (#42521)
This reverts commit b9759522260cd57392e44fe63c5b17a9f102c101.

PR Close #42521
2021-06-08 10:06:24 -07:00
Jessica Janiuk cb59bdfebd Revert "build: wire up new CLDR generation tool within Bazel" (#42521)
This reverts commit 40bf84c89decea1de08e43936c9886a391b02173.

PR Close #42521
2021-06-08 10:06:24 -07:00
Jessica Janiuk dc25efbb5b Revert "build: build locale files for legacy saucelabs job" (#42521)
This reverts commit 018654fe672a8ab7a954ae6541706957926ac0f4.

PR Close #42521
2021-06-08 10:06:24 -07:00
Jessica Janiuk cc55fd6e11 Revert "build: add documentation for `generate-locales-tool`" (#42521)
This reverts commit 12d84d041a2b27bec77f18d7e433b01f105ac784.

PR Close #42521
2021-06-08 10:06:24 -07:00
Jessica Janiuk fa4b0b31c0 Revert "build: simplify generation of closure locale file" (#42521)
This reverts commit 5fca35de0de8da24b8a046616404e74ecb4547b4.

PR Close #42521
2021-06-08 10:06:24 -07:00
Teri Glover f1d58efdb1 docs: Edits to remove jargon in Reference Observables, Dependency Injection (#42185)
PR Close #42185
2021-06-07 18:24:48 -07:00
Paul Gschwendtner b762820485 build: simplify generation of closure locale file (#42230)
In the past, the closure file has been generated so that all individual
locale files were imported individually. This resulted in a huge
slow-down in g3 due to the large amount of imports.

With 90bd984ff7 this changed so that we
inline the locale data for the g3 closure locale file. Also the file
only contained data for locales being supported by Closure. For this a
list of locales has been extracted from Closure Compiler, as well as a
list of locale aliases.

This logic is prone to CLDR version updates, and also broke as part of
the Gulp -> Bazel migration where this logic has been slightly modified
but caused issues in G3. e.g. a locale `zh-Hant` was requested in g3,
but the locale data had the name of the alias locale that provided the
data at index zero (which represents the locale name). Note that the
locale names at index zero always could differentiate from the requested
`goog.LOCALE` due to the aliasing logic. This just didn't come up before.

We simplify this logic by generating a `goog.LOCALE` case for all
locales CLDR provides data for. We don't need to bother about aliasing
because with the refactorings to the CLDR generation tool, all locales
are built (which also captures the aliases), and we can generate the locale
file on the fly (which has not been done before).

PR Close #42230
2021-06-07 15:34:39 -07:00
Paul Gschwendtner 7b288471bf build: add documentation for `generate-locales-tool` (#42230)
The CLDR extraction tool has been reworked to run as part of Bazel.
This adds a initial readme explaining what the tool generates. It's
far from a detailed description but it can serve as foundation for more
detailed explanations.

PR Close #42230
2021-06-07 15:34:39 -07:00
Paul Gschwendtner 532caa7bd9 build: build locale files for legacy saucelabs job (#42230)
Given that the locale files are now generated through
Bazel, the files are no longer checked-in and the
legacy TSC compilation fails due to imports resolving
to non-existent files. We fix this for the legacy
saucelabs job by copying the generated TS files into
the sources (which is acceptable for the isolated CI job)

PR Close #42230
2021-06-07 15:34:38 -07:00
Paul Gschwendtner 4641fc71a2 build: wire up new CLDR generation tool within Bazel (#42230)
Introduces a few Starlark macros for running the new Bazel
CLDR generation tool. Wires up the new tool so that locales
are generated properly. Also updates the existing
`closure-locale` file to match the new output generated by the Bazel tool.

This commit also re-adds a few locale files that aren't
generated by CLDR 37, but have been accidentally left in
the repository as the Gulp script never removed old locales
from previous CLDR versions. This problem is solved with the
Bazel generation of locale files, but for now we re-add these
old CLDR 33 locale files to not break developers relying on these
(even though the locale data indicies are incorrect; but there might
be users accessing the data directly)

PR Close #42230
2021-06-07 15:34:38 -07:00
Paul Gschwendtner 1f75a657a8 build: convert CLDR locale extraction from Gulp to Bazel tool (#42230)
Converts the CLDR locale extraction script to a Bazel tool.
This allows us to generate locale files within Bazel, so that
locales don't need to live as sources within the repo. Also
it allows us to get rid of the legacy Gulp tooling.

The migration of the Gulp script to a Bazel tool involved the
following things:

  1. Basic conversion of the `extract.js` script to TypeScript.
     This mostly was about adding explicit types. e.g. adding `locale:
     string` or `localeData: CldrStatic`.

  2. Split-up into separate files. Instead of keeping the large
     `extract.js` file, the tool has been split into separate files.
     The logic remains the same, just that code is more readable and
     maintainable.

  3. Introduction of a new `index.ts` file that is the entry-point
     for the Bazel tool. Previously the Gulp tool just generated
     all locale files, the default locale and base currency files
     at once. The new entry-point accepts a mode to be passed as
     first process argument. based on that argument, either locales
     are generated into a specified directory, or the default locale,
     base currencies or closure file is generated.

     This allows us to generate files with a Bazel genrule where
     we simply run the tool and specify the outputs. Note: It's
     necessary to have multiple modes because files live in separate
     locations. e.g. the default locale in `@angular/core`, but the
     rest in `@angular/common`.

  4. Removal of the `cldr-data-downloader` and custom CLDR resolution
     logic. Within Bazel we cannot run a downloader using network.

     We switch this to something more Bazel idiomatic with better
     caching. For this a new repository rule is introduced that
     downloads the CLDR JSON repository and extracts it. Within
     that rule we determine the supported locales so that they
     can be used to pre-declare outputs (for the locales) within
     Bazel analysis phase. This allows us to add the generated locale
     files to a `ts_library` (which we want to have for better testing,
     and consistent JS transpilation).

     Note that the removal of `cldr-data-downloader` also requires us to
     add logic for detecting locales without data. The CLDR data
     downloader overwrote the `availableLocales.json` file with a file
     that only lists locales that CLDR provides data for. We use the
     official `availableLocales` file CLDR provides, but filter out
     locales for which no data is available. This is needed until we
     update to CLDR 39 where data is available for all such locales
     listed in `availableLocales.json`.

PR Close #42230
2021-06-07 15:34:38 -07:00
Paul Gschwendtner 9421bcd978 refactor: remove checked-in locale files (#42230)
This is a pre-refactor commit allowing us to move
the CLDR locale generation to Bazel where files would
no longer be checked-in, except for the `closure-locale`
file that is synced into Google3.

PR Close #42230
2021-06-07 15:34:38 -07:00
Andrew Scott a493ea9bcb fix(language-service): fix autocomplete info display for some cases (#42472)
Before this commit, attribute completion display parts were retrieved
but not assigned. In addition, the switch case was non-exhaustive
because it did not include `StructuralDirectiveAttribute`.

PR Close #42472
2021-06-07 12:25:53 -07:00
George Kalpakas f85a120b7b docs(router): fix code-example headers (#42507)
Previously, the code-examples headers used in the
"Creating custom route matches" tutorial contained the name of the
example directory (`routing-with-urlmatcher`). This was confusing,
because the user was previously instructed to create an app named
`angular-custom-route-match` and switch to that directory.

This commit fixes it by removing the root directory name from the
headers, thus leaving the path of the file relative to the current
working directory. This also aligns with code-examples in other guides.

PR Close #42507
2021-06-07 11:58:20 -07:00
Paul Gschwendtner 38c592ea0a build: remove unused no-strict tsconfig file (#42506)
In the past, when we enabled `--strict` in the repository, we added
another tsconfig for code not being migrated to be `--strict`
compatible. This was done for the deprecated http and webworker
packages. Since these are now removed, we can rmeove the logic.

PR Close #42506
2021-06-07 10:47:47 -07:00
JoostK 64c8027538 docs: clarify how type-only imports can be used to avoid NG3003 (#42491)
Since #42453, type-only imports are not considered for cyclic imports.
This commit adds a note to the NG3003 error documentation to mention
using type-only imports to avoid the error.

PR Close #42491
2021-06-07 10:47:13 -07:00
Andrew Kushnir f4c55e464a docs: provide more info on the `NO_ERRORS_SCHEMA` schema (#42327)
The `NO_ERRORS_SCHEMA` schema can be used to ignore errors related to unknown elements or properties, but since it suppresses these errors it may also hide real problems in a template. This commit updates the `NO_ERRORS_SCHEMA` docs to mention that.

Closes #39454.

PR Close #42327
2021-06-07 10:46:34 -07:00
Kristiyan Kostadinov afd68e5674 feat(compiler): emit diagnostic for shadow dom components with an invalid selector (#42245)
This is based on a discussion we had a few weeks ago. Currently if a component uses `ViewEncapsulation.ShadowDom` and its selector doesn't meet the requirements for a custom element tag name, a vague error will be thrown at runtime saying something like "Element does not support attachShadowRoot".

These changes add a new diagnostic to the compiler that validates the component selector and gives a better error message during compilation.

PR Close #42245
2021-06-07 10:44:57 -07:00
Pete Bacon Darwin cc904b5226 docs(core): clarify deprecation of `entryComponents` (#42248)
These may still be needed in View Engine libraries.

Closes #39958

PR Close #42248
2021-06-07 10:02:01 -07:00
Alex Inkin b061e5b2d7 fix(docs-infra): fix search results font color (#42488)
Use the same white constant for no results message
PR Close #42488
2021-06-07 09:38:06 -07:00
Gourav102 5d70f09032 docs: Corrected spelling (#42493)
Corrected spelling of 'Properties'.
PR Close #42493
2021-06-07 09:36:18 -07:00
Gourav102 cd22c7a1f5 docs: Updated the code snippet path (#42494)
PR Close #42494
2021-06-07 09:32:57 -07:00
Igor Minar 30059173f4 docs: add node.js version info into the universal guide (#42375)
Previously we didn't document what versions were supported. Since universal requires node.js I'm adding version
information into the guide as a informative callout.

Fixes #39436

PR Close #42375
2021-06-04 15:21:21 -07:00
Joey Perrott 4fc24addcb build: suppress errors in git hooks (#42484)
When errors occur in git hooks, we can safely supress them as they are validated on CI.

This is primarily coming up as an issue related to needing to reinstall node_modules

PR Close #42484
2021-06-04 13:34:01 -07:00
Teri Glover a5b5136843 docs: Edits to remove jargon in Reference NgModules (#42182)
PR Close #42182
2021-06-04 13:32:56 -07:00
Paul Gschwendtner 2d0ff0a5d3 ci: add lint error for files with missing trailing new-line (#42478)
For quite a while it is an unspoken convention to add a trailing
new-line files within the Angular repository. This was never enforced
automatically, but has been frequently raised in pull requests through
manual review. This commit sets up a lint rule so that this is
"officially" enforced and doesn't require manual review.

PR Close #42478
2021-06-04 13:31:03 -07:00
Paul Gschwendtner 71e14a71f5 test: update compiler-cli compliance goldens due to TS 4.3 emit format regression (#42022)
Updates the compiler-cli compliance goldens. The golden updates are
required due to a regression in TypeScript 4.3 that causes the emitter
to not incorrectly preserve lines when emitting a node list.

This can be reverted once https://github.com/microsoft/TypeScript/pull/44070
is available.

PR Close #42022
2021-06-04 11:17:09 -07:00
Paul Gschwendtner 25f763cff8 feat(core): support TypeScript 4.3 (#42022)
Switches the repository to TypeScript 4.3 and the latest
version of tslib. This involves updating the peer dependency
ranges on `typescript` for the compiler CLI and for the Bazel
package. Tests for new TypeScript features have been added to
ensure compatibility with Angular's ngtsc compiler.

PR Close #42022
2021-06-04 11:17:09 -07:00
Renovate Bot 69296254da build: update dependency google-closure-compiler to v20210601 (#42475)
PR Close #42475
2021-06-04 10:34:58 -07:00
Jessica Janiuk 00b1444d12 Revert "feat(forms): add `ng-submitted` class to forms that have been submitted." (#42474)
This reverts commit f024d7556081f8913f21761bb8e6aab8d08be110.

PR Close #42474
2021-06-03 17:42:02 -07:00
Joey Perrott ae858c0504 ci: extend default timeout of karma tests for legacy saucelab tests (#42473)
After testing, it seems that the flakyness we are experiencing in our legacy
saucelabs job is caused by timeouts which happen due to the karma server being
unable to serve all of the files needed for the tests fast enough while concurrent
tests are being run.

PR Close #42473
2021-06-03 16:06:00 -07:00
Paul Gschwendtner 1684b70b88 test(dev-infra): always use same virtual git client instance in publish tests (#42468)
With the recent refactorings to `GitClient`, where singletons
are created and can be retrieved through a static method, the
test has been updated to also install spies for the static methods
of `GitClient`. This commit updates the spy installation so that
the same mock git client is used that is also passed manually to
the release actions. Having two separate instances of the mock
git client could result in false-positive test results.

PR Close #42468
2021-06-03 14:34:33 -07:00
Paul Gschwendtner 67f65a9d25 refactor(dev-infra): improve type-safety of git client utility (#42468)
Currently the `GitClient` accepts a generic parameter for determining
whether the `githubToken` should be set or not. This worked fine so far
in terms of distinguishing between an authenticated and
non-authenticated git client instance, but if we intend to conditionally
show methods only for authenticated instances, the generic parameter
is not suitable.

This commit splits up the `GitClient` into two classes. One for
the base logic without any authorization, and a second class that
extends the base logic with authentication logic. i.e. the
`AuthenticatedGitClient`. This allows us to have specific methods only
for the authenticated instance. e.g.

  * `hasOauthScopes` has been moved to only exist for authenticated
    instances.
  * the GraphQL functionality within `gitClient.github` is not
    accessible for non-authenticated instances. GraphQL API requires
    authentication as per Github.

The initial motiviation for this was that we want to throw if
`hasOAuthScopes` is called without the Octokit instance having
a token configured. This should help avoiding issues as within
3b434ed94d
that prevented the caretaker process momentarily.

Additionally, the Git client has moved from `index.ts` to
`git-client.ts` for better discoverability in the codebase.

PR Close #42468
2021-06-03 14:34:33 -07:00
David Shevitz aea56048f6 docs: update host and viewproviders section with correct logical tree representation (#42403)
Fixes #38741

PR Close #42403
2021-06-03 14:33:44 -07:00
George Kalpakas 268e0040e7 build(docs-infra): disable critical CSS inlining (#42435)
Previously, the critical CSS inlining optimization (which is turned on
by default in CLI v12+) was causing a Flash Of Unstyled Content (FOUC).
This was caused by the combination of the following facts:
- The way CSS inlining is implemented in the CLI makes loading the full
  styles asynchronous and non-render-blocking (so the app can bootstrap
  before the styles are fully downloaded).
- Angular.io does not employ the [app shell][1] pattern in order to
  render pages at build time, resulting in very minimal CSS rules being
  recognized as critical (for the purpose of inlining).

This commit fixes the FOUC by disabling the critical CSS inlining, while
we consider a better way to approach this (in order to be able to rip
the benefits of inlining without the FOUC).

[1]: https://angular.io/guide/app-shell

Fixes #42365

PR Close #42435
2021-06-03 14:32:06 -07:00